Style code
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Fusion
|
||||
import QtQuick.Dialogs
|
||||
import "../js/qmldict.js" as JsLib
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Fusion
|
||||
import QtQuick.Dialogs
|
||||
import "../js/qmldict.js" as JsLib
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Qt.labs.qmlmodels
|
||||
import QtQuick.Controls.Fusion
|
||||
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
@@ -14,6 +14,7 @@ Item {
|
||||
id: customersStack
|
||||
anchors.fill: parent
|
||||
initialItem: "CustomersTable.qml"
|
||||
anchors.topMargin: Dimensions.m
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Qt.labs.qmlmodels
|
||||
import QtQuick.Controls.Fusion
|
||||
|
||||
|
||||
Item
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@ Item
|
||||
id: employeesStack
|
||||
anchors.fill: parent
|
||||
initialItem: "EmployeesTable.qml"
|
||||
anchors.topMargin: Dimensions.m
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
import QtQuick.Layouts
|
||||
import TeroStyle
|
||||
|
||||
|
||||
Item {
|
||||
property string recpass: ""
|
||||
|
||||
@@ -2,7 +2,6 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Qt.labs.qmlmodels
|
||||
import QtQuick.Controls.Fusion
|
||||
|
||||
Item {
|
||||
property var availableFilters: [""]
|
||||
@@ -12,7 +11,7 @@ Item {
|
||||
id: objectsStack
|
||||
anchors.fill: parent
|
||||
initialItem: "ObjectsTable.qml"
|
||||
anchors.margins: 9
|
||||
anchors.topMargin: Dimensions.m
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,12 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Qt.labs.qmlmodels
|
||||
import QtQuick.Controls.Fusion
|
||||
|
||||
Item
|
||||
{
|
||||
|
||||
SearchBar
|
||||
{
|
||||
id:searchBar
|
||||
anchors.margins: 9
|
||||
}
|
||||
|
||||
Button
|
||||
|
||||
@@ -11,7 +11,7 @@ Item
|
||||
id: employeesStack
|
||||
anchors.fill: parent
|
||||
initialItem: "OffersTable.qml"
|
||||
anchors.margins: 9
|
||||
anchors.topMargin: Dimensions.m
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,5 @@ Item
|
||||
SearchBar
|
||||
{
|
||||
id:searchBar
|
||||
anchors.margins: 9
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ RowLayout
|
||||
{
|
||||
id: searchBar
|
||||
|
||||
|
||||
TextField
|
||||
{
|
||||
id: searchField
|
||||
|
||||
@@ -6,7 +6,6 @@ RowLayout
|
||||
{
|
||||
id: topBar
|
||||
spacing: 0
|
||||
height: 35
|
||||
width: parent.width
|
||||
anchors
|
||||
{
|
||||
@@ -23,6 +22,7 @@ RowLayout
|
||||
text: qsTr("Dashboard")
|
||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
||||
Layout.margins: 3
|
||||
Layout.leftMargin: 0
|
||||
background: Rectangle
|
||||
{
|
||||
id: dashiBackie
|
||||
|
||||
@@ -2,14 +2,16 @@ import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
import QtQuick.Controls
|
||||
|
||||
T.ComboBox {
|
||||
T.ComboBox
|
||||
{
|
||||
id: control
|
||||
|
||||
font: Typography.body
|
||||
implicitHeight: background.height
|
||||
padding: Dimensions.m
|
||||
|
||||
background: Rectangle {
|
||||
background: Rectangle
|
||||
{
|
||||
border.color: Colors.interactive
|
||||
border.width: 1
|
||||
color: Colors.mantle
|
||||
@@ -17,12 +19,14 @@ T.ComboBox {
|
||||
radius: Dimensions.radius
|
||||
}
|
||||
|
||||
delegate: T.ItemDelegate {
|
||||
delegate: T.ItemDelegate
|
||||
{
|
||||
width: control.width
|
||||
height: implicitContentHeight + topPadding + bottomPadding
|
||||
padding: Dimensions.s
|
||||
leftPadding: control.leftPadding
|
||||
contentItem: Label {
|
||||
contentItem: Label
|
||||
{
|
||||
text: control.textRole ? model[control.textRole] : modelData
|
||||
color: Colors.foreground
|
||||
elide: Text.ElideRight
|
||||
@@ -30,7 +34,8 @@ T.ComboBox {
|
||||
}
|
||||
highlighted: control.highlightedIndex === index
|
||||
}
|
||||
indicator: Label {
|
||||
indicator: Label
|
||||
{
|
||||
x: control.width - width
|
||||
height: control.height
|
||||
width: contentWidth + Dimensions.s * 2
|
||||
@@ -39,7 +44,8 @@ T.ComboBox {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
padding: Dimensions.s
|
||||
|
||||
background: Rectangle {
|
||||
background: Rectangle
|
||||
{
|
||||
anchors.fill: parent
|
||||
color: Colors.primary
|
||||
topRightRadius: Dimensions.radius
|
||||
@@ -48,17 +54,20 @@ T.ComboBox {
|
||||
}
|
||||
}
|
||||
|
||||
popup: T.Popup {
|
||||
popup: T.Popup
|
||||
{
|
||||
y: control.height
|
||||
z: 2
|
||||
width: control.width
|
||||
contentItem: ListView {
|
||||
contentItem: ListView
|
||||
{
|
||||
clip: true
|
||||
implicitHeight: contentHeight
|
||||
model: control.popup.visible ? control.delegateModel : null
|
||||
currentIndex: control.highlightedIndex
|
||||
|
||||
highlight: Rectangle {
|
||||
highlight: Rectangle
|
||||
{
|
||||
color: Colors.primary
|
||||
opacity: Colors.highlightOpacity
|
||||
}
|
||||
@@ -66,7 +75,8 @@ T.ComboBox {
|
||||
ScrollIndicator.vertical: ScrollIndicator {}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
background: Rectangle
|
||||
{
|
||||
color: Colors.mantle
|
||||
border.color: Colors.interactive
|
||||
radius: Dimensions.radius
|
||||
|
||||
@@ -2,7 +2,8 @@ pragma Singleton
|
||||
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
QtObject
|
||||
{
|
||||
/**
|
||||
* Distance for objects that are tied to each other,
|
||||
* e.g. a field and its label.
|
||||
|
||||
@@ -2,11 +2,13 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
ColumnLayout {
|
||||
ColumnLayout
|
||||
{
|
||||
required property string label
|
||||
spacing: Dimensions.s
|
||||
|
||||
Label {
|
||||
Label
|
||||
{
|
||||
text: label
|
||||
font: Typography.body
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
|
||||
T.TextField {
|
||||
T.TextField
|
||||
{
|
||||
id: control
|
||||
background: Rectangle {
|
||||
background: Rectangle
|
||||
{
|
||||
id: background
|
||||
color: Colors.mantle
|
||||
radius: Dimensions.radius
|
||||
@@ -16,5 +18,6 @@ T.TextField {
|
||||
implicitHeight: background.height
|
||||
placeholderTextColor: Colors.interactive
|
||||
font: Typography.body
|
||||
padding: Dimensions.m
|
||||
padding: Dimensions.s
|
||||
|
||||
}
|
||||
@@ -3,12 +3,15 @@ pragma Singleton
|
||||
import QtCore
|
||||
import QtQuick
|
||||
|
||||
Item {
|
||||
readonly property FontLoader robotoCondensed: FontLoader {
|
||||
Item
|
||||
{
|
||||
readonly property FontLoader robotoCondensed: FontLoader
|
||||
{
|
||||
source: "qrc:/fonts/RobotoCondensed.otf"
|
||||
}
|
||||
|
||||
readonly property font body: ({
|
||||
readonly property font body:
|
||||
({
|
||||
family: robotoCondensed.font,
|
||||
pointSize: 16,
|
||||
weight: Font.Medium,
|
||||
@@ -16,7 +19,8 @@ Item {
|
||||
kerning: true,
|
||||
})
|
||||
|
||||
readonly property font h1: ({
|
||||
readonly property font h1:
|
||||
({
|
||||
family: body.family,
|
||||
pointSize: 38,
|
||||
weight: body.weight,
|
||||
|
||||
Reference in New Issue
Block a user