add ScrollBarType

This commit is contained in:
Cyril Anisimov 2024-12-06 22:57:50 +01:00
parent f992252c6e
commit 87d00116e1
9 changed files with 19 additions and 16 deletions

View file

@ -151,6 +151,7 @@
<file>ui/qml/Controls2/PageType.qml</file>
<file>ui/qml/Controls2/PopupType.qml</file>
<file>ui/qml/Controls2/ProgressBarType.qml</file>
<file>ui/qml/Controls2/ScrollBarType.qml</file>
<file>ui/qml/Controls2/StackViewType.qml</file>
<file>ui/qml/Controls2/SwitcherType.qml</file>
<file>ui/qml/Controls2/TabButtonType.qml</file>

View file

@ -30,7 +30,7 @@ ListView {
// snapMode: ListView.SnapToItem
// ScrollBar.vertical: ScrollBar {}
ScrollBar.vertical: ScrollBarType {}
property bool isFocusable: true

View file

@ -81,10 +81,7 @@ DrawerType2 {
}
}
ScrollBar.vertical: ScrollBar {
id: scrollBar
policy: ScrollBar.AlwaysOn
}
ScrollBar.vertical: ScrollBarType {}
ButtonGroup {
id: buttonGroup

View file

@ -27,7 +27,7 @@ ListView {
model: ServersModel
currentIndex: ServersModel.defaultIndex
ScrollBar.vertical: ScrollBar {
ScrollBar.vertical: ScrollBarType {
id: scrollBar
objectName: "scrollBar"
policy: root.height >= root.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn

View file

@ -85,9 +85,7 @@ DrawerType2 {
FocusController.nextKeyRightItem()
}
ScrollBar.vertical: ScrollBar {
policy: ScrollBar.AsNeeded
}
ScrollBar.vertical: ScrollBarType {}
model: 1

View file

@ -25,7 +25,7 @@ Flickable {
Keys.onUpPressed: scrollBar.decrease()
Keys.onDownPressed: scrollBar.increase()
ScrollBar.vertical: ScrollBar {
ScrollBar.vertical: ScrollBarType {
id: scrollBar
policy: fl.height >= fl.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
}

View file

@ -0,0 +1,11 @@
import QtQuick
import QtQuick.Controls
import "./"
import "../Controls2"
ScrollBar {
id: root
policy: ScrollBar.AsNeeded
}

View file

@ -115,9 +115,7 @@ PageType {
FocusController.nextKeyRightItem()
}
ScrollBar.vertical: ScrollBar {
policy: ScrollBar.AsNeeded
}
ScrollBar.vertical: ScrollBarType {}
model: contacts

View file

@ -122,9 +122,7 @@ PageType {
FocusController.nextKeyRightItem()
}
ScrollBar.vertical: ScrollBar {
policy: ScrollBar.AsNeeded
}
ScrollBar.vertical: ScrollBarType {}
model: logTypes
spacing: 24