mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
N*View: fix scrollbar
This commit is contained in:
@@ -10,7 +10,7 @@ Item {
|
|||||||
property color handleHoverColor: handleColor
|
property color handleHoverColor: handleColor
|
||||||
property color handlePressedColor: handleColor
|
property color handlePressedColor: handleColor
|
||||||
property color trackColor: "transparent"
|
property color trackColor: "transparent"
|
||||||
property real handleWidth: 6
|
property real handleWidth: Math.round(6 * Style.uiScaleRatio)
|
||||||
property real handleRadius: Style.iRadiusM
|
property real handleRadius: Style.iRadiusM
|
||||||
property int verticalPolicy: ScrollBar.AsNeeded
|
property int verticalPolicy: ScrollBar.AsNeeded
|
||||||
property int horizontalPolicy: ScrollBar.AlwaysOff
|
property int horizontalPolicy: ScrollBar.AlwaysOff
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ import QtQuick.Controls
|
|||||||
import QtQuick.Templates as T
|
import QtQuick.Templates as T
|
||||||
import qs.Commons
|
import qs.Commons
|
||||||
|
|
||||||
T.ScrollView {
|
ScrollView {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property color handleColor: Qt.alpha(Color.mHover, 0.8)
|
property color handleColor: Qt.alpha(Color.mHover, 0.8)
|
||||||
property color handleHoverColor: handleColor
|
property color handleHoverColor: handleColor
|
||||||
property color handlePressedColor: handleColor
|
property color handlePressedColor: handleColor
|
||||||
property color trackColor: "transparent"
|
property color trackColor: "transparent"
|
||||||
property real handleWidth: 6
|
property real handleWidth: Math.round(6 * Style.uiScaleRatio)
|
||||||
property real handleRadius: Style.iRadiusM
|
property real handleRadius: Style.iRadiusM
|
||||||
property int verticalPolicy: ScrollBar.AsNeeded
|
property int verticalPolicy: ScrollBar.AsNeeded
|
||||||
property int horizontalPolicy: ScrollBar.AsNeeded
|
property int horizontalPolicy: ScrollBar.AsNeeded
|
||||||
@@ -133,7 +133,6 @@ T.ScrollView {
|
|||||||
x: root.mirrored ? 0 : root.width - width
|
x: root.mirrored ? 0 : root.width - width
|
||||||
y: root.topPadding
|
y: root.topPadding
|
||||||
height: root.availableHeight
|
height: root.availableHeight
|
||||||
active: root.ScrollBar.horizontal.active
|
|
||||||
policy: root.verticalPolicy
|
policy: root.verticalPolicy
|
||||||
|
|
||||||
contentItem: Rectangle {
|
contentItem: Rectangle {
|
||||||
@@ -176,7 +175,6 @@ T.ScrollView {
|
|||||||
x: root.leftPadding
|
x: root.leftPadding
|
||||||
y: root.height - height
|
y: root.height - height
|
||||||
width: root.availableWidth
|
width: root.availableWidth
|
||||||
active: root.ScrollBar.vertical.active
|
|
||||||
policy: root.horizontalPolicy
|
policy: root.horizontalPolicy
|
||||||
|
|
||||||
contentItem: Rectangle {
|
contentItem: Rectangle {
|
||||||
|
|||||||
Reference in New Issue
Block a user