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