diff --git a/Gui/AddNewObject.qml b/Gui/AddNewObject.qml
index 5e2ab19..c3dd26b 100644
--- a/Gui/AddNewObject.qml
+++ b/Gui/AddNewObject.qml
@@ -16,7 +16,7 @@ GridLayout
Label
{
- text: qsTr("Straße")
+ text: qsTr("Straße*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -27,13 +27,11 @@ GridLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: checkFields()
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
}
Label
{
- text: qsTr("Nr.")
+ text: qsTr("Nr.*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -44,8 +42,6 @@ GridLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: checkFields()
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
}
// New grid row
@@ -197,7 +193,7 @@ GridLayout
Label
{
- text: qsTr("Reinigungsmittel wo?")
+ text: qsTr("Reinigungsmittel wo?*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -206,8 +202,6 @@ GridLayout
property string name: "cleaningproducts"
id: cleaningproducts
Layout.fillWidth: true
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
onTextChanged: checkFields()
}
Item
diff --git a/Gui/ApplicantPersonalData.qml b/Gui/ApplicantPersonalData.qml
index 19e34c6..d159c4f 100644
--- a/Gui/ApplicantPersonalData.qml
+++ b/Gui/ApplicantPersonalData.qml
@@ -37,7 +37,7 @@ GridLayout
}
Label
{
- text: qsTr("Vorname")
+ text: qsTr("Vorname*")
Layout.alignment: Qt.AlignRight
}
TextField
@@ -45,14 +45,12 @@ GridLayout
property string name: "firstname"
id: firstname
Layout.fillWidth: true
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
onTextChanged: checkFields()
Layout.columnSpan: 3
}
Label
{
- text: qsTr("Nachname")
+ text: qsTr("Nachname*")
Layout.alignment: Qt.AlignRight
}
TextField
@@ -60,8 +58,6 @@ GridLayout
property string name: "lastname"
id: lastname
Layout.fillWidth: true
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
onTextChanged: checkFields()
Layout.columnSpan: 3
}
@@ -164,7 +160,7 @@ GridLayout
}
Label
{
- text: qsTr("Geburtsdatum")
+ text: qsTr("Geburtsdatum*")
Layout.alignment: Qt.AlignRight
visible: radio.children[1].checked
}
@@ -173,8 +169,6 @@ GridLayout
property string name: "birthday"
id: birthday
Layout.fillWidth: true
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
onTextChanged: checkFields()
Layout.columnSpan: 3
visible: radio.children[1].checked
@@ -195,7 +189,7 @@ GridLayout
Label
{
- text: qsTr("Geburtsort")
+ text: qsTr("Geburtsort*")
Layout.alignment: Qt.AlignRight
visible: radio.children[1].checked
}
@@ -204,8 +198,6 @@ GridLayout
property string name: "placeofbirth"
id: placeofbirth
Layout.fillWidth: true
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
onTextChanged: checkFields()
Layout.columnSpan: 3
visible: radio.children[1].checked
diff --git a/Gui/CustomerView.qml b/Gui/CustomerView.qml
index 2b5f8a3..09a8622 100644
--- a/Gui/CustomerView.qml
+++ b/Gui/CustomerView.qml
@@ -16,11 +16,10 @@ GridLayout
Label
{
id: lblFirmenName
- text: qsTr("Firmenname")
+ text: qsTr("Firmenname*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
-
TextField
{
property string name: "business"
@@ -29,34 +28,26 @@ GridLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: checkFields()
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
Layout.columnSpan: 3
-
-
}
Label
{
- text: qsTr("Straße")
+ text: qsTr("Straße*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
-
-
TextField
{
property string name: "street"
id: streetid
Layout.fillWidth: true
onTextChanged: checkFields()
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
}
Label
{
- text: qsTr("Nr.")
+ text: qsTr("Nr.*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -66,8 +57,6 @@ GridLayout
id: housenoid
Layout.fillWidth: true
onTextChanged: checkFields()
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
validator: RegularExpressionValidator
{
regularExpression: /([0-9a-zA-Z\-]{1,6})/
diff --git a/Gui/CustomersTable.qml b/Gui/CustomersTable.qml
index 08337f5..b88dafd 100644
--- a/Gui/CustomersTable.qml
+++ b/Gui/CustomersTable.qml
@@ -3,175 +3,159 @@ import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.qmlmodels
-
-Item
-{
- SearchBar
- {
- id:searchBar
- anchors.margins: 9
+ColumnLayout {
+ function viewCriterion(criterion) {
+ business_model.viewCriterion(criterion.text);
}
- Button
- {
- id: addBusinessBtn
- icon.source: "qrc:/images/addbusiness.svg"
- icon.color: "olive"
- anchors.right: parent.right
- flat: true
- onClicked: appLoader.source = "AddCustomer.qml"
- }
+ anchors.fill: parent
- ColumnLayout
- {
- id: tableColumn
+ Component.onCompleted: customersStack.pop()
+
+ RowLayout {
+ Layout.fillWidth: true
+ Layout.horizontalStretchFactor: 1
+ spacing: Dimensions.l
+
+ SearchBar {
+ }
+
+ QuickFilter {
+ onSelectedChanged: (name) => {
+ business_model.viewCriterion(name)
+ }
+
+ model: ListModel {
+ ListElement {
+ name: "Alle"
+ text: qsTr("Alle")
+ selected: true
+ }
+ ListElement {
+ name: "showProvider"
+ text: qsTr("Interessent")
+ selected: false
+ }
+ ListElement {
+ name: "showClientele"
+ text: qsTr("Kunde")
+ selected: false
+ }
+ ListElement {
+ name: "showProvider"
+ text: qsTr("Lieferant")
+ selected: false
+ }
+ ListElement {
+ name: "showFinished"
+ text: qsTr("Erledigt")
+ selected: false
+ }
+ }
+ }
+ Button {
+ id: addCustomer
+
+ Layout.alignment: Qt.AlignRight
+ icon.source: "qrc:/images/PlusCircle.svg"
+ text: qsTr("Kunde Hinzufügen")
+
+ onClicked: appLoader.source = "AddCustomer.qml"
+ }
+ }
+ ColumnLayout {
clip: true
- anchors
- {
- top: searchBar.bottom
- bottom: parent.bottom
- left: parent.left
- right: parent.right
- }
- RowLayout
- {
- id: sortView
- RadioButton
- {
- id: showAll
- checked: true
- text: qsTr("Alle")
- onClicked: viewCriterion(showAll)
- }
- RadioButton
- {
- id: showInterested
- text: qsTr("Interessent")
- onClicked: viewCriterion(showInterested)
- }
- RadioButton
- {
- id: showClientele
- text: qsTr("Kunden")
- onClicked: viewCriterion(showClientele)
- }
- RadioButton
- {
- id: showProvider
- text: qsTr("Lieferant")
- onClicked: viewCriterion(showProvider)
- }
- RadioButton
- {
- id: showFinished
- text: qsTr("Erledigt")
- onClicked: viewCriterion(showFinished)
- }
- }
-
- HorizontalHeaderView
- {
+ HorizontalHeaderView {
id: horizontalHeader
+
Layout.fillWidth: true
implicitHeight: 40
movableColumns: true //@disable-check M16
syncView: customerTable
- delegate: Rectangle
- {
- color: addBusinessBtn.palette.alternateBase
- border.color: addBusinessBtn.palette.base
- implicitHeight: 40
+
+ delegate: Rectangle {
Layout.fillWidth: true
+ border.color: addCustomer.palette.base
+ color: addCustomer.palette.alternateBase
+ implicitHeight: 40
implicitWidth: 1
- Text
- {
- text: model.display
+
+ Text {
+ color: addCustomer.palette.text
elide: Text.ElideRight
- width: parent.width
height: parent.height
horizontalAlignment: Text.AlignHCenter
+ text: model.display
verticalAlignment: Text.AlignVCenter
- color: addBusinessBtn.palette.text
+ width: parent.width
}
}
}
-
- TableView
- {
- property real newWidth: 0
+ TableView {
id: customerTable
- z: 1
+
+ property real newWidth: 0
+
Layout.fillHeight: true
- //height: tableColumn.height - (sortView.height + horizontalHeader.height)
Layout.fillWidth: true
- columnSpacing: 1
- rowSpacing: 2
- model: business_model
alternatingRows: true
+ columnSpacing: 1
+ model: business_model
resizableColumns: true
+ rowSpacing: 2
selectionBehavior: TableView.SelectRows
- ScrollBar.vertical: ScrollBar
- {
+ z: 1
+
+ ScrollBar.vertical: ScrollBar {
policy: customerTable.contentHeight > customerTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
}
-
- selectionModel: ItemSelectionModel
- {
- id: selModel
- model: customerTable.model
- }
- delegate:Rectangle
- {
- required property bool selected
+ delegate: Rectangle {
required property bool current
- implicitWidth: customerTable.width / customerTable.columns
+ required property bool selected
+
+ color: selected ? addCustomer.palette.highlight //palette.highlight
+ : (customerTable.alternatingRows && row % 2 !== 0 ? addCustomer.palette.base // palette.base
+ : addCustomer.palette.alternateBase) //palette.alternateBase)
implicitHeight: 25
- color: selected
- ? addBusinessBtn.palette.highlight //palette.highlight
- : (customerTable.alternatingRows && row % 2 !== 0
- ? addBusinessBtn.palette.base // palette.base
- : addBusinessBtn.palette.alternateBase) //palette.alternateBase)
- Text
- {
- text: model.display == null? "": model.display // @disable-check M126
+ implicitWidth: customerTable.width / customerTable.columns
+
+ Text {
+ color: addCustomer.palette.text
elide: Text.ElideRight
- width: parent.width
height: parent.height
- verticalAlignment: Text.AlignVCenter
leftPadding: 9
- color: addBusinessBtn.palette.text
+ text: model.display == null ? "" : model.display // @disable-check M126
+ verticalAlignment: Text.AlignVCenter
+ width: parent.width
}
- MouseArea
- {
- property bool hovered: false
+ MouseArea {
id: mouseArea
+
+ property bool hovered: false
+
anchors.fill: parent
hoverEnabled: true
- onDoubleClicked:
- {
- business_model.onRowClicked(row)
- customersStack.push("CustomerDetails.qml", {selectedClient: row});
- }
- onEntered:
- {
- customerTable.selectionModel.select(customerTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
+ onDoubleClicked: {
+ business_model.onRowClicked(row);
+ customersStack.push("CustomerDetails.qml", {
+ selectedClient: row
+ });
+ }
+ onEntered: {
+ customerTable.selectionModel.select(customerTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows);
}
}
}
- }
+ selectionModel: ItemSelectionModel {
+ id: selModel
- Item
- {
+ model: customerTable.model
+ }
+ }
+ Item {
Layout.fillWidth: true
}
}
-
- function viewCriterion(criterion)
- {
- business_model.viewCriterion(criterion.text)
- }
-
- Component.onCompleted: customersStack.pop()
}
diff --git a/Gui/EmployeesTable.qml b/Gui/EmployeesTable.qml
index 2a7a4f2..aaffbec 100644
--- a/Gui/EmployeesTable.qml
+++ b/Gui/EmployeesTable.qml
@@ -16,8 +16,8 @@ Item
Button
{
id: addEmployeeBtn
- icon.source: "qrc:/images/addbusiness.svg"
- icon.color: "olive"
+ text: qsTr("Mitarbeiter Hinzufügen")
+ icon.source: "qrc:/images/PlusCircle.svg"
anchors.right: parent.right
flat: true
onClicked: appLoader.source = "AddApplicant.qml"
diff --git a/Gui/LoginScreen.qml b/Gui/LoginScreen.qml
index c1d4b8c..a00d58c 100644
--- a/Gui/LoginScreen.qml
+++ b/Gui/LoginScreen.qml
@@ -32,16 +32,15 @@ Item {
}
ColumnLayout {
- spacing: Dimensions.m
anchors.centerIn: parent
+ spacing: Dimensions.m
Label {
- font: Typography.h1
- text: qsTr("Login")
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: Dimensions.l
+ font: Typography.h1
+ text: qsTr("Login")
}
-
Field {
label: qsTr("Benutzername")
@@ -78,11 +77,11 @@ Item {
}
}
}
-
Button {
Layout.topMargin: Dimensions.m
+ implicitWidth: parent.width
+ icon.source: "qrc:/images/ArrowRightEndOnRectangle.svg"
text: qsTr("Login")
- width: parent.width
onClicked: {
if (benutzerName.text.trim() && passwort.text.trim())
diff --git a/Gui/ObjectAddOnContactPerson.qml b/Gui/ObjectAddOnContactPerson.qml
index bd3e6e1..9f14a7c 100644
--- a/Gui/ObjectAddOnContactPerson.qml
+++ b/Gui/ObjectAddOnContactPerson.qml
@@ -35,71 +35,45 @@ GridLayout
}
Label
{
- text: qsTr("Vorname")
+ text: qsTr("Vorname*")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: firstname
Layout.fillWidth: true
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
// onTextChanged: checkContactFields()
}
Label
{
- text: qsTr("Nachname")
+ text: qsTr("Nachname*")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: lastname
Layout.fillWidth: true
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
}
Label
{
- text: qsTr("Telefonnummer")
+ text: mobile.text ? qsTr("Telefonnummer") : qsTr("Telefonnummer*")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: phonenumber
Layout.fillWidth: true
- placeholderText: mobile.text ? "" : "Pflichtfeld"
- placeholderTextColor: "red"
-
-
-
}
Label
{
- text: qsTr("Mobil")
+ text: phonenumber.text ? qsTr("Mobil") : qsTr("Mobil*")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: mobile
Layout.fillWidth: true
- placeholderText: phonenumber.text ? "" : "Pflichtfeld"
- placeholderTextColor: "red"
-
-
-
}
- // Label
- // {
- // text: qsTr("Position")
- // Layout.alignment: Qt.AlignRight
- // }
- // TextField
- // {
- // id: posizion
- // Layout.fillWidth: true
- // placeholderText: "Pflichtfeld"
- // placeholderTextColor: "red"
- // }
RowLayout
{
diff --git a/Gui/ObjectView.qml b/Gui/ObjectView.qml
index 782d089..49bd751 100644
--- a/Gui/ObjectView.qml
+++ b/Gui/ObjectView.qml
@@ -27,7 +27,7 @@ GridLayout
Label
{
- text: qsTr("Straße")
+ text: qsTr("Straße*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -38,12 +38,10 @@ GridLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: checkFields()
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
}
Label
{
- text: qsTr("Nr.")
+ text: qsTr("Nr.*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -54,13 +52,11 @@ GridLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: checkFields()
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
}
Label
{
- text: qsTr("PLZ")
+ text: qsTr("PLZ*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -70,8 +66,6 @@ GridLayout
id: postcode
Layout.fillWidth: true
onTextChanged: checkFields()
- placeholderText: "Pflichtfeld"
- placeholderTextColor: "red"
}
Label
{
diff --git a/Gui/ObjectsTable.qml b/Gui/ObjectsTable.qml
index cdbb63c..da2037c 100644
--- a/Gui/ObjectsTable.qml
+++ b/Gui/ObjectsTable.qml
@@ -2,6 +2,7 @@ import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.qmlmodels
+
Item
{
@@ -13,10 +14,9 @@ Item
Button
{
id: addObjectBtn
- icon.source: "qrc:/images/addbusiness.svg"
- icon.color: "olive"
+ icon.source: "qrc:/images/PlusCircle.svg"
+ text: qsTr("Objekt Hinzufügen")
anchors.right: parent.right
- flat: true
onClicked: appLoader.source = "AddObject.qml"
}
diff --git a/Gui/SearchBar.qml b/Gui/SearchBar.qml
index b62d9cb..8c7905a 100644
--- a/Gui/SearchBar.qml
+++ b/Gui/SearchBar.qml
@@ -76,6 +76,5 @@ RowLayout
{
console.log(filter)
console.log(activated)
-
}
}
diff --git a/Gui/TopBar.qml b/Gui/TopBar.qml
index bd3f1a9..aae15be 100644
--- a/Gui/TopBar.qml
+++ b/Gui/TopBar.qml
@@ -225,12 +225,10 @@ ColumnLayout
BarButton
{
id: atajos
- icon.source: "qrc:/images/menu.svg"
-
- implicitWidth: 90
- implicitHeight: 90
checkable: false
+ icon.source: "qrc:/images/Bars3.svg"
+
flat: true
Layout.bottomMargin: Dimensions.s
onClicked: mainMenu.open()
diff --git a/Gui/main.qml b/Gui/main.qml
index cad627a..d59c065 100644
--- a/Gui/main.qml
+++ b/Gui/main.qml
@@ -16,6 +16,8 @@ ApplicationWindow
property string confile: ""
property alias settingsFileDialog: settingsFiledialog
+ palette.text: Colors.foreground
+
TopBar
{
@@ -45,11 +47,13 @@ ApplicationWindow
anchors
{
- left: topBar.right
- right: parent.right
- top: parent.top
- bottom: parent.bottom
- margins: Dimensions.s
+
+ fill: parent
+ topMargin: Dimensions.l
+ bottomMargin: Dimensions.l
+ rightMargin: Dimensions.l
+ leftMargin: Dimensions.l
+
}
property alias window: appWindow
diff --git a/TeroStyle/Button.qml b/TeroStyle/Button.qml
index d7e5a3b..c96c7cf 100644
--- a/TeroStyle/Button.qml
+++ b/TeroStyle/Button.qml
@@ -1,30 +1,68 @@
import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls.impl as I
import QtQuick.Templates as T
T.Button {
id: control
- implicitHeight: implicitContentHeight
- implicitWidth: contentItem.width
+ /**
+ * Set true when the button is supposed to be displayed in e.g. a TextField.
+ * You want to do this when this button is directly related to the TextField
+ * and the primary and only action for the TextField.
+ * Usually, you'd only want to display an icon in this button.
+ * If true, automatically sets height, width and position.
+ *
+ * ```qml
+ * TextField {
+ * placeholderText: "Search..."
+ * Button {
+ * icon.source: "qrc:/images/MagnifyingGlass.svg"
+ * isFieldButton: true
+ * }
+ * }
+ * ```
+ */
+ property bool isFieldButton: false
+
+ height: isFieldButton ? parent.height : null
+ icon.color: Colors.primaryContrast
+ icon.height: 21
+ icon.width: 21
+ implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding)
+ implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding)
+ /**
+ * Icon is slightly larger than Text, so we need to reduce the padding a
+ * tiny bit to make sure all Buttons are still the same height.
+ */
+ padding: Dimensions.m - (icon.source.toString() === "" ? 0 : 1)
+ x: isFieldButton ? parent.x + parent.width - width : null
background: Rectangle {
+ anchors.fill: parent
+ border.color: Colors.interactive
+ border.width: isFieldButton ? 1 : 0
+ bottomLeftRadius: topLeftRadius
color: Colors.primary
radius: Dimensions.radius
+ topLeftRadius: isFieldButton ? 0 : radius
}
- contentItem: Text {
- color: Colors.foreground
+ contentItem: I.IconLabel {
+ color: Colors.primaryContrast
+ display: control.display
font: control.font
- padding: Dimensions.s + 2
+ icon: control.icon
+ mirrored: control.mirrored
+ spacing: Dimensions.s
text: control.text
- // Make sure the button is at least wide enough to be comfortably clickable
- width: Math.max(implicitWidth, 120)
- horizontalAlignment: Text.AlignHCenter
}
MouseArea {
id: mouseArea
+
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
- onPressed: (mouse) => mouse.accepted = false
+
+ onPressed: mouse => mouse.accepted = false
}
}
diff --git a/TeroStyle/Colors.qml b/TeroStyle/Colors.qml
index c5844a7..3706c3c 100644
--- a/TeroStyle/Colors.qml
+++ b/TeroStyle/Colors.qml
@@ -6,14 +6,16 @@ QtObject {
readonly property int dark: 0
readonly property int light: 1
- property int theme: dark
+ property int theme: Application.styleHints.colorScheme === Qt.ColorScheme.Light ? light : dark
- readonly property color primary: "#b81a34"
- readonly property color foreground: theme === dark ? "#fdfdfd" : "#110b0c"
+ property color primary: "#b81a34"
+ property color primaryContrast: "#fdfdfd"
+ property color foreground: theme === dark ? "#fdfdfd" : "#110b0c"
readonly property color background: theme === dark ? "#303136" : "#eff1f5"
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 color transparent: "transparent"
readonly property double highlightOpacity: .3
}
\ No newline at end of file
diff --git a/TeroStyle/Label.qml b/TeroStyle/Label.qml
new file mode 100644
index 0000000..632f4e1
--- /dev/null
+++ b/TeroStyle/Label.qml
@@ -0,0 +1,5 @@
+import QtQuick.Controls
+
+Label {
+ color: Colors.foreground
+}
\ No newline at end of file
diff --git a/TeroStyle/QuickFilter.qml b/TeroStyle/QuickFilter.qml
new file mode 100644
index 0000000..e7b1113
--- /dev/null
+++ b/TeroStyle/QuickFilter.qml
@@ -0,0 +1,60 @@
+import QtQuick
+import QtCore
+import QtQuick.Layouts
+
+RowLayout {
+ id: root
+
+ required property ListModel model
+
+ signal selectedChanged(string name)
+
+ spacing: Dimensions.m
+
+ Repeater {
+ model: root.model
+
+ Item {
+ id: item
+
+ required property int index
+ required property var modelData
+ property real padding: Dimensions.m
+
+ height: text.height + padding * 2
+ width: text.width + padding * 2
+
+ Rectangle {
+ anchors.fill: parent
+ border.color: modelData.selected ? Colors.transparent : Colors.foreground
+ border.width: 2
+ color: modelData.selected ? Colors.primary : Colors.transparent
+ radius: parent.height
+ }
+ Text {
+ id: text
+
+ color: Colors.foreground
+ font: Typography.body
+ text: modelData.text
+ x: parent.padding
+ y: parent.padding
+ }
+ MouseArea {
+ anchors.fill: parent
+ cursorShape: Qt.PointingHandCursor
+
+ onPressed: {
+ if (item.modelData.selected)
+ return;
+ const model = root.model;
+ for (let i = 0; i < model.count; i++) {
+ model.setProperty(i, "selected", false);
+ }
+ model.setProperty(item.index, "selected", true);
+ selectedChanged(item.modelData.name)
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/TeroStyle/TextField.qml b/TeroStyle/TextField.qml
index fbff88b..90e9229 100644
--- a/TeroStyle/TextField.qml
+++ b/TeroStyle/TextField.qml
@@ -19,7 +19,28 @@ T.TextField
placeholderTextColor: Colors.interactive
font: Typography.body
padding: Dimensions.m
+
verticalAlignment: Text.AlignVCenter
+
+
+ /**
+ * Placeholder
+ */
+ Text {
+ x: control.leftPadding
+ y: control.topPadding
+ width: control.width - (control.leftPadding + control.rightPadding)
+ height: control.height - (control.topPadding + control.bottomPadding)
+
+ font: control.font
+ text: control.placeholderText
+ color: control.placeholderTextColor
+ verticalAlignment: control.verticalAlignment
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ elide: Text.ElideRight
+ renderType: control.renderType
+ }
}
+
diff --git a/TeroStyle/qmldir b/TeroStyle/qmldir
index 061e41a..a41b3cf 100644
--- a/TeroStyle/qmldir
+++ b/TeroStyle/qmldir
@@ -7,3 +7,7 @@ ComboBox ComboBox.qml
Field Field.qml
TextField TextField.qml
BarButton BarButton.qml
+Label Label.qml
+QuickFilter QuickFilter.qml
+
+
diff --git a/images/ArrowRightEndOnRectangle.svg b/images/ArrowRightEndOnRectangle.svg
new file mode 100644
index 0000000..fb1bc75
--- /dev/null
+++ b/images/ArrowRightEndOnRectangle.svg
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/images/Bars3.svg b/images/Bars3.svg
new file mode 100644
index 0000000..efb84c1
--- /dev/null
+++ b/images/Bars3.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/images/ChevronDown.svg b/images/ChevronDown.svg
index 525053a..e63c2ff 100644
--- a/images/ChevronDown.svg
+++ b/images/ChevronDown.svg
@@ -1,3 +1,3 @@
-