mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +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.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
|
||||
import "../../dialogs"
|
||||
import "../../controls-uit"
|
||||
|
||||
Preference {
|
||||
id: root
|
||||
property alias buttonText: button.text
|
||||
property alias text: dataTextField.text
|
||||
property alias buttonText: button.text
|
||||
property alias placeholderText: dataTextField.placeholderText
|
||||
property real spacing: 8
|
||||
property real spacing: 0
|
||||
property var browser;
|
||||
height: labelText.height + Math.max(dataTextField.height, button.height) + spacing
|
||||
height: Math.max(dataTextField.controlHeight, button.height) + spacing
|
||||
|
||||
Component.onCompleted: {
|
||||
dataTextField.text = preference.value;
|
||||
|
@ -41,24 +52,18 @@ Preference {
|
|||
preference.save();
|
||||
}
|
||||
|
||||
Text {
|
||||
id: labelText
|
||||
color: enabled ? "black" : "gray"
|
||||
text: root.label
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: dataTextField
|
||||
placeholderText: root.placeholderText
|
||||
text: preference.value
|
||||
style: TextFieldStyle { renderType: Text.QtRendering }
|
||||
label: root.label
|
||||
anchors {
|
||||
top: labelText.bottom
|
||||
left: parent.left
|
||||
right: button.left
|
||||
topMargin: root.spacing
|
||||
rightMargin: root.spacing
|
||||
rightMargin: hifi.dimensions.contentSpacing.x
|
||||
bottomMargin: spacing
|
||||
}
|
||||
colorScheme: hifi.colorSchemes.dark
|
||||
}
|
||||
|
||||
Component {
|
||||
|
|
Loading…
Reference in a new issue