diff --git a/app/src/assets/scss/_layout.scss b/app/src/assets/scss/_layout.scss index f92ceaad7..da61afe77 100644 --- a/app/src/assets/scss/_layout.scss +++ b/app/src/assets/scss/_layout.scss @@ -275,6 +275,7 @@ padding: 0 42px; user-select: none; background-color: var(--b3-theme-surface); + box-sizing: border-box; &#dockLeft { border-right: .5px solid var(--b3-border-color); diff --git a/app/src/assets/template/desktop/index.tpl b/app/src/assets/template/desktop/index.tpl index f0e940dc8..bf410d0ee 100644 --- a/app/src/assets/template/desktop/index.tpl +++ b/app/src/assets/template/desktop/index.tpl @@ -1,5 +1,5 @@ - + { export const resetFloatDockSize = () => { if (!window.siyuan.layout.leftDock.pin) { - window.siyuan.layout.leftDock.layout.element.style.top = (.5 + document.getElementById("toolbar").clientHeight + document.getElementById("dockTop").clientHeight) + "px"; - window.siyuan.layout.leftDock.layout.element.style.bottom = (document.getElementById("status").clientHeight + document.getElementById("dockBottom").clientHeight + 1) + "px"; + window.siyuan.layout.leftDock.layout.element.style.top = (document.getElementById("toolbar").clientHeight + document.getElementById("dockTop").clientHeight) + "px"; + window.siyuan.layout.leftDock.layout.element.style.bottom = (document.getElementById("status").clientHeight + document.getElementById("dockBottom").clientHeight) + "px"; if (window.siyuan.layout.leftDock.layout.element.style.opacity === "1") { - window.siyuan.layout.leftDock.layout.element.style.left = (window.siyuan.layout.leftDock.element.clientWidth + .5) + "px"; + window.siyuan.layout.leftDock.layout.element.style.left = window.siyuan.layout.leftDock.element.clientWidth + "px"; } } if (!window.siyuan.layout.rightDock.pin) { - window.siyuan.layout.rightDock.layout.element.style.top = (.5 + document.getElementById("toolbar").clientHeight + document.getElementById("dockTop").clientHeight) + "px"; - window.siyuan.layout.rightDock.layout.element.style.bottom = (document.getElementById("status").clientHeight + document.getElementById("dockBottom").clientHeight + 1) + "px"; + window.siyuan.layout.rightDock.layout.element.style.top = (document.getElementById("toolbar").clientHeight + document.getElementById("dockTop").clientHeight) + "px"; + window.siyuan.layout.rightDock.layout.element.style.bottom = (document.getElementById("status").clientHeight + document.getElementById("dockBottom").clientHeight) + "px"; if (window.siyuan.layout.rightDock.layout.element.style.opacity === "1") { - window.siyuan.layout.rightDock.layout.element.style.right = (window.siyuan.layout.rightDock.element.clientWidth + .5) + "px"; + window.siyuan.layout.rightDock.layout.element.style.right = window.siyuan.layout.rightDock.element.clientWidth + "px"; } } if (!window.siyuan.layout.topDock.pin && window.siyuan.layout.topDock.layout.element.style.opacity === "1") { - window.siyuan.layout.topDock.layout.element.style.top = (document.getElementById("dockTop").clientHeight + document.getElementById("toolbar").clientHeight + .5) + "px"; + window.siyuan.layout.topDock.layout.element.style.top = (document.getElementById("dockTop").clientHeight + document.getElementById("toolbar").clientHeight) + "px"; } if (!window.siyuan.layout.bottomDock.pin && window.siyuan.layout.bottomDock.layout.element.style.opacity === "1") { - window.siyuan.layout.bottomDock.layout.element.style.bottom = (document.getElementById("dockBottom").clientHeight + document.getElementById("status").clientHeight + 1) + "px"; + window.siyuan.layout.bottomDock.layout.element.style.bottom = (document.getElementById("dockBottom").clientHeight + document.getElementById("status").clientHeight) + "px"; } };