mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 21:40:03 +00:00
fix: WCO color, settings icon position
This commit is contained in:
parent
2f1c388a8b
commit
e38b826fd6
@ -96,11 +96,9 @@ export class Window {
|
|||||||
bwOptions.titleBarStyle = 'hidden'
|
bwOptions.titleBarStyle = 'hidden'
|
||||||
// If not macOS and native appearance is not toggled, use WCO.
|
// If not macOS and native appearance is not toggled, use WCO.
|
||||||
} else {
|
} else {
|
||||||
bwOptions.titleBarStyle = 'hidden',
|
bwOptions.titleBarStyle = 'hidden'
|
||||||
bwOptions.titleBarOverlay = {
|
bwOptions.titleBarOverlay = {
|
||||||
color: '#00000000',
|
color: '#00000000',
|
||||||
symbolColor: '#ffffff',
|
|
||||||
height: 32,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -394,6 +392,23 @@ export class Window {
|
|||||||
this.setVibrancy(enabled, type)
|
this.setVibrancy(enabled, type)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
ipcMain.on('window-set-window-controls-color', (event, theme) => {
|
||||||
|
if (!this.window || event.sender !== this.window.webContents) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// let color: string = theme.backgroundMore
|
||||||
|
let symbolColor: string = theme.foreground
|
||||||
|
|
||||||
|
this.window.setTitleBarOverlay(
|
||||||
|
{
|
||||||
|
// color: '#00000000',
|
||||||
|
symbolColor: symbolColor,
|
||||||
|
height: 32,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
ipcMain.on('window-set-title', (event, title) => {
|
ipcMain.on('window-set-title', (event, title) => {
|
||||||
if (!this.window || event.sender !== this.window.webContents) {
|
if (!this.window || event.sender !== this.window.webContents) {
|
||||||
return
|
return
|
||||||
|
@ -88,6 +88,11 @@ title-bar(
|
|||||||
&& (hostApp.platform == Platform.Linux)',
|
&& (hostApp.platform == Platform.Linux)',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
div.window-controls-spacer(
|
||||||
|
*ngIf='config.store.appearance.frame == "thin" \
|
||||||
|
&& (hostApp.platform == Platform.Windows)',
|
||||||
|
)
|
||||||
|
|
||||||
.content
|
.content
|
||||||
start-page.content-tab.content-tab-active(*ngIf='ready && app.tabs.length == 0')
|
start-page.content-tab.content-tab-active(*ngIf='ready && app.tabs.length == 0')
|
||||||
|
|
||||||
|
@ -142,6 +142,11 @@ $tab-border-radius: 4px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&>.window-controls-spacer {
|
||||||
|
min-width: 138px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
& > .inset {
|
& > .inset {
|
||||||
width: calc(70px + 15px * var(--spaciness));
|
width: calc(70px + 15px * var(--spaciness));
|
||||||
height: var(--tabs-height);
|
height: var(--tabs-height);
|
||||||
|
@ -99,6 +99,7 @@ export default class ElectronModule {
|
|||||||
})
|
})
|
||||||
this.registerGlobalHotkey()
|
this.registerGlobalHotkey()
|
||||||
this.updateVibrancy()
|
this.updateVibrancy()
|
||||||
|
this.updateWindowControlsColor()
|
||||||
})
|
})
|
||||||
|
|
||||||
config.changed$.subscribe(() => {
|
config.changed$.subscribe(() => {
|
||||||
@ -131,6 +132,8 @@ export default class ElectronModule {
|
|||||||
|
|
||||||
config.changed$.subscribe(() => this.updateVibrancy())
|
config.changed$.subscribe(() => this.updateVibrancy())
|
||||||
|
|
||||||
|
config.changed$.subscribe(() => this.updateWindowControlsColor())
|
||||||
|
|
||||||
config.ready$.toPromise().then(() => {
|
config.ready$.toPromise().then(() => {
|
||||||
dockMenu.update()
|
dockMenu.update()
|
||||||
})
|
})
|
||||||
@ -169,6 +172,15 @@ export default class ElectronModule {
|
|||||||
|
|
||||||
this.hostWindow.setOpacity(this.config.store.appearance.opacity)
|
this.hostWindow.setOpacity(this.config.store.appearance.opacity)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private updateWindowControlsColor () {
|
||||||
|
// if windows and not using native frame, WCO does not exist, return.
|
||||||
|
if (this.hostApp.platform === Platform.Windows && this.config.store.appearance.frame == "native") {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
this.electron.ipcRenderer.send('window-set-window-controls-color', this.config.store.terminal.colorScheme)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export { ElectronHostWindow, ElectronHostAppService, ElectronService }
|
export { ElectronHostWindow, ElectronHostAppService, ElectronService }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user