mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-29 07:14:24 +08:00
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:
parent
66e50ceb37
commit
8db06b8305
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user