mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 15:20:08 +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";
|
onEntered: breadcrumbText.color = "#1fc6a6";
|
||||||
onExited: breadcrumbText.color = "#ffffff";
|
onExited: breadcrumbText.color = "#ffffff";
|
||||||
// navigate back to parent level menu if there is one
|
// navigate back to parent level menu if there is one
|
||||||
onClicked:
|
onClicked:
|
||||||
if (breadcrumbText.text !== "Menu") {
|
if (breadcrumbText.text !== "Menu") {
|
||||||
menuPopperUpper.closeLastMenu();
|
menuPopperUpper.closeLastMenu();
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,14 +36,18 @@ FocusScope {
|
||||||
//color: isSubMenu ? hifi.colors.faintGray : hifi.colors.faintGray80
|
//color: isSubMenu ? hifi.colors.faintGray : hifi.colors.faintGray80
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: listView
|
id: listView
|
||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
width: 480
|
width: 480
|
||||||
height: 720
|
height: 720
|
||||||
|
contentWidth: 480
|
||||||
|
contentHeight: 720
|
||||||
|
|
||||||
topMargin: hifi.dimensions.menuPadding.y + 90
|
topMargin: hifi.dimensions.menuPadding.y
|
||||||
|
bottomMargin: hifi.dimensions.menuPadding.y
|
||||||
onEnabledChanged: recalcSize();
|
onEnabledChanged: recalcSize();
|
||||||
onVisibleChanged: recalcSize();
|
onVisibleChanged: recalcSize();
|
||||||
onCountChanged: recalcSize();
|
onCountChanged: recalcSize();
|
||||||
|
@ -94,12 +98,12 @@ FocusScope {
|
||||||
newHeight += currentItem.implicitHeight
|
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) {
|
if (maxWidth > width) {
|
||||||
width = maxWidth;
|
width = maxWidth;
|
||||||
}
|
}
|
||||||
if (newHeight > height) {
|
if (newHeight > contentHeight) {
|
||||||
height = newHeight
|
contentHeight = newHeight;
|
||||||
}
|
}
|
||||||
currentIndex = originalIndex;
|
currentIndex = originalIndex;
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,7 @@ Item {
|
||||||
readonly property real modalDialogTitleHeight: 40
|
readonly property real modalDialogTitleHeight: 40
|
||||||
readonly property real controlLineHeight: 28 // Height of spinbox control on 1920 x 1080 monitor
|
readonly property real controlLineHeight: 28 // Height of spinbox control on 1920 x 1080 monitor
|
||||||
readonly property real controlInterlineHeight: 21 // 75% of controlLineHeight
|
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 scrollbarBackgroundWidth: 18
|
||||||
readonly property real scrollbarHandleWidth: scrollbarBackgroundWidth - 2
|
readonly property real scrollbarHandleWidth: scrollbarBackgroundWidth - 2
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue