diff --git a/app/src/assets/scss/_layout.scss b/app/src/assets/scss/_layout.scss index 3a695ef7a..bdb20cf44 100644 --- a/app/src/assets/scss/_layout.scss +++ b/app/src/assets/scss/_layout.scss @@ -30,6 +30,9 @@ border-left: 0; overflow: hidden; box-shadow: 8px 0 24px rgb(140 149 159 / 20%); + top: 112px; + bottom: 82px; + left: 0; } &.layout--floatr { @@ -38,16 +41,25 @@ border-right: 0; border-radius: 8px 0 0 8px; overflow: hidden; + top: 112px; + bottom: 82px; + right: 0; } &.layout--floatt { border-bottom: 1px solid var(--b3-border-color); box-shadow: var(--b3-dialog-shadow); + left: 0; + top: 0; + right: 0; } &.layout--floatb { border-top: 1px solid var(--b3-border-color); box-shadow: 0 -8px 24px rgb(140 149 159 / 20%); + left: 0; + right: 0; + bottom: 0; } } diff --git a/app/src/constants.ts b/app/src/constants.ts index 4a5d514a0..3af7e6c20 100644 --- a/app/src/constants.ts +++ b/app/src/constants.ts @@ -331,13 +331,13 @@ export abstract class Constants { data: [ [{ type: "file", - size: {width: 220, height: 0}, + size: {width: 224, height: 0}, show: true, icon: "iconFiles", hotkeyLangId: "fileTree", }, { type: "outline", - size: {width: 220, height: 0}, + size: {width: 224, height: 0}, show: false, icon: "iconAlignCenter", hotkeyLangId: "outline", @@ -349,13 +349,13 @@ export abstract class Constants { hotkeyLangId: "inbox", }], [{ type: "bookmark", - size: {width: 220, height: 0}, + size: {width: 224, height: 0}, show: false, icon: "iconBookmark", hotkeyLangId: "bookmark", }, { type: "tag", - size: {width: 220, height: 0}, + size: {width: 224, height: 0}, show: false, icon: "iconTags", hotkeyLangId: "tag", diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts index 7e9c01a2e..8416b3166 100644 --- a/app/src/layout/dock/index.ts +++ b/app/src/layout/dock/index.ts @@ -152,18 +152,11 @@ export class Dock { public resetDockPosition(show: boolean) { if (this.position === "Left") { - this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px; -opacity:${show ? 1 : 0}; -top: 112px;bottom: 82px;left:0`); + this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px;opacity:${show ? 1 : 0};`); } else if (this.position === "Right") { - this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px; -opacity:${show ? 1 : 0}; -right:0;top: 112px;bottom: 82px;`); + this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px;opacity:${show ? 1 : 0};`); } else { - this.layout.element.setAttribute("style", `height:${this.layout.element.clientHeight}px; -opacity:${show ? 1 : 0}; -left:0;right:0; -${this.position === "Top" ? "top" : "bottom"}:0`); + this.layout.element.setAttribute("style", `height:${this.layout.element.clientHeight}px;opacity:${show ? 1 : 0};`); } } @@ -522,9 +515,9 @@ ${this.position === "Top" ? "top" : "bottom"}:0`); this.element.querySelectorAll(".dock__item--active").forEach((item) => { let size; if (this.position === "Left" || this.position === "Right") { - size = parseInt(item.getAttribute("data-width")) || (["graph", "globalGraph", "backlink"].includes(item.getAttribute("data-type")) ? 320 : 220); + size = parseInt(item.getAttribute("data-width")) || (["graph", "globalGraph", "backlink"].includes(item.getAttribute("data-type")) ? 320 : 224); } else { - size = parseInt(item.getAttribute("data-height")) || 220; + size = parseInt(item.getAttribute("data-height")) || 224; } if (size > max) { max = size; diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts index c5c100bb8..738e3abd7 100644 --- a/app/src/layout/util.ts +++ b/app/src/layout/util.ts @@ -609,7 +609,7 @@ export const addResize = (obj: Layout | Wnd) => { } const getMinSize = (element: HTMLElement) => { - let minSize = 220; + let minSize = 224; Array.from(element.querySelectorAll(".file-tree")).find((item) => { if (item.classList.contains("sy__backlink") || item.classList.contains("sy__graph") || item.classList.contains("sy__globalGraph") || item.classList.contains("sy__inbox")) {