mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 07:13:57 +02:00
Fix invalid scrolling detection
This commit is contained in:
parent
001b6d23ff
commit
70ce1b2bf7
2 changed files with 8 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
StackView {
|
||||
id: editRoot
|
||||
|
@ -8,6 +8,9 @@ StackView {
|
|||
signal sendToScript(var message);
|
||||
|
||||
topPadding: 40
|
||||
leftPadding: 0
|
||||
rightPadding: 0
|
||||
bottomPadding: 0
|
||||
|
||||
property var itemProperties: {"y": editRoot.topPadding,
|
||||
"width": editRoot.availableWidth,
|
||||
|
@ -20,6 +23,7 @@ StackView {
|
|||
color: "#404040" //default background color
|
||||
EditTabView {
|
||||
id: tab
|
||||
anchors.fill: parent
|
||||
currentIndex: -1
|
||||
onCurrentIndexChanged: {
|
||||
editRoot.replace(null, tab.itemAt(currentIndex).visualItem,
|
||||
|
|
|
@ -46,8 +46,6 @@ Window {
|
|||
// type should only consist of logic sized areas, with nothing drawn (although the
|
||||
// default value for the frame property does include visual decorations)
|
||||
property var pane: Item {
|
||||
property bool isScrolling: Qt.binding(function() { return scrollView.contentHeight > scrollView.height; });
|
||||
|
||||
property int contentWidth: scrollView.width
|
||||
property int scrollHeight: scrollView.height
|
||||
|
||||
|
@ -81,15 +79,16 @@ Window {
|
|||
contentItem.children: [ content ]
|
||||
contentHeight: content.height
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
property bool isScrolling: (contentHeight - height) > 10 ? true : false
|
||||
|
||||
clip: true
|
||||
|
||||
anchors.rightMargin: parent.isScrolling ? verticalScrollWidth : 0
|
||||
anchors.rightMargin: isScrolling ? verticalScrollWidth : 0
|
||||
anchors.fill: parent
|
||||
anchors.bottomMargin: footerPane.height
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
policy: scrollView.contentHeight > scrollView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
||||
policy: scrollView.isScrolling ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
||||
parent: scrollView.parent
|
||||
anchors.top: scrollView.top
|
||||
anchors.right: scrollView.right
|
||||
|
|
Loading…
Reference in a new issue