diff --git a/app/src/asset/pdf/pdf_sidebar_resizer.js b/app/src/asset/pdf/pdf_sidebar_resizer.js index 4e4d88a0a..4f634fb3a 100644 --- a/app/src/asset/pdf/pdf_sidebar_resizer.js +++ b/app/src/asset/pdf/pdf_sidebar_resizer.js @@ -53,7 +53,8 @@ class PDFSidebarResizer { * @type {number} */ get outerContainerWidth() { - return (this._outerContainerWidth ||= this.outerContainer.clientWidth); + // NOTE + return this.outerContainer.clientWidth; } /** @@ -63,7 +64,8 @@ class PDFSidebarResizer { _updateWidth(width = 0) { // Prevent the sidebar from becoming too narrow, or from occupying more // than half of the available viewer width. - const maxWidth = Math.floor(this.outerContainerWidth / 2); + // NOTE + const maxWidth = Math.floor(this.outerContainerWidth / 3 * 2); if (width > maxWidth) { width = maxWidth; } @@ -84,6 +86,7 @@ class PDFSidebarResizer { * @private */ _mouseMove(evt) { + // NOTE let width = evt.clientX - this.outerContainer.getBoundingClientRect().left; // For sidebar resizing to work correctly in RTL mode, invert the width. if (this.isRTL) { diff --git a/app/src/assets/scss/pdf/_pdf.scss b/app/src/assets/scss/pdf/_pdf.scss index 505417721..6d766feb5 100644 --- a/app/src/assets/scss/pdf/_pdf.scss +++ b/app/src/assets/scss/pdf/_pdf.scss @@ -224,13 +224,22 @@ position: absolute; top: 0; bottom: 0; - width: 1px; + width: 6px; z-index: 200; cursor: ew-resize; right: -6px; - background-color: var(--b3-border-color); - &:hover { + &:after { + content: ""; + width: 1px; + height: 100%; + background-color: var(--b3-border-color); + position: absolute; + top: 0; + left: 3px; + } + + &:hover:after { background-color: var(--b3-scroll-color); } }