did some cleanup
|
@ -37,8 +37,8 @@ HEADERS += \
|
|||
headers/appstyle.h
|
||||
|
||||
RESOURCES += \
|
||||
shared/shared.qrc \
|
||||
qml/qml.qrc
|
||||
resources/shared/shared.qrc \
|
||||
resources/qml/qml.qrc
|
||||
|
||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
QML_IMPORT_PATH =
|
||||
|
|
|
@ -1,111 +0,0 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Controls.Material 2.1
|
||||
|
||||
Loader {
|
||||
id: control
|
||||
|
||||
property QIconSource icon: QIconSource {}
|
||||
|
||||
property int fontPixelSize: height * 0.4
|
||||
|
||||
property string text
|
||||
|
||||
signal clicked
|
||||
|
||||
Connections {
|
||||
target: icon
|
||||
|
||||
onNameChanged: {
|
||||
control.syncProperties()
|
||||
}
|
||||
|
||||
onColorChanged: {
|
||||
control.syncProperties()
|
||||
}
|
||||
}
|
||||
|
||||
onTextChanged: {
|
||||
control.syncProperties()
|
||||
}
|
||||
|
||||
function syncProperties() {
|
||||
|
||||
if(control.status !== Loader.Ready) {
|
||||
return
|
||||
}
|
||||
|
||||
if(QtCompatiblityMode) {
|
||||
control.item.text = control.text
|
||||
control.item.font = control.font
|
||||
|
||||
if(control.fontPixelSize !== undefined) {
|
||||
control.item.font.pixelSize = control.fontPixelSize
|
||||
}
|
||||
}
|
||||
else {
|
||||
control.item.icon.name = control.icon.name
|
||||
control.item.icon.color = control.icon.color
|
||||
|
||||
control.item.icon.width = control.icon.width
|
||||
control.item.icon.height = control.icon.height
|
||||
}
|
||||
}
|
||||
|
||||
onLoaded: {
|
||||
control.syncProperties()
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if(QtCompatiblityMode) {
|
||||
control.sourceComponent = ancientToolButtonCp
|
||||
}
|
||||
else {
|
||||
control.sourceComponent = modernToolButtonCp
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: control.item
|
||||
|
||||
onClicked: {
|
||||
control.clicked()
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: ancientToolButtonCp
|
||||
|
||||
ToolButton {
|
||||
id: tb
|
||||
|
||||
opacity: enabled ? 1.0 : 0.3
|
||||
|
||||
contentItem: Text {
|
||||
text: tb.text
|
||||
font.pixelSize: tb.height * 0.5
|
||||
font.family: iconFont.name
|
||||
color: app.style.style.textColor
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
FontLoader {
|
||||
id: iconFont
|
||||
source: "qrc:/fonts/IconFont.otf"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: modernToolButtonCp
|
||||
|
||||
ToolButton {
|
||||
height: implicitHeight
|
||||
width: implicitWidth
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
QtObject {
|
||||
property string name: ""
|
||||
property int height
|
||||
property int width
|
||||
property color color: "black"
|
||||
}
|
31
resources/qml/Components/CompatibleToolButton.qml
Normal file
|
@ -0,0 +1,31 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.1
|
||||
import QtQuick.Controls.Material 2.1
|
||||
|
||||
ToolButton {
|
||||
id: tb
|
||||
|
||||
opacity: enabled ? 1.0 : 0.3
|
||||
|
||||
contentItem: Item {
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenterOffset: 3
|
||||
text: tb.text
|
||||
|
||||
font.pixelSize: tb.height * 0.5
|
||||
font.family: iconFont.name
|
||||
color: app.style.style.textColor
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
|
||||
FontLoader {
|
||||
id: iconFont
|
||||
source: "qrc:/fonts/IconFont.otf"
|
||||
}
|
||||
|
||||
}
|
|
@ -64,24 +64,28 @@ ItemDelegate {
|
|||
color: app.style.style.textColor
|
||||
}
|
||||
|
||||
Image {
|
||||
id: forwardIcon
|
||||
|
||||
visible: control.showForwardIcon
|
||||
|
||||
Text {
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
rightMargin: 10
|
||||
}
|
||||
|
||||
height: parent.height * 0.4
|
||||
|
||||
visible: control.showForwardIcon
|
||||
rotation: 180
|
||||
text: "\u0082"
|
||||
|
||||
fillMode: Image.PreserveAspectFit
|
||||
font.pixelSize: parent.height * 0.4
|
||||
font.family: iconFont.name
|
||||
color: app.style.style.textColor
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
source: app.style.style.backIcon
|
||||
FontLoader {
|
||||
id: iconFont
|
||||
source: "qrc:/fonts/IconFont.otf"
|
||||
}
|
||||
|
||||
}
|
|
@ -292,9 +292,6 @@ Page {
|
|||
|
||||
height: parent.height
|
||||
|
||||
icon.name: "delete"
|
||||
icon.color: app.style.style.textColor
|
||||
|
||||
text: "\u0083"
|
||||
|
||||
onClicked: {
|
|
@ -150,8 +150,6 @@ Page {
|
|||
rightMargin: -width * 1.1
|
||||
}
|
||||
|
||||
icon.color: app.style.style.textColor
|
||||
|
||||
onClicked: {
|
||||
if(state === "visible"){
|
||||
state = "invisible"
|
||||
|
@ -168,7 +166,6 @@ Page {
|
|||
name: "invisible"
|
||||
PropertyChanges {
|
||||
target: passwordHideShow
|
||||
icon.name: "hide"
|
||||
text: "\u0081"
|
||||
}
|
||||
|
||||
|
@ -181,7 +178,6 @@ Page {
|
|||
name: "visible"
|
||||
PropertyChanges {
|
||||
target: passwordHideShow
|
||||
icon.name: "view"
|
||||
text: "\u0080"
|
||||
}
|
||||
PropertyChanges {
|
|
@ -153,9 +153,6 @@ Page {
|
|||
|
||||
opacity: enabled ? 1:0.5
|
||||
|
||||
icon.name: "back"
|
||||
icon.color: app.style.style.textColor
|
||||
|
||||
text: "\u0082"//"\u2039"
|
||||
|
||||
onClicked: {
|
||||
|
@ -197,9 +194,6 @@ Page {
|
|||
|
||||
visible: formStack.currentItem.title === "Vertretungsplan"
|
||||
|
||||
icon.name: "pdf"
|
||||
icon.color: app.style.style.textColor
|
||||
|
||||
text: "\u0084"//"pdf ansehen"
|
||||
|
||||
onClicked: {
|
|
@ -18,6 +18,5 @@
|
|||
<file>Components/FannyDataListView.qml</file>
|
||||
<file>Components/ProgressCircle.qml</file>
|
||||
<file>Components/CompatibleToolButton.qml</file>
|
||||
<file>Components/QIconSource.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
Before Width: | Height: | Size: 518 B After Width: | Height: | Size: 518 B |
Before Width: | Height: | Size: 1,012 B After Width: | Height: | Size: 1,012 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 725 B After Width: | Height: | Size: 725 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1,012 B After Width: | Height: | Size: 1,012 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 311 KiB After Width: | Height: | Size: 311 KiB |
Before Width: | Height: | Size: 324 KiB After Width: | Height: | Size: 324 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
18
resources/shared/shared.qrc
Normal file
|
@ -0,0 +1,18 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/FannyLogoDark.jpg</file>
|
||||
<file>icons/FannyLogoLight.png</file>
|
||||
<file>icons/TreffpunktFannyLogoDark.png</file>
|
||||
<file>icons/TreffpunktFannyLogoLight.png</file>
|
||||
<file>icons/logoutBlack.png</file>
|
||||
<file>icons/logoutRed.png</file>
|
||||
<file>icons/settings.png</file>
|
||||
<file>icons/settingsBlack.png</file>
|
||||
<file>icons/sheute.png</file>
|
||||
<file>icons/smorgen.png</file>
|
||||
<file>icons/TreffpunktFannyLogo.png</file>
|
||||
<file>graphics/Icon Big square.png</file>
|
||||
<file>graphics/favicon.png</file>
|
||||
<file>fonts/IconFont.otf</file>
|
||||
</qresource>
|
||||
</RCC>
|
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 100 KiB |