mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:58:51 +02:00
Style avatar browser field
This commit is contained in:
parent
1a331fcdac
commit
50ebbe362d
1 changed files with 20 additions and 15 deletions
|
@ -1,15 +1,26 @@
|
||||||
|
//
|
||||||
|
// AvatarPreference.qml
|
||||||
|
//
|
||||||
|
// Created by Bradley Austin Davis on 22 Jan 2016
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
import "../../dialogs"
|
||||||
|
import "../../controls-uit"
|
||||||
|
|
||||||
Preference {
|
Preference {
|
||||||
id: root
|
id: root
|
||||||
property alias buttonText: button.text
|
|
||||||
property alias text: dataTextField.text
|
property alias text: dataTextField.text
|
||||||
|
property alias buttonText: button.text
|
||||||
property alias placeholderText: dataTextField.placeholderText
|
property alias placeholderText: dataTextField.placeholderText
|
||||||
property real spacing: 8
|
property real spacing: 0
|
||||||
property var browser;
|
property var browser;
|
||||||
height: labelText.height + Math.max(dataTextField.height, button.height) + spacing
|
height: Math.max(dataTextField.controlHeight, button.height) + spacing
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
dataTextField.text = preference.value;
|
dataTextField.text = preference.value;
|
||||||
|
@ -41,24 +52,18 @@ Preference {
|
||||||
preference.save();
|
preference.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
|
||||||
id: labelText
|
|
||||||
color: enabled ? "black" : "gray"
|
|
||||||
text: root.label
|
|
||||||
}
|
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: dataTextField
|
id: dataTextField
|
||||||
placeholderText: root.placeholderText
|
placeholderText: root.placeholderText
|
||||||
text: preference.value
|
text: preference.value
|
||||||
style: TextFieldStyle { renderType: Text.QtRendering }
|
label: root.label
|
||||||
anchors {
|
anchors {
|
||||||
top: labelText.bottom
|
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: button.left
|
right: button.left
|
||||||
topMargin: root.spacing
|
rightMargin: hifi.dimensions.contentSpacing.x
|
||||||
rightMargin: root.spacing
|
bottomMargin: spacing
|
||||||
}
|
}
|
||||||
|
colorScheme: hifi.colorSchemes.dark
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
|
Loading…
Reference in a new issue