mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:09:52 +02:00
Window fixup
This commit is contained in:
parent
30a6dd8629
commit
6fecb4e1d1
5 changed files with 38 additions and 14 deletions
|
@ -27,6 +27,8 @@ Window {
|
||||||
implicitWidth: 384; implicitHeight: 640
|
implicitWidth: 384; implicitHeight: 640
|
||||||
minSize: Qt.vector2d(200, 300)
|
minSize: Qt.vector2d(200, 300)
|
||||||
|
|
||||||
|
colorScheme: hifi.colorSchemes.light
|
||||||
|
|
||||||
HifiConstants { id: hifi }
|
HifiConstants { id: hifi }
|
||||||
|
|
||||||
property var scripts: ScriptDiscoveryService;
|
property var scripts: ScriptDiscoveryService;
|
||||||
|
@ -54,6 +56,8 @@ Window {
|
||||||
|
|
||||||
HifiControls.ContentSection {
|
HifiControls.ContentSection {
|
||||||
name: "Asset Directory"
|
name: "Asset Directory"
|
||||||
|
spacing: hifi.dimensions.contentSpacing.y
|
||||||
|
colorScheme: root.colorScheme
|
||||||
isFirst: true
|
isFirst: true
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
@ -64,6 +68,7 @@ Window {
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
text: "<"
|
text: "<"
|
||||||
color: hifi.buttons.white
|
color: hifi.buttons.white
|
||||||
|
colorScheme: root.colorScheme
|
||||||
height: 26
|
height: 26
|
||||||
width: 26
|
width: 26
|
||||||
}
|
}
|
||||||
|
@ -71,6 +76,7 @@ Window {
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
text: "O"
|
text: "O"
|
||||||
color: hifi.buttons.white
|
color: hifi.buttons.white
|
||||||
|
colorScheme: root.colorScheme
|
||||||
height: 26
|
height: 26
|
||||||
width: 26
|
width: 26
|
||||||
}
|
}
|
||||||
|
@ -88,6 +94,7 @@ Window {
|
||||||
|
|
||||||
text: "DELETE SELECTION"
|
text: "DELETE SELECTION"
|
||||||
color: hifi.buttons.red
|
color: hifi.buttons.red
|
||||||
|
colorScheme: root.colorScheme
|
||||||
height: 26
|
height: 26
|
||||||
width: 130
|
width: 130
|
||||||
}
|
}
|
||||||
|
@ -97,14 +104,16 @@ Window {
|
||||||
id: treeView
|
id: treeView
|
||||||
height: 155
|
height: 155
|
||||||
treeModel: scriptsModel
|
treeModel: scriptsModel
|
||||||
colorScheme: hifi.colorSchemes.light
|
colorScheme: root.colorScheme
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.ContentSection {
|
HifiControls.ContentSection {
|
||||||
name: "Upload File"
|
name: ""
|
||||||
|
spacing: hifi.dimensions.contentSpacing.y
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
|
||||||
HifiControls.TextField {
|
HifiControls.TextField {
|
||||||
id: fileUrl
|
id: fileUrl
|
||||||
|
@ -112,8 +121,9 @@ Window {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: chooseButton.width + hifi.dimensions.contentSpacing.x
|
anchors.rightMargin: chooseButton.width + hifi.dimensions.contentSpacing.x
|
||||||
|
|
||||||
label: "Paste URL or choose file"
|
label: "Upload File"
|
||||||
colorScheme: hifi.colorSchemes.light
|
placeholderText: "Paste URL or choose file"
|
||||||
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -128,13 +138,14 @@ Window {
|
||||||
|
|
||||||
text: "Choose"
|
text: "Choose"
|
||||||
color: hifi.buttons.white
|
color: hifi.buttons.white
|
||||||
|
colorScheme: root.colorScheme
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
width: 100
|
width: 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
HifiControls.CheckBox {
|
||||||
id: addToScene
|
id: addToScene
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
@ -156,6 +167,7 @@ Window {
|
||||||
|
|
||||||
text: "Upload"
|
text: "Upload"
|
||||||
color: hifi.buttons.blue
|
color: hifi.buttons.blue
|
||||||
|
colorScheme: root.colorScheme
|
||||||
enabled: true
|
enabled: true
|
||||||
height: 30
|
height: 30
|
||||||
width: 155
|
width: 155
|
||||||
|
|
|
@ -14,10 +14,12 @@ import QtGraphicalEffects 1.0
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
property string name: "Static Section"
|
property string name: "Content Section"
|
||||||
property bool isFirst: false
|
property bool isFirst: false
|
||||||
property bool isCollapsible: false // Set at creation.
|
property bool isCollapsible: false // Set at creation.
|
||||||
property bool isCollapsed: false
|
property bool isCollapsed: false
|
||||||
|
property int colorScheme: hifi.colorSchemes.light
|
||||||
|
readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light
|
||||||
|
|
||||||
spacing: 0 // Defer spacing decisions to individual controls.
|
spacing: 0 // Defer spacing decisions to individual controls.
|
||||||
|
|
||||||
|
@ -60,14 +62,14 @@ Column {
|
||||||
id: shadow
|
id: shadow
|
||||||
width: frame.width
|
width: frame.width
|
||||||
height: 1
|
height: 1
|
||||||
color: hifi.colors.baseGrayShadow
|
color: hifi.colors.sectionSeparator1[colorScheme]
|
||||||
x: -hifi.dimensions.contentMargin.x
|
x: -hifi.dimensions.contentMargin.x
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: frame.width
|
width: frame.width
|
||||||
height: 1
|
height: 1
|
||||||
color: hifi.colors.baseGrayHighlight
|
color: hifi.colors.sectionSeparator2[colorScheme]
|
||||||
x: -hifi.dimensions.contentMargin.x
|
x: -hifi.dimensions.contentMargin.x
|
||||||
anchors.top: shadow.bottom
|
anchors.top: shadow.bottom
|
||||||
}
|
}
|
||||||
|
@ -104,7 +106,7 @@ Column {
|
||||||
y: -2
|
y: -2
|
||||||
size: hifi.fontSizes.disclosureButton
|
size: hifi.fontSizes.disclosureButton
|
||||||
text: isCollapsed ? hifi.glyphs.disclosureButtonExpand : hifi.glyphs.disclosureButtonCollapse
|
text: isCollapsed ? hifi.glyphs.disclosureButtonExpand : hifi.glyphs.disclosureButtonCollapse
|
||||||
color: hifi.colors.lightGrayText
|
color: title.color
|
||||||
visible: isCollapsible
|
visible: isCollapsible
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,8 +126,8 @@ Column {
|
||||||
start: Qt.point(0, 0)
|
start: Qt.point(0, 0)
|
||||||
end: Qt.point(0, 4)
|
end: Qt.point(0, 4)
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
GradientStop { position: 0.0; color: hifi.colors.darkGray }
|
GradientStop { position: 0.0; color: hifi.colors.sectionGradiantStart[colorScheme] }
|
||||||
GradientStop { position: 1.0; color: hifi.colors.baseGray } // Equivalent of darkGray0 over baseGray background.
|
GradientStop { position: 1.0; color: hifi.colors.sectionGradiantFinish[colorScheme] } // Equivalent of darkGray0 over baseGray background.
|
||||||
}
|
}
|
||||||
cached: true
|
cached: true
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ TextField {
|
||||||
: (textField.focus ? hifi.colors.white : hifi.colors.lightGrayText)
|
: (textField.focus ? hifi.colors.white : hifi.colors.lightGrayText)
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: isLightColorScheme
|
color: isLightColorScheme
|
||||||
? (textField.focus ? hifi.colors.white : hifi.colors.lightGray)
|
? (textField.focus ? hifi.colors.white : hifi.colors.textFieldLightBackground)
|
||||||
: (textField.focus ? hifi.colors.black : hifi.colors.baseGrayShadow)
|
: (textField.focus ? hifi.colors.black : hifi.colors.baseGrayShadow)
|
||||||
border.color: hifi.colors.primaryHighlight
|
border.color: hifi.colors.primaryHighlight
|
||||||
border.width: textField.focus ? 1 : 0
|
border.width: textField.focus ? 1 : 0
|
||||||
|
|
|
@ -83,6 +83,13 @@ Item {
|
||||||
readonly property color dropDownLightFinish: "#afafaf"
|
readonly property color dropDownLightFinish: "#afafaf"
|
||||||
readonly property color dropDownDarkStart: "#7d7d7d"
|
readonly property color dropDownDarkStart: "#7d7d7d"
|
||||||
readonly property color dropDownDarkFinish: "#6b6a6b"
|
readonly property color dropDownDarkFinish: "#6b6a6b"
|
||||||
|
readonly property color textFieldLightBackground: "#d4d4d4"
|
||||||
|
readonly property color sectionSeparator1: [ baseGrayHighlight, baseGrayShadow]
|
||||||
|
readonly property color sectionSeparator2: [ white, baseGrayHighlight]
|
||||||
|
readonly property color sectiongGradiantStart: [ darkGray, darkGray]
|
||||||
|
readonly property color sectionGradiantFinish: [ darkGray0, darkGray0]
|
||||||
|
readonly property color backgroundLight: faintGray
|
||||||
|
readonly property color backgroundDark: baseGray
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
@ -52,6 +52,9 @@ Fadable {
|
||||||
// property bool pinned: false
|
// property bool pinned: false
|
||||||
property bool resizable: false
|
property bool resizable: false
|
||||||
|
|
||||||
|
property int colorScheme: hifi.colorSchemes.dark
|
||||||
|
readonly property int isLightScheme: colorScheme == hifi.colorSchemes.light
|
||||||
|
|
||||||
property vector2d minSize: Qt.vector2d(100, 100)
|
property vector2d minSize: Qt.vector2d(100, 100)
|
||||||
property vector2d maxSize: Qt.vector2d(1280, 720)
|
property vector2d maxSize: Qt.vector2d(1280, 720)
|
||||||
|
|
||||||
|
@ -137,7 +140,7 @@ Fadable {
|
||||||
id: contentBackground
|
id: contentBackground
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.rightMargin: parent.isScrolling ? 11 : 0
|
anchors.rightMargin: parent.isScrolling ? 11 : 0
|
||||||
color: hifi.colors.baseGray
|
color: isLightScheme ? hifi.colors.backgroundLight : hifi.colors.backgroundDark
|
||||||
visible: modality != Qt.ApplicationModal
|
visible: modality != Qt.ApplicationModal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +220,7 @@ Fadable {
|
||||||
}
|
}
|
||||||
width: parent.contentWidth
|
width: parent.contentWidth
|
||||||
height: footer.height + 2 * hifi.dimensions.contentSpacing.y
|
height: footer.height + 2 * hifi.dimensions.contentSpacing.y
|
||||||
color: hifi.colors.baseGray
|
color: isLightScheme ? hifi.colors.backgroundLight : hifi.colors.backgroundDark
|
||||||
visible: footer.height > 0
|
visible: footer.height > 0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
Loading…
Reference in a new issue