mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:24:24 +02:00
commit
46a741be7b
155 changed files with 1169 additions and 1271 deletions
|
@ -1,6 +1,4 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
|
|
||||||
import "../../qml/dialogs"
|
import "../../qml/dialogs"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import QtQuick.Dialogs 1.1
|
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
import "../../qml/dialogs"
|
import "../../qml/dialogs"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4 as Controls
|
|
||||||
|
|
||||||
import "../../qml/controls-uit"
|
import "../../qml/controls-uit"
|
||||||
import "../../qml/styles-uit"
|
import "../../qml/styles-uit"
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4 as Controls
|
|
||||||
|
|
||||||
import "../../qml/controls-uit"
|
import "../../qml/controls-uit"
|
||||||
import "../../qml/styles-uit"
|
import "../../qml/styles-uit"
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
|
|
||||||
import "../../qml/controls-uit"
|
import "../../qml/controls-uit"
|
||||||
import "../../qml/styles-uit"
|
import "../../qml/styles-uit"
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
|
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import QtQuick.Controls 1.3
|
|
||||||
import QtGraphicalEffects 1.0
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
|
|
||||||
import "./hifi/audio" as HifiAudio
|
import "./hifi/audio" as HifiAudio
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.2
|
|
||||||
import QtWebChannel 1.0
|
import QtWebChannel 1.0
|
||||||
import QtWebEngine 1.5
|
import QtWebEngine 1.5
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBoxQQC2 {
|
CheckBox {
|
||||||
id: showPassword
|
id: showPassword
|
||||||
text: "Show password"
|
text: "Show password"
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
import Hifi 1.0
|
import Hifi 1.0
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
import QtQuick.Controls.Styles 1.4 as OriginalStyles
|
|
||||||
|
|
||||||
import "../controls-uit"
|
import "../controls-uit"
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
import Hifi 1.0
|
import Hifi 1.0
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
import QtQuick.Controls.Styles 1.4 as OriginalStyles
|
|
||||||
|
|
||||||
import "../controls-uit"
|
import "../controls-uit"
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtWebEngine 1.1
|
import QtWebEngine 1.1
|
||||||
import QtWebChannel 1.0
|
import QtWebChannel 1.0
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
|
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtWebChannel 1.0
|
|
||||||
import QtWebEngine 1.2
|
|
||||||
import QtWebSockets 1.0
|
|
||||||
|
|
||||||
import "windows" as Windows
|
import "windows" as Windows
|
||||||
import "controls"
|
import "controls"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 1.2
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
color: "white";
|
color: "white";
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 1.2
|
|
||||||
import '.'
|
import '.'
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtWebChannel 1.0
|
import QtWebChannel 1.0
|
||||||
import QtWebEngine 1.5
|
import QtWebEngine 1.5
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
import "controls" as Controls
|
import "controls" as Controls
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
import "hydra"
|
import "hydra"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
import "xbox"
|
import "xbox"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
import "xbox"
|
import "xbox"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.0
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
import QtQuick.Dialogs 1.0
|
|
||||||
|
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
|
|
|
@ -8,15 +8,14 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4 as Original
|
import QtQuick.Controls 2.3 as Original
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import TabletScriptingInterface 1.0
|
import TabletScriptingInterface 1.0
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
Original.Button {
|
Original.Button {
|
||||||
id: root;
|
id: control;
|
||||||
|
|
||||||
property int color: 0
|
property int color: 0
|
||||||
property int colorScheme: hifi.colorSchemes.light
|
property int colorScheme: hifi.colorSchemes.light
|
||||||
|
@ -38,88 +37,86 @@ Original.Button {
|
||||||
Tablet.playSound(TabletEnums.ButtonHover);
|
Tablet.playSound(TabletEnums.ButtonHover);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Tablet.playSound(TabletEnums.ButtonClick);
|
Tablet.playSound(TabletEnums.ButtonClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
style: ButtonStyle {
|
background: Rectangle {
|
||||||
|
radius: hifi.buttons.radius
|
||||||
|
|
||||||
background: Rectangle {
|
border.width: (control.color === hifi.buttons.none ||
|
||||||
radius: hifi.buttons.radius
|
(control.color === hifi.buttons.noneBorderless && control.hovered) ||
|
||||||
|
(control.color === hifi.buttons.noneBorderlessWhite && control.hovered) ||
|
||||||
|
(control.color === hifi.buttons.noneBorderlessGray && control.hovered)) ? 1 : 0;
|
||||||
|
border.color: control.color === hifi.buttons.noneBorderless ? hifi.colors.blueHighlight :
|
||||||
|
(control.color === hifi.buttons.noneBorderlessGray ? hifi.colors.baseGray : hifi.colors.white);
|
||||||
|
|
||||||
border.width: (control.color === hifi.buttons.none ||
|
gradient: Gradient {
|
||||||
(control.color === hifi.buttons.noneBorderless && control.hovered) ||
|
GradientStop {
|
||||||
(control.color === hifi.buttons.noneBorderlessWhite && control.hovered) ||
|
position: 0.2
|
||||||
(control.color === hifi.buttons.noneBorderlessGray && control.hovered)) ? 1 : 0;
|
color: {
|
||||||
border.color: control.color === hifi.buttons.noneBorderless ? hifi.colors.blueHighlight :
|
if (!control.enabled) {
|
||||||
(control.color === hifi.buttons.noneBorderlessGray ? hifi.colors.baseGray : hifi.colors.white);
|
hifi.buttons.disabledColorStart[control.colorScheme]
|
||||||
|
} else if (control.pressed) {
|
||||||
gradient: Gradient {
|
hifi.buttons.pressedColor[control.color]
|
||||||
GradientStop {
|
} else if (control.hovered) {
|
||||||
position: 0.2
|
hifi.buttons.hoveredColor[control.color]
|
||||||
color: {
|
|
||||||
if (!control.enabled) {
|
|
||||||
hifi.buttons.disabledColorStart[control.colorScheme]
|
|
||||||
} else if (control.pressed) {
|
|
||||||
hifi.buttons.pressedColor[control.color]
|
|
||||||
} else if (control.hovered) {
|
|
||||||
hifi.buttons.hoveredColor[control.color]
|
|
||||||
} else if (!control.hovered && control.focus) {
|
} else if (!control.hovered && control.focus) {
|
||||||
hifi.buttons.focusedColor[control.color]
|
hifi.buttons.focusedColor[control.color]
|
||||||
} else {
|
} else {
|
||||||
hifi.buttons.colorStart[control.color]
|
hifi.buttons.colorStart[control.color]
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GradientStop {
|
}
|
||||||
position: 1.0
|
GradientStop {
|
||||||
color: {
|
position: 1.0
|
||||||
if (!control.enabled) {
|
color: {
|
||||||
hifi.buttons.disabledColorFinish[control.colorScheme]
|
if (!control.enabled) {
|
||||||
} else if (control.pressed) {
|
hifi.buttons.disabledColorFinish[control.colorScheme]
|
||||||
hifi.buttons.pressedColor[control.color]
|
} else if (control.pressed) {
|
||||||
} else if (control.hovered) {
|
hifi.buttons.pressedColor[control.color]
|
||||||
hifi.buttons.hoveredColor[control.color]
|
} else if (control.hovered) {
|
||||||
|
hifi.buttons.hoveredColor[control.color]
|
||||||
} else if (!control.hovered && control.focus) {
|
} else if (!control.hovered && control.focus) {
|
||||||
hifi.buttons.focusedColor[control.color]
|
hifi.buttons.focusedColor[control.color]
|
||||||
} else {
|
} else {
|
||||||
hifi.buttons.colorFinish[control.color]
|
hifi.buttons.colorFinish[control.color]
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
label: Item {
|
|
||||||
HiFiGlyphs {
|
contentItem: Item {
|
||||||
id: buttonGlyph;
|
HiFiGlyphs {
|
||||||
visible: root.buttonGlyph !== "";
|
id: buttonGlyph;
|
||||||
text: root.buttonGlyph === "" ? hifi.glyphs.question : root.buttonGlyph;
|
visible: control.buttonGlyph !== "";
|
||||||
// Size
|
text: control.buttonGlyph === "" ? hifi.glyphs.question : control.buttonGlyph;
|
||||||
size: 34;
|
// Size
|
||||||
// Anchors
|
size: 34;
|
||||||
anchors.right: buttonText.left;
|
// Anchors
|
||||||
anchors.top: parent.top;
|
anchors.right: buttonText.left;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.top: parent.top;
|
||||||
// Style
|
anchors.bottom: parent.bottom;
|
||||||
color: enabled ? hifi.buttons.textColor[control.color]
|
// Style
|
||||||
: hifi.buttons.disabledTextColor[control.colorScheme];
|
color: enabled ? hifi.buttons.textColor[control.color]
|
||||||
// Alignment
|
: hifi.buttons.disabledTextColor[control.colorScheme];
|
||||||
horizontalAlignment: Text.AlignHCenter;
|
// Alignment
|
||||||
verticalAlignment: Text.AlignVCenter;
|
horizontalAlignment: Text.AlignHCenter;
|
||||||
}
|
verticalAlignment: Text.AlignVCenter;
|
||||||
RalewayBold {
|
}
|
||||||
id: buttonText;
|
RalewayBold {
|
||||||
anchors.centerIn: parent;
|
id: buttonText;
|
||||||
font.capitalization: Font.AllUppercase
|
anchors.centerIn: parent;
|
||||||
color: enabled ? hifi.buttons.textColor[control.color]
|
font.capitalization: Font.AllUppercase
|
||||||
: hifi.buttons.disabledTextColor[control.colorScheme]
|
color: enabled ? hifi.buttons.textColor[control.color]
|
||||||
size: hifi.fontSizes.buttonLabel
|
: hifi.buttons.disabledTextColor[control.colorScheme]
|
||||||
verticalAlignment: Text.AlignVCenter
|
size: hifi.fontSizes.buttonLabel
|
||||||
horizontalAlignment: Text.AlignHCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
text: control.text
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
text: control.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.2
|
||||||
import QtQuick.Controls 1.4 as Original
|
import QtQuick.Controls 2.2 as Original
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
|
@ -28,85 +27,89 @@ Original.CheckBox {
|
||||||
property bool wrap: true;
|
property bool wrap: true;
|
||||||
readonly property int checkSize: Math.max(boxSize - 8, 10)
|
readonly property int checkSize: Math.max(boxSize - 8, 10)
|
||||||
readonly property int checkRadius: 2
|
readonly property int checkRadius: 2
|
||||||
activeFocusOnPress: true
|
focusPolicy: Qt.ClickFocus
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Tablet.playSound(TabletEnums.ButtonClick);
|
Tablet.playSound(TabletEnums.ButtonClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: doesnt works for QQC1. check with QQC2
|
onHoveredChanged: {
|
||||||
// onHovered: {
|
if (hovered) {
|
||||||
// Tablet.playSound(TabletEnums.ButtonHover);
|
Tablet.playSound(TabletEnums.ButtonHover);
|
||||||
// }
|
|
||||||
|
|
||||||
style: CheckBoxStyle {
|
|
||||||
indicator: Rectangle {
|
|
||||||
id: box
|
|
||||||
implicitWidth: boxSize
|
|
||||||
implicitHeight: boxSize
|
|
||||||
radius: boxRadius
|
|
||||||
border.width: 1
|
|
||||||
border.color: pressed || hovered
|
|
||||||
? hifi.colors.checkboxCheckedBorder
|
|
||||||
: (checkBox.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish)
|
|
||||||
|
|
||||||
gradient: Gradient {
|
|
||||||
GradientStop {
|
|
||||||
position: 0.2
|
|
||||||
color: pressed || hovered
|
|
||||||
? (checkBox.isLightColorScheme ? hifi.colors.checkboxChecked : hifi.colors.checkboxLightStart)
|
|
||||||
: (checkBox.isLightColorScheme ? hifi.colors.checkboxLightStart : hifi.colors.checkboxDarkStart)
|
|
||||||
}
|
|
||||||
GradientStop {
|
|
||||||
position: 1.0
|
|
||||||
color: pressed || hovered
|
|
||||||
? (checkBox.isLightColorScheme ? hifi.colors.checkboxChecked : hifi.colors.checkboxLightFinish)
|
|
||||||
: (checkBox.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
visible: pressed || hovered
|
|
||||||
anchors.centerIn: parent
|
|
||||||
id: innerBox
|
|
||||||
width: checkSize - 4
|
|
||||||
height: width
|
|
||||||
radius: checkRadius
|
|
||||||
color: hifi.colors.checkboxCheckedBorder
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: check
|
|
||||||
width: checkSize
|
|
||||||
height: checkSize
|
|
||||||
radius: checkRadius
|
|
||||||
anchors.centerIn: parent
|
|
||||||
color: isRedCheck ? hifi.colors.checkboxCheckedRed : hifi.colors.checkboxChecked
|
|
||||||
border.width: 2
|
|
||||||
border.color: isRedCheck? hifi.colors.checkboxCheckedBorderRed : hifi.colors.checkboxCheckedBorder
|
|
||||||
visible: checked && !pressed || !checked && pressed
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: disabledOverlay
|
|
||||||
visible: !enabled
|
|
||||||
width: boxSize
|
|
||||||
height: boxSize
|
|
||||||
radius: boxRadius
|
|
||||||
border.width: 1
|
|
||||||
border.color: hifi.colors.baseGrayHighlight
|
|
||||||
color: hifi.colors.baseGrayHighlight
|
|
||||||
opacity: 0.5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
label: Label {
|
|
||||||
text: checkBox.text
|
|
||||||
color: checkBox.color
|
|
||||||
x: 2
|
|
||||||
wrapMode: checkBox.wrap ? Text.Wrap : Text.NoWrap
|
|
||||||
elide: checkBox.wrap ? Text.ElideNone : Text.ElideRight
|
|
||||||
enabled: checkBox.enabled
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
indicator: Rectangle {
|
||||||
|
id: box
|
||||||
|
implicitWidth: boxSize
|
||||||
|
implicitHeight: boxSize
|
||||||
|
radius: boxRadius
|
||||||
|
y: parent.height / 2 - height / 2
|
||||||
|
border.width: 1
|
||||||
|
border.color: pressed || hovered
|
||||||
|
? hifi.colors.checkboxCheckedBorder
|
||||||
|
: (checkBox.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish)
|
||||||
|
|
||||||
|
gradient: Gradient {
|
||||||
|
GradientStop {
|
||||||
|
position: 0.2
|
||||||
|
color: pressed || hovered
|
||||||
|
? (checkBox.isLightColorScheme ? hifi.colors.checkboxChecked : hifi.colors.checkboxLightStart)
|
||||||
|
: (checkBox.isLightColorScheme ? hifi.colors.checkboxLightStart : hifi.colors.checkboxDarkStart)
|
||||||
|
}
|
||||||
|
GradientStop {
|
||||||
|
position: 1.0
|
||||||
|
color: pressed || hovered
|
||||||
|
? (checkBox.isLightColorScheme ? hifi.colors.checkboxChecked : hifi.colors.checkboxLightFinish)
|
||||||
|
: (checkBox.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
visible: pressed || hovered
|
||||||
|
anchors.centerIn: parent
|
||||||
|
id: innerBox
|
||||||
|
width: checkSize - 4
|
||||||
|
height: width
|
||||||
|
radius: checkRadius
|
||||||
|
color: hifi.colors.checkboxCheckedBorder
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: check
|
||||||
|
width: checkSize
|
||||||
|
height: checkSize
|
||||||
|
radius: checkRadius
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: isRedCheck ? hifi.colors.checkboxCheckedRed : hifi.colors.checkboxChecked
|
||||||
|
border.width: 2
|
||||||
|
border.color: isRedCheck? hifi.colors.checkboxCheckedBorderRed : hifi.colors.checkboxCheckedBorder
|
||||||
|
visible: checked && !pressed || !checked && pressed
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: disabledOverlay
|
||||||
|
visible: !enabled
|
||||||
|
width: boxSize
|
||||||
|
height: boxSize
|
||||||
|
radius: boxRadius
|
||||||
|
border.width: 1
|
||||||
|
border.color: hifi.colors.baseGrayHighlight
|
||||||
|
color: hifi.colors.baseGrayHighlight
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: Label {
|
||||||
|
text: checkBox.text
|
||||||
|
color: checkBox.color
|
||||||
|
x: 2
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
wrapMode: checkBox.wrap ? Text.Wrap : Text.NoWrap
|
||||||
|
elide: checkBox.wrap ? Text.ElideNone : Text.ElideRight
|
||||||
|
enabled: checkBox.enabled
|
||||||
|
leftPadding: checkBox.indicator.width + checkBox.spacing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "../controls-uit" as HifiControls
|
import "../controls-uit" as HifiControls
|
||||||
|
@ -24,6 +23,7 @@ FocusScope {
|
||||||
property alias comboBox: comboBox
|
property alias comboBox: comboBox
|
||||||
readonly property alias currentText: comboBox.currentText;
|
readonly property alias currentText: comboBox.currentText;
|
||||||
property alias currentIndex: comboBox.currentIndex;
|
property alias currentIndex: comboBox.currentIndex;
|
||||||
|
property int currentHighLightedIndex: comboBox.currentIndex;
|
||||||
|
|
||||||
property int dropdownHeight: 480
|
property int dropdownHeight: 480
|
||||||
property int colorScheme: hifi.colorSchemes.light
|
property int colorScheme: hifi.colorSchemes.light
|
||||||
|
@ -40,196 +40,134 @@ FocusScope {
|
||||||
implicitHeight: comboBox.height;
|
implicitHeight: comboBox.height;
|
||||||
focus: true
|
focus: true
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: background
|
|
||||||
gradient: Gradient {
|
|
||||||
GradientStop {
|
|
||||||
position: 0.2
|
|
||||||
color: popup.visible
|
|
||||||
? (isLightColorScheme ? hifi.colors.dropDownPressedLight : hifi.colors.dropDownPressedDark)
|
|
||||||
: (isLightColorScheme ? hifi.colors.dropDownLightStart : hifi.colors.dropDownDarkStart)
|
|
||||||
}
|
|
||||||
GradientStop {
|
|
||||||
position: 1.0
|
|
||||||
color: popup.visible
|
|
||||||
? (isLightColorScheme ? hifi.colors.dropDownPressedLight : hifi.colors.dropDownPressedDark)
|
|
||||||
: (isLightColorScheme ? hifi.colors.dropDownLightFinish : hifi.colors.dropDownDarkFinish)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
|
||||||
|
|
||||||
SystemPalette { id: palette }
|
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: comboBox
|
id: comboBox
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: false
|
|
||||||
height: hifi.fontSizes.textFieldInput + 13 // Match height of TextField control.
|
|
||||||
}
|
|
||||||
|
|
||||||
FiraSansSemiBold {
|
|
||||||
id: textField
|
|
||||||
anchors {
|
|
||||||
left: parent.left
|
|
||||||
leftMargin: hifi.dimensions.textPadding
|
|
||||||
right: dropIcon.left
|
|
||||||
verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
size: hifi.fontSizes.textFieldInput
|
|
||||||
text: comboBox.currentText
|
|
||||||
elide: Text.ElideRight
|
|
||||||
color: controlHover.containsMouse || popup.visible ? hifi.colors.baseGray : (isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText )
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: dropIcon
|
|
||||||
anchors { right: parent.right; verticalCenter: parent.verticalCenter }
|
|
||||||
height: background.height
|
|
||||||
width: height
|
|
||||||
Rectangle {
|
|
||||||
width: 1
|
|
||||||
height: parent.height
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.left: parent.left
|
|
||||||
color: isLightColorScheme ? hifi.colors.faintGray : hifi.colors.baseGray
|
|
||||||
}
|
|
||||||
HiFiGlyphs {
|
|
||||||
anchors {
|
|
||||||
top: parent.top
|
|
||||||
topMargin: -11
|
|
||||||
horizontalCenter: parent.horizontalCenter
|
|
||||||
}
|
|
||||||
size: hifi.dimensions.spinnerSize
|
|
||||||
text: hifi.glyphs.caratDn
|
|
||||||
color: controlHover.containsMouse || popup.visible ? hifi.colors.baseGray : (isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: controlHover
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
visible: true
|
||||||
onClicked: toggleList();
|
height: hifi.fontSizes.textFieldInput + 13 // Match height of TextField control.
|
||||||
}
|
|
||||||
|
|
||||||
function toggleList() {
|
function previousItem() { root.currentHighLightedIndex = (root.currentHighLightedIndex + comboBox.count - 1) % comboBox.count; }
|
||||||
if (popup.visible) {
|
function nextItem() { root.currentHighLightedIndex = (root.currentHighLightedIndex + comboBox.count + 1) % comboBox.count; }
|
||||||
hideList();
|
function selectCurrentItem() { root.currentIndex = root.currentHighLightedIndex; close(); /*hideList();*/ }
|
||||||
} else {
|
function selectSpecificItem(index) { root.currentIndex = index; close();/*hideList();*/ }
|
||||||
showList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function showList() {
|
|
||||||
var r;
|
|
||||||
if (isDesktop) {
|
|
||||||
r = desktop.mapFromItem(root, 0, 0, root.width, root.height);
|
|
||||||
} else {
|
|
||||||
r = mapFromItem(root, 0, 0, root.width, root.height);
|
|
||||||
}
|
|
||||||
var y = r.y + r.height;
|
|
||||||
var bottom = y + scrollView.height;
|
|
||||||
var height = isDesktop ? desktop.height : tabletRoot.height;
|
|
||||||
if (bottom > height) {
|
|
||||||
y -= bottom - height + 8;
|
|
||||||
}
|
|
||||||
scrollView.x = r.x;
|
|
||||||
scrollView.y = y;
|
|
||||||
popup.visible = true;
|
|
||||||
popup.forceActiveFocus();
|
|
||||||
listView.currentIndex = root.currentIndex;
|
|
||||||
scrollView.hoverEnabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideList() {
|
|
||||||
popup.visible = false;
|
|
||||||
scrollView.hoverEnabled = false;
|
|
||||||
root.accepted();
|
|
||||||
}
|
|
||||||
|
|
||||||
FocusScope {
|
|
||||||
id: popup
|
|
||||||
parent: isDesktop ? desktop : root
|
|
||||||
anchors.fill: parent
|
|
||||||
z: isDesktop ? desktop.zLevels.menu : 12
|
|
||||||
visible: false
|
|
||||||
focus: true
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: hideList();
|
|
||||||
}
|
|
||||||
|
|
||||||
function previousItem() { listView.currentIndex = (listView.currentIndex + listView.count - 1) % listView.count; }
|
|
||||||
function nextItem() { listView.currentIndex = (listView.currentIndex + listView.count + 1) % listView.count; }
|
|
||||||
function selectCurrentItem() { root.currentIndex = listView.currentIndex; hideList(); }
|
|
||||||
function selectSpecificItem(index) { root.currentIndex = index; hideList(); }
|
|
||||||
|
|
||||||
Keys.onUpPressed: previousItem();
|
Keys.onUpPressed: previousItem();
|
||||||
Keys.onDownPressed: nextItem();
|
Keys.onDownPressed: nextItem();
|
||||||
Keys.onSpacePressed: selectCurrentItem();
|
Keys.onSpacePressed: selectCurrentItem();
|
||||||
Keys.onRightPressed: selectCurrentItem();
|
Keys.onRightPressed: selectCurrentItem();
|
||||||
Keys.onReturnPressed: selectCurrentItem();
|
Keys.onReturnPressed: selectCurrentItem();
|
||||||
Keys.onEscapePressed: hideList();
|
|
||||||
|
|
||||||
ScrollView {
|
background: Rectangle {
|
||||||
id: scrollView
|
gradient: Gradient {
|
||||||
height: root.dropdownHeight
|
GradientStop {
|
||||||
|
position: 0.2
|
||||||
|
color: comboBox.popup.visible
|
||||||
|
? (isLightColorScheme ? hifi.colors.dropDownPressedLight : hifi.colors.dropDownPressedDark)
|
||||||
|
: (isLightColorScheme ? hifi.colors.dropDownLightStart : hifi.colors.dropDownDarkStart)
|
||||||
|
}
|
||||||
|
GradientStop {
|
||||||
|
position: 1.0
|
||||||
|
color: comboBox.popup.visible
|
||||||
|
? (isLightColorScheme ? hifi.colors.dropDownPressedLight : hifi.colors.dropDownPressedDark)
|
||||||
|
: (isLightColorScheme ? hifi.colors.dropDownLightFinish : hifi.colors.dropDownDarkFinish)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
indicator: Item {
|
||||||
|
id: dropIcon
|
||||||
|
anchors { right: parent.right; verticalCenter: parent.verticalCenter }
|
||||||
|
height: root.height
|
||||||
|
width: height
|
||||||
|
Rectangle {
|
||||||
|
width: 1
|
||||||
|
height: parent.height
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
color: isLightColorScheme ? hifi.colors.faintGray : hifi.colors.baseGray
|
||||||
|
}
|
||||||
|
HiFiGlyphs {
|
||||||
|
anchors { top: parent.top; topMargin: -11; horizontalCenter: parent.horizontalCenter }
|
||||||
|
size: hifi.dimensions.spinnerSize
|
||||||
|
text: hifi.glyphs.caratDn
|
||||||
|
color: comboBox.hovered || comboBox.popup.visible ? hifi.colors.baseGray : (isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: FiraSansSemiBold {
|
||||||
|
id: textField
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: hifi.dimensions.textPadding
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
size: hifi.fontSizes.textFieldInput
|
||||||
|
text: comboBox.currentText
|
||||||
|
elide: Text.ElideRight
|
||||||
|
color: comboBox.hovered || comboBox.popup.visible ? hifi.colors.baseGray : (isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText )
|
||||||
|
}
|
||||||
|
|
||||||
|
delegate: ItemDelegate {
|
||||||
|
id: itemDelegate
|
||||||
|
hoverEnabled: true
|
||||||
width: root.width + 4
|
width: root.width + 4
|
||||||
property bool hoverEnabled: false;
|
height: popupText.implicitHeight * 1.4
|
||||||
|
highlighted: root.currentHighLightedIndex == index
|
||||||
|
|
||||||
style: ScrollViewStyle {
|
onHoveredChanged: {
|
||||||
decrementControl: Item {
|
if (hovered) {
|
||||||
visible: false
|
root.currentHighLightedIndex = index
|
||||||
}
|
|
||||||
incrementControl: Item {
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
scrollBarBackground: Rectangle{
|
|
||||||
implicitWidth: 20
|
|
||||||
color: hifi.colors.baseGray
|
|
||||||
}
|
|
||||||
|
|
||||||
handle:
|
|
||||||
Rectangle {
|
|
||||||
implicitWidth: 16
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 3
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
radius: 6
|
|
||||||
color: hifi.colors.lightGrayText
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
background: Rectangle {
|
||||||
|
color: itemDelegate.highlighted ? hifi.colors.primaryHighlight
|
||||||
|
: (isLightColorScheme ? hifi.colors.dropDownPressedLight
|
||||||
|
: hifi.colors.dropDownPressedDark)
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: FiraSansSemiBold {
|
||||||
|
id: popupText
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: hifi.dimensions.textPadding
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
text: comboBox.model[index] ? comboBox.model[index]
|
||||||
|
: (comboBox.model.get && comboBox.model.get(index).text ?
|
||||||
|
comboBox.model.get(index).text : "")
|
||||||
|
size: hifi.fontSizes.textFieldInput
|
||||||
|
color: hifi.colors.baseGray
|
||||||
|
}
|
||||||
|
}
|
||||||
|
popup: Popup {
|
||||||
|
y: comboBox.height - 1
|
||||||
|
width: comboBox.width
|
||||||
|
implicitHeight: listView.contentHeight > dropdownHeight ? dropdownHeight
|
||||||
|
: listView.contentHeight
|
||||||
|
padding: 0
|
||||||
|
topPadding: 1
|
||||||
|
|
||||||
|
onClosed: {
|
||||||
|
root.accepted()
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: ListView {
|
||||||
id: listView
|
id: listView
|
||||||
height: textField.height * count * 1.4
|
clip: true
|
||||||
model: root.model
|
model: comboBox.popup.visible ? comboBox.delegateModel : null
|
||||||
delegate: Rectangle {
|
currentIndex: root.currentHighLightedIndex
|
||||||
width: root.width + 4
|
delegate: comboBox.delegate
|
||||||
height: popupText.implicitHeight * 1.4
|
ScrollBar.vertical: HifiControls.ScrollBar {
|
||||||
color: (listView.currentIndex === index) ? hifi.colors.primaryHighlight :
|
id: scrollbar
|
||||||
(isLightColorScheme ? hifi.colors.dropDownPressedLight : hifi.colors.dropDownPressedDark)
|
parent: listView
|
||||||
FiraSansSemiBold {
|
policy: ScrollBar.AsNeeded
|
||||||
anchors.left: parent.left
|
visible: size < 1.0
|
||||||
anchors.leftMargin: hifi.dimensions.textPadding
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
id: popupText
|
|
||||||
text: listView.model[index] ? listView.model[index] : (listView.model.get && listView.model.get(index).text ? listView.model.get(index).text : "")
|
|
||||||
size: hifi.fontSizes.textFieldInput
|
|
||||||
color: hifi.colors.baseGray
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
id: popupHover
|
|
||||||
anchors.fill: parent;
|
|
||||||
hoverEnabled: scrollView.hoverEnabled;
|
|
||||||
onEntered: listView.currentIndex = index;
|
|
||||||
onClicked: popup.selectSpecificItem(index);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: hifi.colors.baseGray
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,15 +8,14 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import QtQuick 2.7
|
||||||
import QtQuick 2.5
|
import QtQuick.Controls 2.2 as Original
|
||||||
import QtQuick.Controls 1.4 as Original
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import TabletScriptingInterface 1.0
|
import TabletScriptingInterface 1.0
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
Original.Button {
|
Original.Button {
|
||||||
|
id: control
|
||||||
property int color: 0
|
property int color: 0
|
||||||
property int colorScheme: hifi.colorSchemes.light
|
property int colorScheme: hifi.colorSchemes.light
|
||||||
property string glyph: ""
|
property string glyph: ""
|
||||||
|
@ -41,59 +40,52 @@ Original.Button {
|
||||||
Tablet.playSound(TabletEnums.ButtonClick);
|
Tablet.playSound(TabletEnums.ButtonClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
style: ButtonStyle {
|
background: Rectangle {
|
||||||
|
radius: hifi.buttons.radius
|
||||||
|
|
||||||
background: Rectangle {
|
gradient: Gradient {
|
||||||
radius: hifi.buttons.radius
|
GradientStop {
|
||||||
|
position: 0.2
|
||||||
gradient: Gradient {
|
color: {
|
||||||
GradientStop {
|
if (!control.enabled) {
|
||||||
position: 0.2
|
hifi.buttons.disabledColorStart[control.colorScheme]
|
||||||
color: {
|
} else if (control.pressed) {
|
||||||
if (!control.enabled) {
|
hifi.buttons.pressedColor[control.color]
|
||||||
hifi.buttons.disabledColorStart[control.colorScheme]
|
} else if (control.hovered) {
|
||||||
} else if (control.pressed) {
|
hifi.buttons.hoveredColor[control.color]
|
||||||
hifi.buttons.pressedColor[control.color]
|
|
||||||
} else if (control.hovered) {
|
|
||||||
hifi.buttons.hoveredColor[control.color]
|
|
||||||
} else if (!control.hovered && control.focus) {
|
} else if (!control.hovered && control.focus) {
|
||||||
hifi.buttons.focusedColor[control.color]
|
hifi.buttons.focusedColor[control.color]
|
||||||
} else {
|
} else {
|
||||||
hifi.buttons.colorStart[control.color]
|
hifi.buttons.colorStart[control.color]
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
GradientStop {
|
|
||||||
position: 1.0
|
|
||||||
color: {
|
|
||||||
if (!control.enabled) {
|
|
||||||
hifi.buttons.disabledColorFinish[control.colorScheme]
|
|
||||||
} else if (control.pressed) {
|
|
||||||
hifi.buttons.pressedColor[control.color]
|
|
||||||
} else if (control.hovered) {
|
|
||||||
hifi.buttons.hoveredColor[control.color]
|
|
||||||
} else if (!control.hovered && control.focus) {
|
|
||||||
hifi.buttons.focusedColor[control.color]
|
|
||||||
} else {
|
|
||||||
hifi.buttons.colorFinish[control.color]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
GradientStop {
|
||||||
|
position: 1.0
|
||||||
label: HiFiGlyphs {
|
color: {
|
||||||
color: enabled ? hifi.buttons.textColor[control.color]
|
if (!control.enabled) {
|
||||||
: hifi.buttons.disabledTextColor[control.colorScheme]
|
hifi.buttons.disabledColorFinish[control.colorScheme]
|
||||||
verticalAlignment: Text.AlignVCenter
|
} else if (control.pressed) {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
hifi.buttons.pressedColor[control.color]
|
||||||
anchors {
|
} else if (control.hovered) {
|
||||||
// Tweak horizontal alignment so that it looks right.
|
hifi.buttons.hoveredColor[control.color]
|
||||||
left: parent.left
|
} else if (!control.hovered && control.focus) {
|
||||||
leftMargin: -0.5
|
hifi.buttons.focusedColor[control.color]
|
||||||
|
} else {
|
||||||
|
hifi.buttons.colorFinish[control.color]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
text: control.glyph
|
|
||||||
size: control.size
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
contentItem: HiFiGlyphs {
|
||||||
|
color: enabled ? hifi.buttons.textColor[control.color]
|
||||||
|
: hifi.buttons.disabledTextColor[control.colorScheme]
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: control.glyph
|
||||||
|
size: control.size
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4 as Original
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "." as HifiControls
|
import "." as HifiControls
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4 as Original
|
import QtQuick.Controls 2.2 as Original
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "../controls-uit" as HifiControls
|
import "../controls-uit" as HifiControls
|
||||||
|
@ -21,6 +20,8 @@ Original.RadioButton {
|
||||||
id: radioButton
|
id: radioButton
|
||||||
HifiConstants { id: hifi }
|
HifiConstants { id: hifi }
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
property int colorScheme: hifi.colorSchemes.light
|
property int colorScheme: hifi.colorSchemes.light
|
||||||
readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light
|
readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light
|
||||||
|
|
||||||
|
@ -33,50 +34,53 @@ Original.RadioButton {
|
||||||
Tablet.playSound(TabletEnums.ButtonClick);
|
Tablet.playSound(TabletEnums.ButtonClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: doesnt works for QQC1. check with QQC2
|
onHoveredChanged: {
|
||||||
// onHovered: {
|
if (hovered) {
|
||||||
// Tablet.playSound(TabletEnums.ButtonHover);
|
Tablet.playSound(TabletEnums.ButtonHover);
|
||||||
// }
|
|
||||||
|
|
||||||
style: RadioButtonStyle {
|
|
||||||
indicator: Rectangle {
|
|
||||||
id: box
|
|
||||||
width: boxSize
|
|
||||||
height: boxSize
|
|
||||||
radius: 7
|
|
||||||
gradient: Gradient {
|
|
||||||
GradientStop {
|
|
||||||
position: 0.2
|
|
||||||
color: pressed || hovered
|
|
||||||
? (radioButton.isLightColorScheme ? hifi.colors.checkboxDarkStart : hifi.colors.checkboxLightStart)
|
|
||||||
: (radioButton.isLightColorScheme ? hifi.colors.checkboxLightStart : hifi.colors.checkboxDarkStart)
|
|
||||||
}
|
|
||||||
GradientStop {
|
|
||||||
position: 1.0
|
|
||||||
color: pressed || hovered
|
|
||||||
? (radioButton.isLightColorScheme ? hifi.colors.checkboxDarkFinish : hifi.colors.checkboxLightFinish)
|
|
||||||
: (radioButton.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: check
|
|
||||||
width: checkSize
|
|
||||||
height: checkSize
|
|
||||||
radius: 7
|
|
||||||
anchors.centerIn: parent
|
|
||||||
color: "#00B4EF"
|
|
||||||
border.width: 1
|
|
||||||
border.color: "#36CDFF"
|
|
||||||
visible: checked && !pressed || !checked && pressed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
label: RalewaySemiBold {
|
|
||||||
text: control.text
|
|
||||||
size: hifi.fontSizes.inputLabel
|
|
||||||
color: isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText
|
|
||||||
x: radioButton.boxSize / 2
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
indicator: Rectangle {
|
||||||
|
id: box
|
||||||
|
width: boxSize
|
||||||
|
height: boxSize
|
||||||
|
radius: 7
|
||||||
|
x: radioButton.leftPadding
|
||||||
|
y: parent.height / 2 - height / 2
|
||||||
|
gradient: Gradient {
|
||||||
|
GradientStop {
|
||||||
|
position: 0.2
|
||||||
|
color: pressed || hovered
|
||||||
|
? (radioButton.isLightColorScheme ? hifi.colors.checkboxDarkStart : hifi.colors.checkboxLightStart)
|
||||||
|
: (radioButton.isLightColorScheme ? hifi.colors.checkboxLightStart : hifi.colors.checkboxDarkStart)
|
||||||
|
}
|
||||||
|
GradientStop {
|
||||||
|
position: 1.0
|
||||||
|
color: pressed || hovered
|
||||||
|
? (radioButton.isLightColorScheme ? hifi.colors.checkboxDarkFinish : hifi.colors.checkboxLightFinish)
|
||||||
|
: (radioButton.isLightColorScheme ? hifi.colors.checkboxLightFinish : hifi.colors.checkboxDarkFinish)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: check
|
||||||
|
width: checkSize
|
||||||
|
height: checkSize
|
||||||
|
radius: 7
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: "#00B4EF"
|
||||||
|
border.width: 1
|
||||||
|
border.color: "#36CDFF"
|
||||||
|
visible: checked && !pressed || !checked && pressed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: RalewaySemiBold {
|
||||||
|
text: radioButton.text
|
||||||
|
size: hifi.fontSizes.inputLabel
|
||||||
|
color: isLightColorScheme ? hifi.colors.lightGray : hifi.colors.lightGrayText
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
leftPadding: radioButton.indicator.width + radioButton.spacing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
41
interface/resources/qml/controls-uit/ScrollBar.qml
Normal file
41
interface/resources/qml/controls-uit/ScrollBar.qml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
//
|
||||||
|
// ScrollBar.qml
|
||||||
|
//
|
||||||
|
// Created by Vlad Stelmahovsky on 27 Nov 2017
|
||||||
|
// 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.7
|
||||||
|
import QtQuick.Controls 2.2
|
||||||
|
|
||||||
|
import "../styles-uit"
|
||||||
|
|
||||||
|
ScrollBar {
|
||||||
|
visible: size < 1.0
|
||||||
|
|
||||||
|
HifiConstants { id: hifi }
|
||||||
|
property int colorScheme: hifi.colorSchemes.light
|
||||||
|
readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light
|
||||||
|
|
||||||
|
background: Item {
|
||||||
|
implicitWidth: hifi.dimensions.scrollbarBackgroundWidth
|
||||||
|
Rectangle {
|
||||||
|
anchors { fill: parent; topMargin: 3; bottomMargin: 3 }
|
||||||
|
radius: hifi.dimensions.scrollbarHandleWidth/2
|
||||||
|
color: isLightColorScheme ? hifi.colors.tableScrollBackgroundLight
|
||||||
|
: hifi.colors.tableScrollBackgroundDark
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: Item {
|
||||||
|
implicitWidth: hifi.dimensions.scrollbarHandleWidth
|
||||||
|
Rectangle {
|
||||||
|
anchors { fill: parent; topMargin: 1; bottomMargin: 1 }
|
||||||
|
radius: hifi.dimensions.scrollbarHandleWidth/2
|
||||||
|
color: isLightColorScheme ? hifi.colors.tableScrollHandleLight : hifi.colors.tableScrollHandleDark
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,9 +8,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "../controls-uit" as HifiControls
|
import "../controls-uit" as HifiControls
|
||||||
|
@ -23,66 +22,65 @@ Slider {
|
||||||
property string label: ""
|
property string label: ""
|
||||||
property real controlHeight: height + (sliderLabel.visible ? sliderLabel.height + sliderLabel.anchors.bottomMargin : 0)
|
property real controlHeight: height + (sliderLabel.visible ? sliderLabel.height + sliderLabel.anchors.bottomMargin : 0)
|
||||||
|
|
||||||
|
property alias minimumValue: slider.from
|
||||||
|
property alias maximumValue: slider.to
|
||||||
|
|
||||||
height: hifi.fontSizes.textFieldInput + 14 // Match height of TextField control.
|
height: hifi.fontSizes.textFieldInput + 14 // Match height of TextField control.
|
||||||
y: sliderLabel.visible ? sliderLabel.height + sliderLabel.anchors.bottomMargin : 0
|
y: sliderLabel.visible ? sliderLabel.height + sliderLabel.anchors.bottomMargin : 0
|
||||||
|
|
||||||
style: SliderStyle {
|
background: Rectangle {
|
||||||
|
x: slider.leftPadding
|
||||||
|
y: slider.topPadding + slider.availableHeight / 2 - height / 2
|
||||||
|
|
||||||
groove: Rectangle {
|
implicitWidth: 50
|
||||||
implicitWidth: 50
|
implicitHeight: hifi.dimensions.sliderGrooveHeight
|
||||||
implicitHeight: hifi.dimensions.sliderGrooveHeight
|
width: slider.availableWidth
|
||||||
|
height: implicitHeight
|
||||||
|
radius: height / 2
|
||||||
|
color: isLightColorScheme ? hifi.colors.sliderGutterLight : hifi.colors.sliderGutterDark
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: slider.visualPosition * parent.width
|
||||||
|
height: parent.height
|
||||||
radius: height / 2
|
radius: height / 2
|
||||||
color: isLightColorScheme ? hifi.colors.sliderGutterLight : hifi.colors.sliderGutterDark
|
gradient: Gradient {
|
||||||
|
GradientStop { position: 0.0; color: hifi.colors.blueAccent }
|
||||||
|
GradientStop { position: 1.0; color: hifi.colors.primaryHighlight }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
handle: Rectangle {
|
||||||
width: parent.height - 2
|
x: slider.leftPadding + slider.visualPosition * (slider.availableWidth - width)
|
||||||
height: slider.width * (slider.value - slider.minimumValue) / (slider.maximumValue - slider.minimumValue) - 1
|
y: slider.topPadding + slider.availableHeight / 2 - height / 2
|
||||||
radius: height / 2
|
implicitWidth: hifi.dimensions.sliderHandleSize
|
||||||
anchors {
|
implicitHeight: hifi.dimensions.sliderHandleSize
|
||||||
top: parent.top
|
radius: height / 2
|
||||||
topMargin: width + 1
|
border.width: 1
|
||||||
left: parent.left
|
border.color: isLightColorScheme ? hifi.colors.sliderBorderLight : hifi.colors.sliderBorderDark
|
||||||
leftMargin: 1
|
gradient: Gradient {
|
||||||
}
|
GradientStop {
|
||||||
transformOrigin: Item.TopLeft
|
position: 0.0
|
||||||
rotation: -90
|
color: pressed || hovered
|
||||||
gradient: Gradient {
|
? (isLightColorScheme ? hifi.colors.sliderDarkStart : hifi.colors.sliderLightStart )
|
||||||
GradientStop { position: 0.0; color: hifi.colors.blueAccent }
|
: (isLightColorScheme ? hifi.colors.sliderLightStart : hifi.colors.sliderDarkStart )
|
||||||
GradientStop { position: 1.0; color: hifi.colors.primaryHighlight }
|
}
|
||||||
}
|
GradientStop {
|
||||||
|
position: 1.0
|
||||||
|
color: pressed || hovered
|
||||||
|
? (isLightColorScheme ? hifi.colors.sliderDarkFinish : hifi.colors.sliderLightFinish )
|
||||||
|
: (isLightColorScheme ? hifi.colors.sliderLightFinish : hifi.colors.sliderDarkFinish )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handle: Rectangle {
|
Rectangle {
|
||||||
implicitWidth: hifi.dimensions.sliderHandleSize
|
height: parent.height - 2
|
||||||
implicitHeight: hifi.dimensions.sliderHandleSize
|
width: height
|
||||||
radius: height / 2
|
radius: height / 2
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: hifi.colors.transparent
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: isLightColorScheme ? hifi.colors.sliderBorderLight : hifi.colors.sliderBorderDark
|
border.color: hifi.colors.black
|
||||||
gradient: Gradient {
|
|
||||||
GradientStop {
|
|
||||||
position: 0.0
|
|
||||||
color: pressed || hovered
|
|
||||||
? (isLightColorScheme ? hifi.colors.sliderDarkStart : hifi.colors.sliderLightStart )
|
|
||||||
: (isLightColorScheme ? hifi.colors.sliderLightStart : hifi.colors.sliderDarkStart )
|
|
||||||
}
|
|
||||||
GradientStop {
|
|
||||||
position: 1.0
|
|
||||||
color: pressed || hovered
|
|
||||||
? (isLightColorScheme ? hifi.colors.sliderDarkFinish : hifi.colors.sliderLightFinish )
|
|
||||||
: (isLightColorScheme ? hifi.colors.sliderLightFinish : hifi.colors.sliderDarkFinish )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
height: parent.height - 2
|
|
||||||
width: height
|
|
||||||
radius: height / 2
|
|
||||||
anchors.centerIn: parent
|
|
||||||
color: hifi.colors.transparent
|
|
||||||
border.width: 1
|
|
||||||
border.color: hifi.colors.black
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "../controls-uit" as HifiControls
|
import "../controls-uit" as HifiControls
|
||||||
|
@ -19,11 +18,40 @@ SpinBox {
|
||||||
id: spinBox
|
id: spinBox
|
||||||
|
|
||||||
property int colorScheme: hifi.colorSchemes.light
|
property int colorScheme: hifi.colorSchemes.light
|
||||||
readonly property bool isLightColorScheme: colorScheme == hifi.colorSchemes.light
|
readonly property bool isLightColorScheme: colorScheme === hifi.colorSchemes.light
|
||||||
property string label: ""
|
property string label: ""
|
||||||
property string labelInside: ""
|
property string labelInside: ""
|
||||||
property color colorLabelInside: hifi.colors.white
|
property color colorLabelInside: hifi.colors.white
|
||||||
property real controlHeight: height + (spinBoxLabel.visible ? spinBoxLabel.height + spinBoxLabel.anchors.bottomMargin : 0)
|
property real controlHeight: height + (spinBoxLabel.visible ? spinBoxLabel.height + spinBoxLabel.anchors.bottomMargin : 0)
|
||||||
|
property int decimals: 2;
|
||||||
|
property real factor: Math.pow(10, decimals)
|
||||||
|
|
||||||
|
property real minimumValue: 0.0
|
||||||
|
property real maximumValue: 0.0
|
||||||
|
|
||||||
|
property real realValue: 0.0
|
||||||
|
property real realFrom: 0.0
|
||||||
|
property real realTo: 100.0
|
||||||
|
property real realStepSize: 1.0
|
||||||
|
|
||||||
|
implicitHeight: height
|
||||||
|
implicitWidth: width
|
||||||
|
|
||||||
|
padding: 0
|
||||||
|
leftPadding: 0
|
||||||
|
rightPadding: padding + (up.indicator ? up.indicator.width : 0)
|
||||||
|
topPadding: 0
|
||||||
|
bottomPadding: 0
|
||||||
|
|
||||||
|
locale: Qt.locale("en_US")
|
||||||
|
|
||||||
|
onValueModified: realValue = value/factor
|
||||||
|
onValueChanged: realValue = value/factor
|
||||||
|
|
||||||
|
stepSize: realStepSize*factor
|
||||||
|
value: realValue*factor
|
||||||
|
to : realTo*factor
|
||||||
|
from : realFrom*factor
|
||||||
|
|
||||||
font.family: "Fira Sans SemiBold"
|
font.family: "Fira Sans SemiBold"
|
||||||
font.pixelSize: hifi.fontSizes.textFieldInput
|
font.pixelSize: hifi.fontSizes.textFieldInput
|
||||||
|
@ -31,43 +59,67 @@ SpinBox {
|
||||||
|
|
||||||
y: spinBoxLabel.visible ? spinBoxLabel.height + spinBoxLabel.anchors.bottomMargin : 0
|
y: spinBoxLabel.visible ? spinBoxLabel.height + spinBoxLabel.anchors.bottomMargin : 0
|
||||||
|
|
||||||
style: SpinBoxStyle {
|
background: Rectangle {
|
||||||
id: spinStyle
|
color: isLightColorScheme
|
||||||
background: Rectangle {
|
? (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGray)
|
||||||
color: isLightColorScheme
|
: (spinBox.activeFocus ? hifi.colors.black : hifi.colors.baseGrayShadow)
|
||||||
? (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGray)
|
border.color: spinBoxLabelInside.visible ? spinBoxLabelInside.color : hifi.colors.primaryHighlight
|
||||||
: (spinBox.activeFocus ? hifi.colors.black : hifi.colors.baseGrayShadow)
|
border.width: spinBox.activeFocus ? spinBoxLabelInside.visible ? 2 : 1 : 0
|
||||||
border.color: spinBoxLabelInside.visible ? spinBoxLabelInside.color : hifi.colors.primaryHighlight
|
}
|
||||||
border.width: spinBox.activeFocus ? spinBoxLabelInside.visible ? 2 : 1 : 0
|
|
||||||
}
|
|
||||||
|
|
||||||
textColor: isLightColorScheme
|
validator: DoubleValidator {
|
||||||
? (spinBox.activeFocus ? hifi.colors.black : hifi.colors.lightGray)
|
bottom: Math.min(spinBox.from, spinBox.to)*spinBox.factor
|
||||||
: (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGrayText)
|
top: Math.max(spinBox.from, spinBox.to)*spinBox.factor
|
||||||
|
}
|
||||||
|
|
||||||
|
textFromValue: function(value, locale) {
|
||||||
|
return parseFloat(value*1.0/factor).toFixed(decimals);
|
||||||
|
}
|
||||||
|
|
||||||
|
valueFromText: function(text, locale) {
|
||||||
|
return Number.fromLocaleString(locale, text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
contentItem: TextInput {
|
||||||
|
z: 2
|
||||||
|
color: isLightColorScheme
|
||||||
|
? (spinBox.activeFocus ? hifi.colors.black : hifi.colors.lightGray)
|
||||||
|
: (spinBox.activeFocus ? hifi.colors.white : hifi.colors.lightGrayText)
|
||||||
selectedTextColor: hifi.colors.black
|
selectedTextColor: hifi.colors.black
|
||||||
selectionColor: hifi.colors.primaryHighlight
|
selectionColor: hifi.colors.primaryHighlight
|
||||||
|
text: spinBox.textFromValue(spinBox.value, spinBox.locale)
|
||||||
horizontalAlignment: Qt.AlignLeft
|
verticalAlignment: Qt.AlignVCenter
|
||||||
padding.left: spinBoxLabelInside.visible ? 30 : hifi.dimensions.textPadding
|
leftPadding: spinBoxLabelInside.visible ? 30 : hifi.dimensions.textPadding
|
||||||
padding.right: hifi.dimensions.spinnerSize
|
//rightPadding: hifi.dimensions.spinnerSize
|
||||||
padding.top: 0
|
width: spinBox.width - hifi.dimensions.spinnerSize
|
||||||
|
}
|
||||||
incrementControl: HiFiGlyphs {
|
up.indicator: Item {
|
||||||
id: incrementButton
|
x: spinBox.width - implicitWidth - 5
|
||||||
|
y: 1
|
||||||
|
clip: true
|
||||||
|
implicitHeight: spinBox.implicitHeight/2
|
||||||
|
implicitWidth: spinBox.implicitHeight/2
|
||||||
|
HiFiGlyphs {
|
||||||
|
anchors.centerIn: parent
|
||||||
text: hifi.glyphs.caratUp
|
text: hifi.glyphs.caratUp
|
||||||
x: 10
|
|
||||||
y: 1
|
|
||||||
size: hifi.dimensions.spinnerSize
|
size: hifi.dimensions.spinnerSize
|
||||||
color: styleData.upPressed ? (isLightColorScheme ? hifi.colors.black : hifi.colors.white) : hifi.colors.gray
|
color: spinBox.down.pressed || spinBox.up.hovered ? (isLightColorScheme ? hifi.colors.black : hifi.colors.white) : hifi.colors.gray
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
decrementControl: HiFiGlyphs {
|
down.indicator: Item {
|
||||||
text: hifi.glyphs.caratDn
|
x: spinBox.width - implicitWidth - 5
|
||||||
x: 10
|
y: spinBox.implicitHeight/2
|
||||||
y: -1
|
clip: true
|
||||||
size: hifi.dimensions.spinnerSize
|
implicitHeight: spinBox.implicitHeight/2
|
||||||
color: styleData.downPressed ? (isLightColorScheme ? hifi.colors.black : hifi.colors.white) : hifi.colors.gray
|
implicitWidth: spinBox.implicitHeight/2
|
||||||
}
|
HiFiGlyphs {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: hifi.glyphs.caratDn
|
||||||
|
size: hifi.dimensions.spinnerSize
|
||||||
|
color: spinBox.down.pressed || spinBox.down.hovered ? (isLightColorScheme ? hifi.colors.black : hifi.colors.white) : hifi.colors.gray
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
HifiControls.Label {
|
||||||
|
@ -91,26 +143,26 @@ SpinBox {
|
||||||
visible: spinBox.labelInside != ""
|
visible: spinBox.labelInside != ""
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
// MouseArea {
|
||||||
anchors.fill: parent
|
// anchors.fill: parent
|
||||||
propagateComposedEvents: true
|
// propagateComposedEvents: true
|
||||||
onWheel: {
|
// onWheel: {
|
||||||
if(spinBox.activeFocus)
|
// if(spinBox.activeFocus)
|
||||||
wheel.accepted = false
|
// wheel.accepted = false
|
||||||
else
|
// else
|
||||||
wheel.accepted = true
|
// wheel.accepted = true
|
||||||
}
|
// }
|
||||||
onPressed: {
|
// onPressed: {
|
||||||
mouse.accepted = false
|
// mouse.accepted = false
|
||||||
}
|
// }
|
||||||
onReleased: {
|
// onReleased: {
|
||||||
mouse.accepted = false
|
// mouse.accepted = false
|
||||||
}
|
// }
|
||||||
onClicked: {
|
// onClicked: {
|
||||||
mouse.accepted = false
|
// mouse.accepted = false
|
||||||
}
|
// }
|
||||||
onDoubleClicked: {
|
// onDoubleClicked: {
|
||||||
mouse.accepted = false
|
// mouse.accepted = false
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4 as Original
|
import QtQuick.Controls 2.2 as Original
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
|
@ -33,44 +32,49 @@ Item {
|
||||||
|
|
||||||
Original.Switch {
|
Original.Switch {
|
||||||
id: originalSwitch;
|
id: originalSwitch;
|
||||||
activeFocusOnPress: true;
|
focusPolicy: Qt.ClickFocus
|
||||||
anchors.top: rootSwitch.top;
|
anchors.top: rootSwitch.top;
|
||||||
anchors.left: rootSwitch.left;
|
anchors.left: rootSwitch.left;
|
||||||
anchors.leftMargin: rootSwitch.width/2 - rootSwitch.switchWidth/2;
|
anchors.leftMargin: rootSwitch.width/2 - rootSwitch.switchWidth/2;
|
||||||
onCheckedChanged: rootSwitch.onCheckedChanged();
|
onCheckedChanged: rootSwitch.onCheckedChanged();
|
||||||
onClicked: rootSwitch.clicked();
|
onClicked: rootSwitch.clicked();
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
style: SwitchStyle {
|
topPadding: 3;
|
||||||
|
leftPadding: 3;
|
||||||
|
rightPadding: 3;
|
||||||
|
bottomPadding: 3;
|
||||||
|
|
||||||
padding {
|
onHoveredChanged: {
|
||||||
top: 3;
|
if (hovered) {
|
||||||
left: 3;
|
switchHandle.color = hifi.colors.blueHighlight;
|
||||||
right: 3;
|
} else {
|
||||||
bottom: 3;
|
switchHandle.color = hifi.colors.lightGray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: "#252525";
|
||||||
|
implicitWidth: rootSwitch.switchWidth;
|
||||||
|
implicitHeight: rootSwitch.height;
|
||||||
|
radius: rootSwitch.switchRadius;
|
||||||
|
}
|
||||||
|
|
||||||
|
indicator: Rectangle {
|
||||||
|
id: switchHandle;
|
||||||
|
implicitWidth: rootSwitch.height - originalSwitch.topPadding - originalSwitch.bottomPadding;
|
||||||
|
implicitHeight: implicitWidth;
|
||||||
|
radius: implicitWidth/2;
|
||||||
|
border.color: hifi.colors.lightGrayText;
|
||||||
|
color: hifi.colors.lightGray;
|
||||||
|
//x: originalSwitch.leftPadding
|
||||||
|
x: Math.max(0, Math.min(parent.width - width, originalSwitch.visualPosition * parent.width - (width / 2)))
|
||||||
|
y: parent.height / 2 - height / 2
|
||||||
|
Behavior on x {
|
||||||
|
enabled: !originalSwitch.down
|
||||||
|
SmoothedAnimation { velocity: 200 }
|
||||||
}
|
}
|
||||||
|
|
||||||
groove: Rectangle {
|
|
||||||
color: "#252525";
|
|
||||||
implicitWidth: rootSwitch.switchWidth;
|
|
||||||
implicitHeight: rootSwitch.height;
|
|
||||||
radius: rootSwitch.switchRadius;
|
|
||||||
}
|
|
||||||
|
|
||||||
handle: Rectangle {
|
|
||||||
id: switchHandle;
|
|
||||||
implicitWidth: rootSwitch.height - padding.top - padding.bottom;
|
|
||||||
implicitHeight: implicitWidth;
|
|
||||||
radius: implicitWidth/2;
|
|
||||||
border.color: hifi.colors.lightGrayText;
|
|
||||||
color: hifi.colors.lightGray;
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent;
|
|
||||||
hoverEnabled: true;
|
|
||||||
onEntered: parent.color = hifi.colors.blueHighlight;
|
|
||||||
onExited: parent.color = hifi.colors.lightGray;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
import QtQuick.Controls 2.2 as QQC2
|
import QtQuick.Controls 2.3 as QQC2
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "../controls-uit" as HifiControls
|
import "../controls-uit" as HifiControls
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
TextEdit {
|
TextEdit {
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "../controls-uit" as HifiControls
|
import "../controls-uit" as HifiControls
|
||||||
|
@ -29,6 +28,7 @@ TextField {
|
||||||
property int roundedBorderRadius: 4
|
property int roundedBorderRadius: 4
|
||||||
property bool error: false;
|
property bool error: false;
|
||||||
property bool hasClearButton: false;
|
property bool hasClearButton: false;
|
||||||
|
property alias textColor: textField.color
|
||||||
property string leftPermanentGlyph: "";
|
property string leftPermanentGlyph: "";
|
||||||
property string centerPlaceholderGlyph: "";
|
property string centerPlaceholderGlyph: "";
|
||||||
|
|
||||||
|
@ -49,42 +49,56 @@ TextField {
|
||||||
// workaround for https://bugreports.qt.io/browse/QTBUG-49297
|
// workaround for https://bugreports.qt.io/browse/QTBUG-49297
|
||||||
Keys.onPressed: {
|
Keys.onPressed: {
|
||||||
switch (event.key) {
|
switch (event.key) {
|
||||||
case Qt.Key_Return:
|
case Qt.Key_Return:
|
||||||
case Qt.Key_Enter:
|
case Qt.Key_Enter:
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
|
|
||||||
// emit accepted signal manually
|
// emit accepted signal manually
|
||||||
if (acceptableInput) {
|
if (acceptableInput) {
|
||||||
accepted();
|
accepted();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
style: TextFieldStyle {
|
Text {
|
||||||
id: style;
|
id: placeholder
|
||||||
textColor: {
|
x: textField.leftPadding
|
||||||
if (isLightColorScheme) {
|
y: textField.topPadding
|
||||||
if (textField.activeFocus) {
|
width: textField.width - (textField.leftPadding + textField.rightPadding)
|
||||||
hifi.colors.black
|
height: textField.height - (textField.topPadding + textField.bottomPadding)
|
||||||
} else {
|
|
||||||
hifi.colors.lightGray
|
text: textField.placeholderText
|
||||||
}
|
font: textField.font
|
||||||
} else if (isFaintGrayColorScheme) {
|
color: textField.placeholderTextColor
|
||||||
if (textField.activeFocus) {
|
verticalAlignment: textField.verticalAlignment
|
||||||
hifi.colors.black
|
visible: !textField.length && !textField.preeditText && (!textField.activeFocus || textField.horizontalAlignment !== Qt.AlignHCenter)
|
||||||
} else {
|
elide: Text.ElideRight
|
||||||
hifi.colors.lightGray
|
}
|
||||||
}
|
|
||||||
|
color: {
|
||||||
|
if (isLightColorScheme) {
|
||||||
|
if (textField.activeFocus) {
|
||||||
|
hifi.colors.black
|
||||||
} else {
|
} else {
|
||||||
if (textField.activeFocus) {
|
hifi.colors.lightGray
|
||||||
hifi.colors.white
|
}
|
||||||
} else {
|
} else if (isFaintGrayColorScheme) {
|
||||||
hifi.colors.lightGrayText
|
if (textField.activeFocus) {
|
||||||
}
|
hifi.colors.black
|
||||||
|
} else {
|
||||||
|
hifi.colors.lightGray
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (textField.activeFocus) {
|
||||||
|
hifi.colors.white
|
||||||
|
} else {
|
||||||
|
hifi.colors.lightGrayText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
background: Rectangle {
|
}
|
||||||
color: {
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: {
|
||||||
if (isLightColorScheme) {
|
if (isLightColorScheme) {
|
||||||
if (textField.activeFocus) {
|
if (textField.activeFocus) {
|
||||||
hifi.colors.white
|
hifi.colors.white
|
||||||
|
@ -105,22 +119,22 @@ TextField {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
border.color: textField.error ? hifi.colors.redHighlight :
|
border.color: textField.error ? hifi.colors.redHighlight :
|
||||||
(textField.activeFocus ? hifi.colors.primaryHighlight : (hasDefocusedBorder ? (isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray) : color))
|
(textField.activeFocus ? hifi.colors.primaryHighlight : (hasDefocusedBorder ? (isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray) : color))
|
||||||
border.width: textField.activeFocus || hasRoundedBorder || textField.error ? 1 : 0
|
border.width: textField.activeFocus || hasRoundedBorder || textField.error ? 1 : 0
|
||||||
radius: isSearchField ? textField.height / 2 : (hasRoundedBorder ? roundedBorderRadius : 0)
|
radius: isSearchField ? textField.height / 2 : (hasRoundedBorder ? roundedBorderRadius : 0)
|
||||||
|
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
text: textField.leftPermanentGlyph;
|
text: textField.leftPermanentGlyph;
|
||||||
color: textColor;
|
color: textColor;
|
||||||
size: hifi.fontSizes.textFieldSearchIcon;
|
size: hifi.fontSizes.textFieldSearchIcon;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
anchors.leftMargin: hifi.dimensions.textPadding - 2;
|
anchors.leftMargin: hifi.dimensions.textPadding - 2;
|
||||||
visible: text;
|
visible: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
text: textField.centerPlaceholderGlyph;
|
text: textField.centerPlaceholderGlyph;
|
||||||
color: textColor;
|
color: textColor;
|
||||||
size: parent.height;
|
size: parent.height;
|
||||||
|
@ -130,39 +144,40 @@ TextField {
|
||||||
}
|
}
|
||||||
|
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
text: hifi.glyphs.search
|
text: hifi.glyphs.search
|
||||||
color: textColor
|
color: textColor
|
||||||
size: hifi.fontSizes.textFieldSearchIcon
|
size: hifi.fontSizes.textFieldSearchIcon
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.leftMargin: hifi.dimensions.textPadding - 2
|
anchors.leftMargin: hifi.dimensions.textPadding - 2
|
||||||
visible: isSearchField
|
visible: isSearchField
|
||||||
}
|
}
|
||||||
|
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
text: hifi.glyphs.error
|
text: hifi.glyphs.error
|
||||||
color: textColor
|
color: textColor
|
||||||
size: 40
|
size: 40
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: hifi.dimensions.textPadding - 2
|
anchors.rightMargin: hifi.dimensions.textPadding - 2
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: hasClearButton && textField.text !== "";
|
visible: hasClearButton && textField.text !== "";
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
textField.text = "";
|
textField.text = "";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
placeholderTextColor: isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray
|
|
||||||
selectedTextColor: hifi.colors.black
|
|
||||||
selectionColor: hifi.colors.primaryHighlight
|
|
||||||
padding.left: hasRoundedBorder ? textField.height / 2 : ((isSearchField || textField.leftPermanentGlyph !== "") ? textField.height - 2 : 0) + hifi.dimensions.textPadding
|
|
||||||
padding.right: (hasClearButton ? textField.height - 2 : 0) + hifi.dimensions.textPadding
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property color placeholderTextColor: isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray
|
||||||
|
selectedTextColor: hifi.colors.black
|
||||||
|
selectionColor: hifi.colors.primaryHighlight
|
||||||
|
leftPadding: hasRoundedBorder ? textField.height / 2 : ((isSearchField || textField.leftPermanentGlyph !== "") ? textField.height - 2 : 0) + hifi.dimensions.textPadding
|
||||||
|
rightPadding: (hasClearButton ? textField.height - 2 : 0) + hifi.dimensions.textPadding
|
||||||
|
|
||||||
|
|
||||||
HifiControls.Label {
|
HifiControls.Label {
|
||||||
id: textFieldLabel
|
id: textFieldLabel
|
||||||
text: textField.label
|
text: textField.label
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4 as Original
|
import QtQuick.Controls 2.2 as Original
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
|
@ -26,23 +25,16 @@ Original.Button {
|
||||||
readonly property color clickedColor: "#FFFFFF"
|
readonly property color clickedColor: "#FFFFFF"
|
||||||
readonly property color disabledColor: "#575757"
|
readonly property color disabledColor: "#575757"
|
||||||
|
|
||||||
style: ButtonStyle {
|
background: Item {}
|
||||||
background: Item {}
|
|
||||||
|
|
||||||
|
contentItem: HiFiGlyphs {
|
||||||
label: HiFiGlyphs {
|
color: control.enabled ? (control.pressed ? control.clickedColor :
|
||||||
color: control.enabled ? (control.pressed ? control.clickedColor :
|
(control.hovered ? control.hoverColor : control.normalColor)) :
|
||||||
(control.hovered ? control.hoverColor : control.normalColor)) :
|
control.disabledColor
|
||||||
control.disabledColor
|
verticalAlignment: Text.AlignVCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
text: control.glyph
|
||||||
anchors {
|
size: control.size
|
||||||
// Tweak horizontal alignment so that it looks right.
|
|
||||||
left: parent.left
|
|
||||||
leftMargin: -0.5
|
|
||||||
}
|
|
||||||
text: control.glyph
|
|
||||||
size: control.size
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,35 @@
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 1.3 as Original
|
import QtQuick.Controls 2.2 as Original
|
||||||
import QtQuick.Controls.Styles 1.3
|
|
||||||
|
|
||||||
import "."
|
import "."
|
||||||
import "../styles"
|
import "../styles"
|
||||||
|
import "../controls-uit"
|
||||||
|
|
||||||
Original.Button {
|
Original.Button {
|
||||||
style: ButtonStyle {
|
id: control
|
||||||
HifiConstants { id: hifi }
|
|
||||||
padding {
|
HifiConstants { id: hifi }
|
||||||
top: 8
|
property Action action: null
|
||||||
left: 12
|
|
||||||
right: 12
|
onActionChanged: {
|
||||||
bottom: 8
|
if (action !== null && action.text !== "") {
|
||||||
}
|
control.text = action.text
|
||||||
background: Border {
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
|
||||||
label: Text {
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
text: control.text
|
|
||||||
color: control.enabled ? hifi.colors.text : hifi.colors.disabledText
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
padding {
|
||||||
|
top: 8
|
||||||
|
left: 12
|
||||||
|
right: 12
|
||||||
|
bottom: 8
|
||||||
|
}
|
||||||
|
background: Border {
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
contentItem: Text {
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: control.text
|
||||||
|
color: control.enabled ? hifi.colors.text : hifi.colors.disabledText
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 1.3
|
|
||||||
import QtQuick.Controls.Styles 1.3
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: root
|
id: root
|
||||||
|
|
|
@ -8,8 +8,9 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
|
import QtQuick.Controls 2.3 as QQC2
|
||||||
|
|
||||||
import "../dialogs"
|
import "../dialogs"
|
||||||
import "../js/Utils.js" as Utils
|
import "../js/Utils.js" as Utils
|
||||||
|
@ -565,7 +566,7 @@ FocusScope {
|
||||||
ColorAnimation on color { from: "#7fffff00"; to: "#7f0000ff"; duration: 1000; loops: 9999 }
|
ColorAnimation on color { from: "#7fffff00"; to: "#7f0000ff"; duration: 1000; loops: 9999 }
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
QQC2.Action {
|
||||||
text: "Toggle Focus Debugger"
|
text: "Toggle Focus Debugger"
|
||||||
shortcut: "Ctrl+Shift+F"
|
shortcut: "Ctrl+Shift+F"
|
||||||
enabled: DebugQML
|
enabled: DebugQML
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5;
|
import QtQuick 2.7;
|
||||||
import QtQuick.Controls 1.4;
|
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs;
|
import QtQuick.Dialogs 1.2 as OriginalDialogs;
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import "../controls-uit";
|
import "../controls-uit";
|
||||||
import "../styles-uit";
|
import "../styles-uit";
|
||||||
|
@ -269,7 +269,7 @@ ModalWindow {
|
||||||
Action {
|
Action {
|
||||||
id: cancelAction;
|
id: cancelAction;
|
||||||
text: qsTr("Cancel");
|
text: qsTr("Cancel");
|
||||||
shortcut: Qt.Key_Escape;
|
shortcut: "Esc";
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.result = null;
|
root.result = null;
|
||||||
root.canceled();
|
root.canceled();
|
||||||
|
@ -284,7 +284,7 @@ ModalWindow {
|
||||||
Action {
|
Action {
|
||||||
id: acceptAction;
|
id: acceptAction;
|
||||||
text: qsTr("Add");
|
text: qsTr("Add");
|
||||||
shortcut: Qt.Key_Return;
|
shortcut: "Return"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
var result = {};
|
var result = {};
|
||||||
if (textInput) {
|
if (textInput) {
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import Qt.labs.folderlistmodel 2.1
|
import Qt.labs.folderlistmodel 2.1
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
|
import QtQuick.Controls 1.4 as QQC1
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import ".."
|
import ".."
|
||||||
import "../controls-uit"
|
import "../controls-uit"
|
||||||
|
@ -574,7 +574,7 @@ ModalWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TableViewColumn {
|
QQC1.TableViewColumn {
|
||||||
id: fileNameColumn
|
id: fileNameColumn
|
||||||
role: "fileName"
|
role: "fileName"
|
||||||
title: "Name"
|
title: "Name"
|
||||||
|
@ -582,7 +582,7 @@ ModalWindow {
|
||||||
movable: false
|
movable: false
|
||||||
resizable: true
|
resizable: true
|
||||||
}
|
}
|
||||||
TableViewColumn {
|
QQC1.TableViewColumn {
|
||||||
id: fileModifiedColumn
|
id: fileModifiedColumn
|
||||||
role: "fileModified"
|
role: "fileModified"
|
||||||
title: "Date"
|
title: "Date"
|
||||||
|
@ -591,7 +591,7 @@ ModalWindow {
|
||||||
resizable: true
|
resizable: true
|
||||||
visible: !selectDirectory
|
visible: !selectDirectory
|
||||||
}
|
}
|
||||||
TableViewColumn {
|
QQC1.TableViewColumn {
|
||||||
role: "fileSize"
|
role: "fileSize"
|
||||||
title: "Size"
|
title: "Size"
|
||||||
width: fileTableView.width - fileNameColumn.width - fileModifiedColumn.width
|
width: fileTableView.width - fileNameColumn.width - fileModifiedColumn.width
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
|
|
||||||
import "../controls-uit"
|
import "../controls-uit"
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
import "../controls-uit" as HifiControls
|
import "../controls-uit" as HifiControls
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
@ -27,7 +26,7 @@ ScrollingWindow {
|
||||||
property var showCategories: []
|
property var showCategories: []
|
||||||
minSize: Qt.vector2d(400, 500)
|
minSize: Qt.vector2d(400, 500)
|
||||||
|
|
||||||
HifiConstants { id: hifi }
|
//HifiConstants { id: hifi }
|
||||||
|
|
||||||
function saveAll() {
|
function saveAll() {
|
||||||
for (var i = 0; i < sections.length; ++i) {
|
for (var i = 0; i < sections.length; ++i) {
|
||||||
|
@ -97,19 +96,19 @@ ScrollingWindow {
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: hifi.dimensions.contentMargin.x
|
rightMargin: 10//hifi.dimensions.contentMargin.x
|
||||||
}
|
}
|
||||||
spacing: hifi.dimensions.contentSpacing.x
|
spacing: 1//hifi.dimensions.contentSpacing.x
|
||||||
|
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
text: "Save changes"
|
text: "Save changes"
|
||||||
color: hifi.buttons.blue
|
color: 1//hifi.buttons.blue
|
||||||
onClicked: root.saveAll()
|
onClicked: root.saveAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
text: "Cancel"
|
text: "Cancel"
|
||||||
color: hifi.buttons.white
|
color: 2//hifi.buttons.white
|
||||||
onClicked: root.restoreAll()
|
onClicked: root.restoreAll()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
|
||||||
|
|
||||||
import "../controls-uit"
|
import "../controls-uit"
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
@ -165,8 +164,8 @@ ModalWindow {
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
id: cancelAction
|
id: cancelAction
|
||||||
text: qsTr("Cancel")
|
text: qsTr("Cancel");
|
||||||
shortcut: Qt.Key_Escape
|
shortcut: "Esc"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.canceled();
|
root.canceled();
|
||||||
// FIXME we are leaking memory to avoid a crash
|
// FIXME we are leaking memory to avoid a crash
|
||||||
|
@ -176,10 +175,11 @@ ModalWindow {
|
||||||
visible = false;
|
visible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
id: acceptAction
|
id: acceptAction
|
||||||
text: qsTr("OK")
|
text: qsTr("OK");
|
||||||
shortcut: Qt.Key_Return
|
shortcut: "Return"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.result = items ? comboBox.currentText : textResult.text
|
root.result = items ? comboBox.currentText : textResult.text
|
||||||
root.selected(root.result);
|
root.selected(root.result);
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "../windows"
|
import "../windows"
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
import Hifi 1.0
|
import Hifi 1.0
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import "../controls-uit"
|
import "../controls-uit"
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
@ -297,7 +297,7 @@ TabletModalWindow {
|
||||||
Action {
|
Action {
|
||||||
id: cancelAction;
|
id: cancelAction;
|
||||||
text: qsTr("Cancel");
|
text: qsTr("Cancel");
|
||||||
shortcut: Qt.Key_Escape;
|
shortcut: "Esc";
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.result = null;
|
root.result = null;
|
||||||
root.canceled();
|
root.canceled();
|
||||||
|
@ -308,7 +308,7 @@ TabletModalWindow {
|
||||||
Action {
|
Action {
|
||||||
id: acceptAction;
|
id: acceptAction;
|
||||||
text: qsTr("Add");
|
text: qsTr("Add");
|
||||||
shortcut: Qt.Key_Return;
|
shortcut: "Return";
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
var result = {};
|
var result = {};
|
||||||
if (textInput) {
|
if (textInput) {
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import Qt.labs.folderlistmodel 2.1
|
import Qt.labs.folderlistmodel 2.1
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
|
import QtQuick.Controls 1.4 as QQC1
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import ".."
|
import ".."
|
||||||
import "../controls-uit"
|
import "../controls-uit"
|
||||||
|
@ -538,7 +538,7 @@ TabletModalWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TableViewColumn {
|
QQC1.TableViewColumn {
|
||||||
id: fileNameColumn
|
id: fileNameColumn
|
||||||
role: "fileName"
|
role: "fileName"
|
||||||
title: "Name"
|
title: "Name"
|
||||||
|
@ -546,7 +546,7 @@ TabletModalWindow {
|
||||||
movable: false
|
movable: false
|
||||||
resizable: true
|
resizable: true
|
||||||
}
|
}
|
||||||
TableViewColumn {
|
QQC1.TableViewColumn {
|
||||||
id: fileMofifiedColumn
|
id: fileMofifiedColumn
|
||||||
role: "fileModified"
|
role: "fileModified"
|
||||||
title: "Date"
|
title: "Date"
|
||||||
|
@ -555,7 +555,7 @@ TabletModalWindow {
|
||||||
resizable: true
|
resizable: true
|
||||||
visible: !selectDirectory
|
visible: !selectDirectory
|
||||||
}
|
}
|
||||||
TableViewColumn {
|
QQC1.TableViewColumn {
|
||||||
role: "fileSize"
|
role: "fileSize"
|
||||||
title: "Size"
|
title: "Size"
|
||||||
width: fileTableView.width - fileNameColumn.width - fileMofifiedColumn.width
|
width: fileTableView.width - fileNameColumn.width - fileMofifiedColumn.width
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
import Hifi 1.0
|
import Hifi 1.0
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
import "../controls-uit"
|
import "../controls-uit"
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
|
|
||||||
import "../controls-uit"
|
import "../controls-uit"
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import "../controls-uit"
|
import "../controls-uit"
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
@ -144,7 +144,7 @@ TabletModalWindow {
|
||||||
Action {
|
Action {
|
||||||
id: cancelAction
|
id: cancelAction
|
||||||
text: qsTr("Cancel")
|
text: qsTr("Cancel")
|
||||||
shortcut: Qt.Key_Escape
|
shortcut: "Esc"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.canceled();
|
root.canceled();
|
||||||
root.destroy();
|
root.destroy();
|
||||||
|
@ -153,7 +153,7 @@ TabletModalWindow {
|
||||||
Action {
|
Action {
|
||||||
id: acceptAction
|
id: acceptAction
|
||||||
text: qsTr("OK")
|
text: qsTr("OK")
|
||||||
shortcut: Qt.Key_Return
|
shortcut: "Return"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.result = items ? comboBox.currentText : textResult.text
|
root.result = items ? comboBox.currentText : textResult.text
|
||||||
root.selected(root.result);
|
root.selected(root.result);
|
||||||
|
|
|
@ -8,8 +8,9 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.3
|
||||||
|
import QtQuick.Controls 1.5 as QQC1
|
||||||
|
|
||||||
import "../../controls-uit"
|
import "../../controls-uit"
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
|
@ -362,7 +363,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TableViewColumn {
|
QQC1.TableViewColumn {
|
||||||
id: fileNameColumn
|
id: fileNameColumn
|
||||||
role: "fileName"
|
role: "fileName"
|
||||||
title: "Name"
|
title: "Name"
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.2
|
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
|
|
||||||
import "../../controls-uit"
|
import "../../controls-uit"
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
|
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import "../../controls-uit" as HiFiControls
|
import "../../controls-uit" as HiFiControls
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "../controls-uit"
|
import "../controls-uit"
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtWebEngine 1.5;
|
import QtWebEngine 1.5;
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
|
|
||||||
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import "../desktop" as OriginalDesktop
|
import "../desktop" as OriginalDesktop
|
||||||
import ".."
|
import ".."
|
||||||
import "."
|
import "."
|
||||||
import "./toolbars"
|
import "./toolbars"
|
||||||
|
import "../controls-uit"
|
||||||
|
|
||||||
OriginalDesktop.Desktop {
|
OriginalDesktop.Desktop {
|
||||||
id: desktop
|
id: desktop
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../styles-uit"
|
import "../styles-uit"
|
||||||
import "../controls-uit" as HifiControlsUit
|
import "../controls-uit" as HifiControlsUit
|
||||||
import "../controls" as HifiControls
|
import "../controls" as HifiControls
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Layouts 1.3
|
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Layouts 1.3
|
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
import TabletScriptingInterface 1.0
|
import TabletScriptingInterface 1.0
|
||||||
|
|
|
@ -9,9 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
|
@ -57,31 +56,31 @@ RowLayout {
|
||||||
HifiConstants { id: hifi; }
|
HifiConstants { id: hifi; }
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
style: ButtonStyle {
|
id: control
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
implicitWidth: 20;
|
implicitWidth: 20;
|
||||||
implicitHeight: 20;
|
implicitHeight: 20;
|
||||||
radius: hifi.buttons.radius;
|
radius: hifi.buttons.radius;
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
GradientStop {
|
GradientStop {
|
||||||
position: 0.2;
|
position: 0.2;
|
||||||
color: isPlaying ? hifi.buttons.colorStart[hifi.buttons.blue] : hifi.buttons.colorStart[hifi.buttons.black];
|
color: isPlaying ? hifi.buttons.colorStart[hifi.buttons.blue] : hifi.buttons.colorStart[hifi.buttons.black];
|
||||||
}
|
}
|
||||||
GradientStop {
|
GradientStop {
|
||||||
position: 1.0;
|
position: 1.0;
|
||||||
color: isPlaying ? hifi.buttons.colorFinish[hifi.buttons.blue] : hifi.buttons.colorFinish[hifi.buttons.black];
|
color: isPlaying ? hifi.buttons.colorFinish[hifi.buttons.blue] : hifi.buttons.colorFinish[hifi.buttons.black];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
label: HiFiGlyphs {
|
|
||||||
// absolutely position due to asymmetry in glyph
|
|
||||||
x: isPlaying ? 0 : 1;
|
|
||||||
y: 1;
|
|
||||||
size: 14;
|
|
||||||
color: (control.pressed || control.hovered) ? (isPlaying ? "black" : hifi.colors.primaryHighlight) : "white";
|
|
||||||
text: isPlaying ? hifi.glyphs.stop_square : hifi.glyphs.playback_play;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
contentItem: HiFiGlyphs {
|
||||||
|
// absolutely position due to asymmetry in glyph
|
||||||
|
// x: isPlaying ? 0 : 1;
|
||||||
|
// y: 1;
|
||||||
|
size: 14;
|
||||||
|
color: (control.pressed || control.hovered) ? (isPlaying ? "black" : hifi.colors.primaryHighlight) : "white";
|
||||||
|
text: isPlaying ? hifi.glyphs.stop_square : hifi.glyphs.playback_play;
|
||||||
|
}
|
||||||
|
|
||||||
onClicked: isPlaying ? stopSound() : playSound();
|
onClicked: isPlaying ? stopSound() : playSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControlsUit
|
import "../../../controls-uit" as HifiControlsUit
|
||||||
import "../../../controls" as HifiControls
|
import "../../../controls" as HifiControls
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
|
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.5
|
||||||
import QtQuick.XmlListModel 2.0
|
import QtQuick.XmlListModel 2.0
|
||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ ModalWindow {
|
||||||
id: acceptAction
|
id: acceptAction
|
||||||
text: qsTr("OK")
|
text: qsTr("OK")
|
||||||
enabled: root.result ? true : false
|
enabled: root.result ? true : false
|
||||||
shortcut: Qt.Key_Return
|
shortcut: "Return"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.selected(root.result);
|
root.selected(root.result);
|
||||||
root.destroy();
|
root.destroy();
|
||||||
|
@ -114,7 +114,7 @@ ModalWindow {
|
||||||
Action {
|
Action {
|
||||||
id: cancelAction
|
id: cancelAction
|
||||||
text: qsTr("Cancel")
|
text: qsTr("Cancel")
|
||||||
shortcut: Qt.Key_Escape
|
shortcut: "Esc"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.canceled();
|
root.canceled();
|
||||||
root.destroy();
|
root.destroy();
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
import "../../windows"
|
import "../../windows"
|
||||||
import "content"
|
import "content"
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
|
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.2
|
||||||
import Hifi 1.0 as Hifi
|
import Hifi 1.0 as Hifi
|
||||||
|
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
|
@ -69,9 +69,8 @@ Rectangle {
|
||||||
id: textArea
|
id: textArea
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
backgroundVisible: false
|
background: Item {}
|
||||||
textColor: hifi.colors.white
|
color: hifi.colors.white
|
||||||
text:""
|
text:""
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
|
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
|
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
import "../../controls-uit" as HifiControls
|
import "../../controls-uit" as HifiControls
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
|
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
import "../../controls-uit" as HifiControls
|
import "../../controls-uit" as HifiControls
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
|
||||||
import Qt.labs.settings 1.0
|
|
||||||
|
|
||||||
import "."
|
import "."
|
||||||
import ".."
|
import ".."
|
||||||
|
@ -184,7 +180,7 @@ Item {
|
||||||
decimals: 2;
|
decimals: 2;
|
||||||
minimumValue: 0.01
|
minimumValue: 0.01
|
||||||
maximumValue: 10
|
maximumValue: 10
|
||||||
stepSize: 0.05;
|
realStepSize: 0.05;
|
||||||
value: attachment ? attachment.scale : 1.0
|
value: attachment ? attachment.scale : 1.0
|
||||||
colorScheme: hifi.colorSchemes.dark
|
colorScheme: hifi.colorSchemes.dark
|
||||||
onValueChanged: {
|
onValueChanged: {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControls
|
import "../../../controls-uit" as HifiControls
|
||||||
|
@ -57,12 +56,12 @@ Item {
|
||||||
colorScheme: hifi.colorSchemes.dark
|
colorScheme: hifi.colorSchemes.dark
|
||||||
colorLabelInside: hifi.colors.redHighlight
|
colorLabelInside: hifi.colors.redHighlight
|
||||||
decimals: root.decimals
|
decimals: root.decimals
|
||||||
stepSize: root.stepSize
|
realStepSize: root.stepSize
|
||||||
maximumValue: root.maximumValue
|
maximumValue: root.maximumValue
|
||||||
minimumValue: root.minimumValue
|
minimumValue: root.minimumValue
|
||||||
onValueChanged: {
|
onRealValueChanged: {
|
||||||
if (value !== vector.x) {
|
if (realValue !== vector.x) {
|
||||||
vector.x = value
|
vector.x = realValue
|
||||||
root.valueChanged();
|
root.valueChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControls
|
import "../../../controls-uit" as HifiControls
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue