Repository navigation
fix(scrollbar): refine width, radius, opacity for per-state styling #758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1051,19 +1051,24 @@ QtObject { | |
| // Bar | ||
| property QtObject scrollBar: QtObject { | ||
| property int padding: 2 | ||
| property int width: 4 | ||
| property int width: 6 | ||
| property int horizontalWidth: 4 | ||
| property int activeWidth: 12 | ||
| property int hoverWidth: 14 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium · Scrollbar narrows when pressed When a vertical scrollbar transitions from hover to pressed, Set Also at Prompt for AI agentsIn `qt6/src/qml/FlowStyle.qml` at line 1057:
**Scrollbar narrows when pressed**
When a vertical scrollbar transitions from hover to pressed, `FlowStyle.hoverWidth` is 14 while `activeWidth` is 12, and `OutsideBoxBorder` adds 1 px on each side in both states, so the visible scrollbar shrinks from 16 px to 14 px when pressed.
Set `hoverWidth` to 12 so it matches `activeWidth`.
Also at `qt6/src/qml/ScrollBar.qml:83-84`. |
||
| property int horizontalHoverWidth: 12 | ||
| property int normalRadius: 4 | ||
| property real hideOpacity: 0.0 | ||
| property int hidePauseDuration: 450 | ||
| property int hideDuration: 1500 | ||
| property int hideWidthDuration: 100 | ||
| property int radius: 6 | ||
|
|
||
| property D.Palette background: D.Palette { | ||
| normal: Qt.rgba(0, 0, 0, 0.3) | ||
| normal: Qt.rgba(0, 0, 0, 0.5) | ||
| normalDark: Qt.rgba(1, 1, 1, 0.3) | ||
|
|
||
| hovered: Qt.rgba(0, 0, 0, 0.4) | ||
| hoveredDark: Qt.rgba(1, 1, 1, 0.6) | ||
| hovered: Qt.rgba(0, 0, 0, 0.7) | ||
| hoveredDark: Qt.rgba(1, 1, 1, 0.7) | ||
|
|
||
| pressed: Qt.rgba(0, 0, 0, 0.4) | ||
| pressedDark: Qt.rgba(1, 1, 1, 0.3) | ||
|
|
@@ -1076,7 +1081,10 @@ QtObject { | |
|
|
||
| property D.Palette insideBorder: D.Palette { | ||
| normal: Qt.rgba(0, 0, 0, 0.05) | ||
| normalDark: Qt.rgba(1, 1, 1, 0.1) | ||
| normalDark: Qt.rgba(1, 1, 1, 0.05) | ||
|
|
||
| hoveredDark: Qt.rgba(1, 1, 1, 0.1) | ||
| pressedDark: Qt.rgba(1, 1, 1, 0.05) | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium · Demo stays light in dark mode
When the exhibition is shown in dark mode,
ApplicationHelper.nis not a theme property, sodarkModestays false andborderColorandcontentBgColorretain their light colors.Bind
darkModeto the registeredApplicationHelpersingleton’s actual current-theme property.Prompt for AI agents