mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +00:00
possible fix for docking sizing (#9)
This commit is contained in:
parent
0fe2de591a
commit
de29e34363
@ -76,6 +76,8 @@ setupWindowManagement = () => {
|
|||||||
|
|
||||||
electron.ipcMain.on('window-set-bounds', (event, bounds) => {
|
electron.ipcMain.on('window-set-bounds', (event, bounds) => {
|
||||||
let actualBounds = app.window.getBounds()
|
let actualBounds = app.window.getBounds()
|
||||||
|
actualBounds.width -= bounds.x - actualBounds.x
|
||||||
|
actualBounds.height -= bounds.y - actualBounds.y
|
||||||
actualBounds.x = bounds.x
|
actualBounds.x = bounds.x
|
||||||
actualBounds.y = bounds.y
|
actualBounds.y = bounds.y
|
||||||
app.window.setBounds(actualBounds)
|
app.window.setBounds(actualBounds)
|
||||||
|
@ -40,12 +40,12 @@ export class DockingService {
|
|||||||
newBounds.height = Math.round(fill * display.bounds.height)
|
newBounds.height = Math.round(fill * display.bounds.height)
|
||||||
}
|
}
|
||||||
if (dockSide === 'right') {
|
if (dockSide === 'right') {
|
||||||
newBounds.x = display.bounds.x + Math.round(display.bounds.width * (1.0 - fill))
|
newBounds.x = display.bounds.x + display.bounds.width - newBounds.width
|
||||||
} else {
|
} else {
|
||||||
newBounds.x = display.bounds.x
|
newBounds.x = display.bounds.x
|
||||||
}
|
}
|
||||||
if (dockSide === 'bottom') {
|
if (dockSide === 'bottom') {
|
||||||
newBounds.y = display.bounds.y + Math.round(display.bounds.height * (1.0 - fill))
|
newBounds.y = display.bounds.y + display.bounds.height - newBounds.height
|
||||||
} else {
|
} else {
|
||||||
newBounds.y = display.bounds.y
|
newBounds.y = display.bounds.y
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user