Add dock always on top setting

This commit is contained in:
Gobius Dolhain 2020-04-20 18:38:02 +02:00
parent b8d9f6442a
commit 676bbba7a4
No known key found for this signature in database
GPG Key ID: 3713D132FE2B8861
4 changed files with 20 additions and 3 deletions

View File

@ -193,8 +193,13 @@ export class Window {
this.window.focus() this.window.focus()
}) })
} else { } else {
// docked, visible if (this.configStore.appearance?.dockAlwaysOnTop) {
this.window.hide() // docked, visible, on top
this.window.hide()
} else {
// docked, visible, not on top
this.window.focus()
}
} }
} }
} }

View File

@ -2,6 +2,7 @@ appearance:
dock: off dock: off
dockScreen: current dockScreen: current
dockFill: 0.5 dockFill: 0.5
dockAlwaysOnTop: true
tabsLocation: top tabsLocation: top
cycleTabs: true cycleTabs: true
theme: Standard theme: Standard

View File

@ -53,7 +53,9 @@ export class DockingService {
newBounds.y = display.bounds.y newBounds.y = display.bounds.y
} }
this.hostApp.setAlwaysOnTop(true) const alwaysOnTop = this.config.store.appearance.dockAlwaysOnTop
this.hostApp.setAlwaysOnTop(alwaysOnTop)
setImmediate(() => { setImmediate(() => {
this.hostApp.setBounds(newBounds) this.hostApp.setBounds(newBounds)
}) })

View File

@ -207,6 +207,15 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
) )
| {{screen.name}} | {{screen.name}}
.form-line(*ngIf='config.store.appearance.dock != "off"')
.header
.title Dock always on top
.description Keep docked terminal always on top
toggle(
[(ngModel)]='config.store.appearance.dockAlwaysOnTop',
(ngModelChange)='config.save(); docking.dock()',
)
.form-line(*ngIf='config.store.appearance.dock != "off"') .form-line(*ngIf='config.store.appearance.dock != "off"')
.header .header
.title Docked terminal size .title Docked terminal size