Control custom title bar using store value
This commit is contained in:
parent
bc8096fe7a
commit
e2eb051c31
4 changed files with 65 additions and 21 deletions
|
|
@ -1,8 +1,11 @@
|
|||
import { Titlebar, Color } from 'custom-electron-titlebar'
|
||||
// Load settings store from main process
|
||||
const { store } = require('electron').remote.require('./store')
|
||||
|
||||
// Load extra modules we'll be using
|
||||
const { Titlebar, Color } = require('custom-electron-titlebar');
|
||||
|
||||
// Only show custom menubar for Windows or Linux
|
||||
if ((process.platform !== 'darwin')) {
|
||||
// Only show custom menubar if current window has no frame
|
||||
if (store.get('drawCustomTitleBar') == true) {
|
||||
new Titlebar({
|
||||
backgroundColor: Color.fromHex('#c5247f'),
|
||||
icon: './titleicon.svg'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue