mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-01 23:21:13 +02:00
Put Running Scripts content into sections
This commit is contained in:
parent
3c1561cc06
commit
386a247f78
6 changed files with 93 additions and 21 deletions
65
interface/resources/qml/controls-uit/StaticSection.qml
Normal file
65
interface/resources/qml/controls-uit/StaticSection.qml
Normal file
|
@ -0,0 +1,65 @@
|
|||
//
|
||||
// StaticSection.qml
|
||||
//
|
||||
// Created by David Rowe on 16 Feb 2016
|
||||
// Copyright 2016 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
import QtQuick 2.5
|
||||
|
||||
import "../styles-uit"
|
||||
|
||||
Column {
|
||||
property string name: "Static Section"
|
||||
property bool hasSeparator: false
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: hifi.dimensions.contentMargin.x
|
||||
right: parent.right
|
||||
rightMargin: hifi.dimensions.contentMargin.x
|
||||
}
|
||||
|
||||
VerticalSpacer { }
|
||||
|
||||
Item {
|
||||
visible: hasSeparator
|
||||
anchors.top: sectionName.top
|
||||
|
||||
Rectangle {
|
||||
width: frame.width
|
||||
height: 1
|
||||
color: hifi.colors.baseGrayShadow
|
||||
x: -hifi.dimensions.contentMargin.x
|
||||
anchors.bottom: highlight.top
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: highlight
|
||||
width: frame.width
|
||||
height: 1
|
||||
color: hifi.colors.baseGrayHighlight
|
||||
x: -hifi.dimensions.contentMargin.x
|
||||
anchors.bottom: parent.top
|
||||
}
|
||||
}
|
||||
|
||||
RalewayRegular {
|
||||
id: sectionName
|
||||
text: parent.name
|
||||
size: 11
|
||||
font.capitalization: Font.AllUppercase
|
||||
color: hifi.colors.lightGrayText
|
||||
verticalAlignment: Text.AlignBottom
|
||||
height: {
|
||||
if (hasSeparator) {
|
||||
hifi.dimensions.contentMargin.y
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VerticalSpacer { }
|
||||
}
|
18
interface/resources/qml/controls-uit/VerticalSpacer.qml
Normal file
18
interface/resources/qml/controls-uit/VerticalSpacer.qml
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// VerticalSpacer.qml
|
||||
//
|
||||
// Created by David Rowe on 16 Feb 2016
|
||||
// Copyright 2016 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
import QtQuick 2.5
|
||||
|
||||
import "../styles-uit"
|
||||
|
||||
Item {
|
||||
width: 1 // Must be non-zero
|
||||
height: hifi.dimensions.contentMargin.y
|
||||
}
|
|
@ -79,17 +79,10 @@ Window {
|
|||
scripts.stopAllScripts();
|
||||
}
|
||||
|
||||
//Item {
|
||||
Column {
|
||||
|
||||
Column {
|
||||
|
||||
Text {
|
||||
id: title
|
||||
font.bold: true
|
||||
font.pointSize: 16
|
||||
color: "#0e7077"
|
||||
text: "Currently Running"
|
||||
}
|
||||
HifiControls.StaticSection {
|
||||
name: "Currently Running"
|
||||
|
||||
Row {
|
||||
id: allButtons
|
||||
|
@ -162,14 +155,11 @@ Window {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: loadLabel
|
||||
text: "Load Scripts"
|
||||
font.bold: true
|
||||
font.pointSize: 16
|
||||
color: "#0e7077"
|
||||
}
|
||||
HifiControls.StaticSection {
|
||||
name: "Load Scripts"
|
||||
hasSeparator: true
|
||||
|
||||
Row {
|
||||
id: row1
|
||||
|
@ -281,6 +271,6 @@ Window {
|
|||
onClicked: root.loadScript(selectedScript.text)
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ Item {
|
|||
id: dimensions
|
||||
readonly property real borderRadius: Screen.width >= 1920 && Screen.height >= 1080 ? 7.5 : 5.0
|
||||
readonly property real borderWidth: Screen.width >= 1920 && Screen.height >= 1080 ? 2 : 1
|
||||
readonly property vector2d contentMargin: Qt.vector2d(12, 24)
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -86,7 +86,7 @@ Frame {
|
|||
id: titleText
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: frameMarginLeft + window.contentMarginLeft
|
||||
leftMargin: frameMarginLeft + hifi.dimensions.contentMargin.x
|
||||
right: controlsRow.left
|
||||
rightMargin: iconSize
|
||||
top: parent.top
|
||||
|
|
|
@ -51,8 +51,6 @@ Fadable {
|
|||
// property bool pinned: false
|
||||
property bool resizable: false
|
||||
|
||||
readonly property int contentMarginLeft: 12
|
||||
readonly property int contentMarginRight: 12
|
||||
property vector2d minSize: Qt.vector2d(100, 100)
|
||||
property vector2d maxSize: Qt.vector2d(1280, 720)
|
||||
|
||||
|
|
Loading…
Reference in a new issue