Style avatar browser field

This commit is contained in:
David Rowe 2016-02-27 14:06:33 +13:00
parent 1a331fcdac
commit 50ebbe362d

View file

@ -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 {