diff --git a/Gui/CompanyConf.qml b/Gui/CompanyConf.qml
index ff60813..d76f9af 100644
--- a/Gui/CompanyConf.qml
+++ b/Gui/CompanyConf.qml
@@ -66,8 +66,6 @@ ColumnLayout
Label
{
text: qsTr("PLZ")
- // font.pixelSize: 57
- // font.bold: true
}
ComboBox
diff --git a/TeroStyle/Colors.qml b/TeroStyle/Colors.qml
index 9055494..c5844a7 100644
--- a/TeroStyle/Colors.qml
+++ b/TeroStyle/Colors.qml
@@ -14,4 +14,6 @@ QtObject {
readonly property color mantle: theme === dark ? "#1e1f22" : "#e7e9ef"
readonly property color interactive: theme === dark ? "#878b97" : "#d9d9da"
readonly property color error: theme === dark ? "#ff2264" : "#ff004b"
+
+ readonly property double highlightOpacity: .3
}
\ No newline at end of file
diff --git a/TeroStyle/ComboBox.qml b/TeroStyle/ComboBox.qml
new file mode 100644
index 0000000..b97e813
--- /dev/null
+++ b/TeroStyle/ComboBox.qml
@@ -0,0 +1,75 @@
+import QtQuick
+import QtQuick.Templates as T
+import QtQuick.Controls
+
+T.ComboBox {
+ id: control
+
+ font: Typography.body
+ implicitHeight: background.height
+ padding: Dimensions.m
+
+ background: Rectangle {
+ border.color: Colors.interactive
+ border.width: 1
+ color: Colors.mantle
+ height: 47
+ radius: Dimensions.radius
+ }
+
+ delegate: T.ItemDelegate {
+ width: control.width
+ height: implicitContentHeight + topPadding + bottomPadding
+ padding: Dimensions.s
+ leftPadding: control.leftPadding
+ contentItem: Label {
+ text: control.textRole ? model[control.textRole] : modelData
+ color: Colors.foreground
+ elide: Text.ElideRight
+ verticalAlignment: Text.AlignVCenter
+ }
+ highlighted: control.highlightedIndex === index
+ }
+ indicator: Label {
+ x: control.width - width
+ height: control.height
+ width: contentWidth + Dimensions.s * 2
+ text: "▼"
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ padding: Dimensions.s
+
+ background: Rectangle {
+ anchors.fill: parent
+ color: Colors.primary
+ topRightRadius: Dimensions.radius
+ bottomRightRadius: Dimensions.radius
+ border.color: Colors.interactive
+ }
+ }
+
+ popup: T.Popup {
+ y: control.height
+ z: 2
+ width: control.width
+ contentItem: ListView {
+ clip: true
+ implicitHeight: contentHeight
+ model: control.popup.visible ? control.delegateModel : null
+ currentIndex: control.highlightedIndex
+
+ highlight: Rectangle {
+ color: Colors.primary
+ opacity: Colors.highlightOpacity
+ }
+
+ ScrollIndicator.vertical: ScrollIndicator {}
+ }
+
+ background: Rectangle {
+ color: Colors.mantle
+ border.color: Colors.interactive
+ radius: Dimensions.radius
+ }
+ }
+}
\ No newline at end of file
diff --git a/TeroStyle/TextField.qml b/TeroStyle/TextField.qml
index 9c64208..b5f8da9 100644
--- a/TeroStyle/TextField.qml
+++ b/TeroStyle/TextField.qml
@@ -2,11 +2,12 @@ import QtQuick
import QtQuick.Templates as T
T.TextField {
+ id: control
background: Rectangle {
id: background
color: Colors.mantle
radius: Dimensions.radius
- border.width: 1
+ border.width: !control.focus ? 1 : 2
border.color: Colors.interactive
height: 47
}
diff --git a/TeroStyle/Typography.qml b/TeroStyle/Typography.qml
index 7014ca3..ec5e21f 100644
--- a/TeroStyle/Typography.qml
+++ b/TeroStyle/Typography.qml
@@ -13,21 +13,14 @@ Item {
pointSize: 16,
weight: Font.Medium,
letterSpacing: 0,
- kerning: true
+ kerning: true,
})
readonly property font h1: ({
family: body.family,
pointSize: 38,
weight: body.weight,
- letterSpacing: body.letterSpacing
-
+ letterSpacing: body.letterSpacing,
+ kerning: body.kerning,
})
- //
- // readonly property font h2: ({
- // family: regular.font,
- // pointSize: 38,
- // weight: Font.Normal
- // })
-
}
\ No newline at end of file
diff --git a/TeroStyle/qmldir b/TeroStyle/qmldir
index 79ef426..e95abc1 100644
--- a/TeroStyle/qmldir
+++ b/TeroStyle/qmldir
@@ -3,5 +3,6 @@ singleton Colors Colors.qml
singleton Dimensions Dimensions.qml
singleton Typography Typography.qml
Button Button.qml
+ComboBox ComboBox.qml
Field Field.qml
TextField TextField.qml
\ No newline at end of file
diff --git a/fonts/Damarwulan.ttf b/fonts/Damarwulan.ttf
deleted file mode 100644
index 20d9fac..0000000
Binary files a/fonts/Damarwulan.ttf and /dev/null differ
diff --git a/fonts/HelloStranger.otf b/fonts/HelloStranger.otf
deleted file mode 100644
index 61cdd2e..0000000
Binary files a/fonts/HelloStranger.otf and /dev/null differ
diff --git a/fonts/HussarPrintA.otf b/fonts/HussarPrintA.otf
deleted file mode 100644
index cab9d2f..0000000
Binary files a/fonts/HussarPrintA.otf and /dev/null differ
diff --git a/fonts/LittleBirdsRegular.ttf b/fonts/LittleBirdsRegular.ttf
deleted file mode 100644
index 942ec04..0000000
Binary files a/fonts/LittleBirdsRegular.ttf and /dev/null differ
diff --git a/pyqcrm.qrc b/pyqcrm.qrc
index 88cde4e..5fb0d1b 100644
--- a/pyqcrm.qrc
+++ b/pyqcrm.qrc
@@ -12,10 +12,6 @@
sounds/puzzerr.ogg
sounds/sysnotify.ogg
sounds/wrong.ogg
- fonts/Damarwulan.ttf
- fonts/HelloStranger.otf
- fonts/HussarPrintA.otf
- fonts/LittleBirdsRegular.ttf
fonts/RobotoCondensed.otf
images/account.svg
README
diff --git a/qml.qrc b/qml.qrc
index c240c9e..bd61e1b 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -51,6 +51,7 @@
Gui/OfferTable.qml
TeroStyle/Button.qml
TeroStyle/Colors.qml
+ TeroStyle/ComboBox.qml
TeroStyle/Field.qml
TeroStyle/Dimensions.qml
TeroStyle/qmldir