-
Notifications
You must be signed in to change notification settings - Fork 0
/
PrefsTextField.qml
53 lines (45 loc) · 1.7 KB
/
PrefsTextField.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (C) 2024 Adesh Singh
import QtQuick 2.15
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.3
TextField {
id:control
property bool isBold: false
property real radius: 12
property color borderColor: activeFocus ? appStyle.appStyle : appStyle.borderColor
placeholderTextColor: appStyle.textColor
font.pixelSize: fontStyle.h3
font.bold: isBold ? Font.Bold : Font.Normal
font.weight: isBold ? Font.Bold : Font.Normal
color: appStyle.textColor
background:Rectangle{
implicitHeight: control.implicitHeight
implicitWidth: control.implicitWidth
radius: control.radius
color: appStyle.popupBackground
border.width: control.activeFocus ? 2 : 1
border.color: control.borderColor
}
QtObject {
id:appStyle
readonly property color background: "#232429"
readonly property color hoverColor: "#2a2d36"
readonly property color textBackground: "#2b2f3b"
readonly property color popupBackground: "#f2f2f2"
readonly property color appStyle: "#007aff"
readonly property color labelColor: "#85889b"
readonly property color textColor: "#000"
readonly property color borderColor: "#464a53"
readonly property color placeholderColor: "#757985"
}
QtObject {
id:fontStyle
readonly property int h1 : 32
readonly property int h2 : 24
readonly property double h3 : 18.72
readonly property int h4 : 16
readonly property double h5 : 13.28
readonly property double h6 : 10.72
readonly property int content : 14
}
}