mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-12-28 07:54:40 +00:00
Dont reserve space for transient scrollbars
Some checks are pending
CI / Test on ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test on ${{ matrix.os }} (ubuntu-latest) (push) Waiting to run
CI / Test on ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test on Arch (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, windows-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Transifex / Update translations on Transifex (push) Waiting to run
Some checks are pending
CI / Test on ${{ matrix.os }} (macos-latest) (push) Waiting to run
CI / Test on ${{ matrix.os }} (ubuntu-latest) (push) Waiting to run
CI / Test on ${{ matrix.os }} (windows-latest) (push) Waiting to run
CI / Test on Arch (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, windows-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Transifex / Update translations on Transifex (push) Waiting to run
This commit is contained in:
parent
64126fd10a
commit
cc2ab8bc0d
@ -53,6 +53,7 @@ from qt.core import (
|
||||
QPoint,
|
||||
QPointF,
|
||||
QRect,
|
||||
QStyle,
|
||||
Qt,
|
||||
QTimer,
|
||||
pyqtSignal,
|
||||
@ -949,8 +950,9 @@ class BookshelfView(MomentumScrollMixin, QAbstractScrollArea):
|
||||
case QEvent.Type.Resize:
|
||||
super().event(ev)
|
||||
s = self.viewport().size()
|
||||
s.setWidth(s.width() - self.verticalScrollBar().size().width())
|
||||
self.viewport().resize(s)
|
||||
if self.style().styleHint(QStyle.StyleHint.SH_ScrollBar_Transient, widget=self) == 0:
|
||||
s.setWidth(s.width() - self.verticalScrollBar().size().width())
|
||||
self.viewport().resize(s)
|
||||
if self.layout_constraints.width != (new_width := self._get_available_width()):
|
||||
self.layout_constraints = self.layout_constraints._replace(width=new_width)
|
||||
self.invalidate()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user