mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Merge pull request #9414 from fayeli/menu-scrolling
Fix tablet menu scrolling issue
This commit is contained in:
commit
3fe9505f18
3 changed files with 10 additions and 6 deletions
|
@ -79,7 +79,7 @@ Item {
|
|||
onEntered: breadcrumbText.color = "#1fc6a6";
|
||||
onExited: breadcrumbText.color = "#ffffff";
|
||||
// navigate back to parent level menu if there is one
|
||||
onClicked:
|
||||
onClicked:
|
||||
if (breadcrumbText.text !== "Menu") {
|
||||
menuPopperUpper.closeLastMenu();
|
||||
}
|
||||
|
|
|
@ -36,14 +36,18 @@ FocusScope {
|
|||
//color: isSubMenu ? hifi.colors.faintGray : hifi.colors.faintGray80
|
||||
}
|
||||
|
||||
|
||||
ListView {
|
||||
id: listView
|
||||
x: 0
|
||||
y: 0
|
||||
width: 480
|
||||
height: 720
|
||||
contentWidth: 480
|
||||
contentHeight: 720
|
||||
|
||||
topMargin: hifi.dimensions.menuPadding.y + 90
|
||||
topMargin: hifi.dimensions.menuPadding.y
|
||||
bottomMargin: hifi.dimensions.menuPadding.y
|
||||
onEnabledChanged: recalcSize();
|
||||
onVisibleChanged: recalcSize();
|
||||
onCountChanged: recalcSize();
|
||||
|
@ -94,12 +98,12 @@ FocusScope {
|
|||
newHeight += currentItem.implicitHeight
|
||||
}
|
||||
}
|
||||
newHeight += 2 * hifi.dimensions.menuPadding.y; // White space at top and bottom.
|
||||
newHeight += hifi.dimensions.menuPadding.y * 2; // White space at top and bottom.
|
||||
if (maxWidth > width) {
|
||||
width = maxWidth;
|
||||
}
|
||||
if (newHeight > height) {
|
||||
height = newHeight
|
||||
if (newHeight > contentHeight) {
|
||||
contentHeight = newHeight;
|
||||
}
|
||||
currentIndex = originalIndex;
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ Item {
|
|||
readonly property real modalDialogTitleHeight: 40
|
||||
readonly property real controlLineHeight: 28 // Height of spinbox control on 1920 x 1080 monitor
|
||||
readonly property real controlInterlineHeight: 21 // 75% of controlLineHeight
|
||||
readonly property vector2d menuPadding: Qt.vector2d(14, 12)
|
||||
readonly property vector2d menuPadding: Qt.vector2d(14, 102)
|
||||
readonly property real scrollbarBackgroundWidth: 18
|
||||
readonly property real scrollbarHandleWidth: scrollbarBackgroundWidth - 2
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue