Add a text field style that can be used for generic text fields

Based on the setting text field style.

Contributes to Asana issue 33752130551782
This commit is contained in:
Arjen Hiemstra 2015-06-05 18:55:10 +02:00
parent 66e50ceb37
commit 8db06b8305

View File

@ -246,4 +246,32 @@ QtObject {
} }
} }
} }
property Component text_field: Component {
TextFieldStyle {
textColor: UM.Theme.colors.setting_control_text;
font: UM.Theme.fonts.default;
background: Rectangle
{
implicitHeight: control.height;
implicitWidth: control.width;
border.width: 1;
border.color: UM.Theme.colors.setting_control_border;
color: UM.Theme.colors.setting_validation_ok;
Label {
anchors.right: parent.right;
anchors.rightMargin: UM.Theme.sizes.setting_unit_margin.width;
anchors.verticalCenter: parent.verticalCenter;
text: control.unit ? control.unit : ""
color: UM.Theme.colors.setting_unit;
font: UM.Theme.fonts.default;
}
}
}
}
} }