mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-28 20:50:35 +02:00
Merge pull request #113 from ctrlaltdavid/fix/missing-scrollbars
Always display vertical scrollbar in Settings dialogs that scroll
This commit is contained in:
commit
cb0a080be1
3 changed files with 50 additions and 14 deletions
|
@ -44,7 +44,6 @@ Rectangle {
|
||||||
return (root.parent !== null) && root.parent.objectName == "loader";
|
return (root.parent !== null) && root.parent.objectName == "loader";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
property bool isVR: AudioScriptingInterface.context === "VR"
|
property bool isVR: AudioScriptingInterface.context === "VR"
|
||||||
property real rightMostInputLevelPos: root.width
|
property real rightMostInputLevelPos: root.width
|
||||||
//placeholder for control sizes and paddings
|
//placeholder for control sizes and paddings
|
||||||
|
@ -128,16 +127,16 @@ Rectangle {
|
||||||
anchors.top: flickView.top;
|
anchors.top: flickView.top;
|
||||||
anchors.right: flickView.right;
|
anchors.right: flickView.right;
|
||||||
anchors.bottom: flickView.bottom;
|
anchors.bottom: flickView.bottom;
|
||||||
anchors.rightMargin: -verticalScrollWidth; //compensate flickView's right margin
|
z: 100 // Display over top of separators.
|
||||||
|
|
||||||
background: Item {
|
background: Item {
|
||||||
implicitWidth: verticalScrollWidth;
|
implicitWidth: verticalScrollWidth;
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: hifi.colors.darkGray30;
|
color: hifi.colors.baseGrayShadow
|
||||||
radius: 4;
|
radius: 4;
|
||||||
anchors {
|
anchors {
|
||||||
fill: parent;
|
fill: parent;
|
||||||
topMargin: -1; // Finesse size
|
topMargin: 2 // Finess position
|
||||||
bottomMargin: -2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,9 +147,7 @@ Rectangle {
|
||||||
color: hifi.colors.white30;
|
color: hifi.colors.white30;
|
||||||
anchors {
|
anchors {
|
||||||
fill: parent;
|
fill: parent;
|
||||||
leftMargin: 2; // Finesse size and position.
|
topMargin: 1; // Finesse position.
|
||||||
topMargin: 1;
|
|
||||||
bottomMargin: 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -338,7 +335,6 @@ Rectangle {
|
||||||
anchors.topMargin: 10;
|
anchors.topMargin: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: inputDeviceHeader
|
id: inputDeviceHeader
|
||||||
x: margins.paddings;
|
x: margins.paddings;
|
||||||
|
@ -688,4 +684,5 @@ Rectangle {
|
||||||
anchors.topMargin: 10;
|
anchors.topMargin: 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
|
import QtQuick.Controls 2.2
|
||||||
|
|
||||||
import "."
|
import "."
|
||||||
import "./preferences"
|
import "./preferences"
|
||||||
|
@ -33,7 +34,10 @@ Item {
|
||||||
property bool gotoPreviousAppFromScript: false
|
property bool gotoPreviousAppFromScript: false
|
||||||
|
|
||||||
property var tablet;
|
property var tablet;
|
||||||
|
|
||||||
|
readonly property real verticalScrollWidth: 10
|
||||||
|
readonly property real verticalScrollShaft: 8
|
||||||
|
|
||||||
function saveAll() {
|
function saveAll() {
|
||||||
dialog.forceActiveFocus(); // Accept any text box edits in progress.
|
dialog.forceActiveFocus(); // Accept any text box edits in progress.
|
||||||
|
|
||||||
|
@ -103,6 +107,43 @@ Item {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
contentWidth: parent.width
|
contentWidth: parent.width
|
||||||
contentHeight: getSectionsHeight();
|
contentHeight: getSectionsHeight();
|
||||||
|
|
||||||
|
anchors.top: main.top
|
||||||
|
anchors.bottom: main.bottom
|
||||||
|
|
||||||
|
ScrollBar.vertical: ScrollBar {
|
||||||
|
policy: ScrollBar.AlwaysOn
|
||||||
|
parent: scrollView.parent
|
||||||
|
anchors.top: scrollView.top
|
||||||
|
anchors.right: scrollView.right
|
||||||
|
anchors.bottom: scrollView.bottom
|
||||||
|
z: 100 // Display over top of separators.
|
||||||
|
|
||||||
|
background: Item {
|
||||||
|
implicitWidth: verticalScrollWidth
|
||||||
|
Rectangle {
|
||||||
|
color: hifi.colors.baseGrayShadow
|
||||||
|
radius: 4
|
||||||
|
anchors {
|
||||||
|
fill: parent
|
||||||
|
bottomMargin: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentItem: Item {
|
||||||
|
implicitWidth: verticalScrollShaft
|
||||||
|
Rectangle {
|
||||||
|
radius: verticalScrollShaft/2
|
||||||
|
color: hifi.colors.white30
|
||||||
|
anchors {
|
||||||
|
fill: parent
|
||||||
|
topMargin: 1
|
||||||
|
bottomMargin: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: 480
|
width: 480
|
||||||
Component {
|
Component {
|
||||||
|
@ -183,7 +224,7 @@ Item {
|
||||||
for (var i = 0; i < sections.length; i++) {
|
for (var i = 0; i < sections.length; i++) {
|
||||||
totalHeight += sections[i].height + sections[i].getPreferencesHeight();
|
totalHeight += sections[i].height + sections[i].getPreferencesHeight();
|
||||||
}
|
}
|
||||||
var bottomPadding = 170;
|
var bottomPadding = 30;
|
||||||
return (totalHeight + bottomPadding);
|
return (totalHeight + bottomPadding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,11 +97,10 @@ Windows.Window {
|
||||||
background: Item {
|
background: Item {
|
||||||
implicitWidth: verticalScrollWidth
|
implicitWidth: verticalScrollWidth
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: hifi.colors.darkGray30
|
color: hifi.colors.baseGrayShadow
|
||||||
radius: 4
|
radius: 4
|
||||||
anchors {
|
anchors {
|
||||||
fill: parent
|
fill: parent
|
||||||
topMargin: -1 // Finesse size
|
|
||||||
bottomMargin: -2
|
bottomMargin: -2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,7 +112,6 @@ Windows.Window {
|
||||||
color: hifi.colors.white30
|
color: hifi.colors.white30
|
||||||
anchors {
|
anchors {
|
||||||
fill: parent
|
fill: parent
|
||||||
leftMargin: 2 // Finesse size and position.
|
|
||||||
topMargin: 1
|
topMargin: 1
|
||||||
bottomMargin: 1
|
bottomMargin: 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue