OSDN Git Service

カスタムタイトルバーいらん
authorNeko7sora <75793267+Neko7sora@users.noreply.github.com>
Wed, 30 Jun 2021 12:39:39 +0000 (21:39 +0900)
committerNeko7sora <75793267+Neko7sora@users.noreply.github.com>
Wed, 30 Jun 2021 12:39:39 +0000 (21:39 +0900)
src/index.html
src/main.js
src/package.json
src/preload.js

index 5087163..48655c7 100644 (file)
@@ -91,7 +91,7 @@
                 Chromium <span id="chrome-version"></span>,
                 and Electron <span id="electron-version"></span>.
             </p>
-            <p>補足、このソフトを開いた直後に閉じるとエラーが起きます。ソフトウェアフレームワーク仕様なので修正はできません。(timerなんちゃらとか出てくるけど無視で....</p>
+            <p>補足、このソフトを開いた直後に閉じるとエラーが起きます。</p>
         </div>
         <div class="tab_content" id="kihon_content">
             kihonの内容がここに入ります
index f97bcc6..dd2a294 100644 (file)
@@ -129,13 +129,12 @@ function createWindow() {
     minHeight: 600,
     maxWidth: 600,
     maxHeight: 800,
-    frame: false,
+    frame: true,
     webPreferences: {
       preload: path.join(__dirname, 'preload.js'),
       enableRemoteModule: true,
       nodeIntegration: false,
     },
-    titleBarStyle: "hidden"//theme
   })
   const menu = Menu.buildFromTemplate(exampleMenuTemplate());
   Menu.setApplicationMenu(menu);
index d84e34e..f867901 100644 (file)
@@ -11,7 +11,6 @@
     "node": ">=14.16.0"
   },
   "dependencies": {
-    "custom-electron-titlebar": "^3.2.7"
   },
   "devDependencies": {
     "electron": "13.1.4"
index 3a5ef3a..7aa2521 100644 (file)
@@ -1,25 +1,13 @@
 // Node.jsのすべてのAPIがプリロードプロセスで利用できます。
 // !Chrome の拡張機能と同じサンドボックスを持っています。
-const customTitlebar = require('custom-electron-titlebar');
 
 window.addEventListener('DOMContentLoaded', () => {
-
-
-       new customTitlebar.Titlebar({
-               backgroundColor: customTitlebar.Color.fromHex('#444'),
-       });
-       titlebar.updateBackground(new Color(new RGBA(0, 0, 0, .7)));
-
-
-       new customTitlebar.Titlebar()
-
        const replaceText = (selector, text) => {
-               const element = document.getElementById(selector)
-               if (element) element.innerText = text
+         const element = document.getElementById(selector)
+         if (element) element.innerText = text
        }
-
-       for (const type of ['chrome', 'node', 'electron']) {
-               replaceText(`${type}-version`, process.versions[type])
+  
+       for (const dependency of ['chrome', 'node', 'electron']) {
+         replaceText(`${dependency}-version`, process.versions[dependency])
        }
-})
-
+  })
\ No newline at end of file