mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:28:03 +02:00
Fix scroll bar
This commit is contained in:
parent
50ed9e2b2a
commit
f991379c9c
1 changed files with 10 additions and 2 deletions
|
@ -43,8 +43,8 @@ Window {
|
||||||
// type should only consist of logic sized areas, with nothing drawn (although the
|
// type should only consist of logic sized areas, with nothing drawn (although the
|
||||||
// default value for the frame property does include visual decorations)
|
// default value for the frame property does include visual decorations)
|
||||||
property var pane: Item {
|
property var pane: Item {
|
||||||
property bool isScrolling: scrollView.contentChildren.length > 0 ?
|
property bool isScrolling: /*scrollView.contentChildren.length > 0 ?
|
||||||
(scrollView.height < scrollView.contentChildren[0].height) :
|
(scrollView.height < scrollView.contentChildren[0].height) :*/
|
||||||
false
|
false
|
||||||
property int contentWidth: scrollView.width - (isScrolling ? 10 : 0)
|
property int contentWidth: scrollView.width - (isScrolling ? 10 : 0)
|
||||||
property int scrollHeight: scrollView.height
|
property int scrollHeight: scrollView.height
|
||||||
|
@ -86,7 +86,15 @@ Window {
|
||||||
anchors.bottomMargin: footerPane.height
|
anchors.bottomMargin: footerPane.height
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
ScrollBar.vertical: ScrollBar {
|
||||||
|
id: control
|
||||||
policy: ScrollBar.AsNeeded
|
policy: ScrollBar.AsNeeded
|
||||||
|
parent: scrollView
|
||||||
|
x: scrollView.width - width
|
||||||
|
y: scrollView.topPadding
|
||||||
|
height: scrollView.availableHeight
|
||||||
|
active: scrollView.ScrollBar.vertical.active
|
||||||
|
visible: control.size < 1.0
|
||||||
|
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
implicitWidth: 8
|
implicitWidth: 8
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
Loading…
Reference in a new issue