summaryrefslogtreecommitdiffstats
path: root/src/controls/Styles/Base/TextFieldStyle.qml
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-10-25 13:20:38 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-31 13:23:58 +0100
commitfd8d7261cc25a7a2efcf42c59f9f11d0280e4383 (patch)
tree3017fb73886fa5c6966e65b7d8d484a2cd54732f /src/controls/Styles/Base/TextFieldStyle.qml
parent6c5bcbf23928094338da90be2cd4a2787104cf03 (diff)
More styling improvements for Base Style
- Better scalability - Retina support - Added glow filter to Private - Added focus rects Change-Id: I2ec36a9db546c21e20408429c5e17fde8d67b7c3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/controls/Styles/Base/TextFieldStyle.qml')
-rw-r--r--src/controls/Styles/Base/TextFieldStyle.qml35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/controls/Styles/Base/TextFieldStyle.qml b/src/controls/Styles/Base/TextFieldStyle.qml
index e05ae82cf..8b4494d18 100644
--- a/src/controls/Styles/Base/TextFieldStyle.qml
+++ b/src/controls/Styles/Base/TextFieldStyle.qml
@@ -77,7 +77,7 @@ Style {
readonly property TextField control: __control
/*! The content margins of the text field. */
- padding { top: 4 ; left: 6 ; right: 6 ; bottom:4 }
+ padding { top: 4 ; left: TextSingleton.implicitHeight/3 ; right: TextSingleton.implicitHeight/3 ; bottom:4 }
/*! The current font. */
property font font
@@ -113,25 +113,24 @@ Style {
/*! The background of the text field. */
property Component background: Item {
- implicitWidth: 100
- implicitHeight: Math.max(25, Math.round(TextSingleton.implicitHeight * 1.1))
- BorderImage {
+ implicitWidth: Math.round(TextSingleton.implicitHeight * 8)
+ implicitHeight: Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2))
+ Rectangle {
anchors.fill: parent
- anchors.margins: -1
- source: "images/editbox.png"
- border.left: 4
- border.right: 4
- border.top: 4
- border.bottom: 4
- BorderImage {
- anchors.fill: parent
- source: "images/focusframe.png"
- visible: control.activeFocus
- border.left: 4
- border.right: 4
- border.top: 4
- border.bottom: 4
+ anchors.bottomMargin: -1
+ color: "#44ffffff"
+ radius: baserect.radius
+ }
+ Rectangle {
+ id: baserect
+ gradient: Gradient {
+ GradientStop {color: "#e0e0e0" ; position: 0}
+ GradientStop {color: "#fff" ; position: 0.1}
+ GradientStop {color: "#fff" ; position: 1}
}
+ radius: TextSingleton.implicitHeight * 0.16
+ anchors.fill: parent
+ border.color: control.activeFocus ? "#47b" : "#999"
}
}