aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/LineEdit.qml13
-rw-r--r--components/Style.qml1
2 files changed, 11 insertions, 3 deletions
diff --git a/components/LineEdit.qml b/components/LineEdit.qml
index 115b92b3..f7266d2c 100644
--- a/components/LineEdit.qml
+++ b/components/LineEdit.qml
@@ -32,9 +32,15 @@ import "." 1.0
Item {
id: item
property alias text: input.text
+
property alias placeholderText: placeholderLabel.text
property bool placeholderCenter: false
+ property string placeholderFontFamily: Style.fontRegular.name
+ property bool placeholderFontBold: false
property int placeholderFontSize: 18 * scaleRatio
+ property string placeholderColor: Style.defaultFontColor
+ property real placeholderOpacity: 0.25
+
property alias validator: input.validator
property alias readOnly : input.readOnly
property alias cursorPosition: input.cursorPosition
@@ -148,10 +154,11 @@ Item {
else { return 10 * scaleRatio; }
}
- opacity: 0.25
- color: Style.defaultFontColor
- font.family: Style.fontRegular.name
+ opacity: item.placeholderOpacity
+ color: item.placeholderColor
+ font.family: item.placeholderFontFamily
font.pixelSize: placeholderFontSize * scaleRatio
+ font.bold: item.placeholderFontBold
text: ""
z: 3
}
diff --git a/components/Style.qml b/components/Style.qml
index ffe9c194..3b917f97 100644
--- a/components/Style.qml
+++ b/components/Style.qml
@@ -16,6 +16,7 @@ QtObject {
property string inputBoxBackground: "black"
property string inputBoxBackgroundError: "#FFDDDD"
property string inputBoxColor: "white"
+ property string legacy_placeholderFontColor: "#BABABA"
property string buttonBackgroundColor: "#FA6800"
property string buttonBackgroundColorHover: "#E65E00"