Commit 01b527c0 authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

[textfield] Textfield styling

parent e3e92d46
......@@ -83,6 +83,12 @@ Item {
readOnly: true
}
TextField {
anchors.margins: 20
text: "Disabled textfield"
enabled: false
}
TextField {
anchors.margins: 20
text: "Text input"
......
......@@ -19,7 +19,32 @@
import QtQuick 2.1
import QtQuick.Controls.Styles 1.0
import QtQuick.Controls.Styles.Nemo 1.0
TextFieldStyle {
selectedTextColor: Theme.textField.selectedTextColor
selectionColor: Theme.textField.selectionColor
textColor: Theme.textField.selectedTextColor
font.pixelSize: 24
background: Item {
implicitHeight: 40
implicitWidth: 320
anchors.leftMargin: 16
anchors.rightMargin: 16
opacity: control.enabled ? 1 : 0.6
Image {
anchors.fill: parent
visible: !control.enabled
source: "images/disabled-overlay-inverse.png"
fillMode: Image.Tile
}
Rectangle {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
height: 2
width: parent.width
color: Theme.textField.selectionColor
}
}
}
......@@ -21,5 +21,4 @@ import QtQuick 2.1
import QtQuick.Controls.Styles.Private 1.0
ToolBarStyle {
}
......@@ -76,5 +76,10 @@ QtObject {
foregroundColor: themeConfig.groove.foreground,
backgroundColor: themeConfig.groove.background,
})
property var textField:
({
selectionColor: themeConfig.textField.selectionColor,
selectedTextColor: themeConfig.textField.selectedTextColor,
})
}
......@@ -50,3 +50,8 @@ var groove = {
background: fillColorDark,
}
// TEXTFIELD INPUT
var textField = {
selectedTextColor: "#ffffff",
selectionColor: "#0091e5",
}
......@@ -50,3 +50,8 @@ var groove = {
background: fillColorDark,
}
// TEXTFIELD INPUT
var textField = {
selectedTextColor: "#ffffff",
selectionColor: "#0091e5",
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment