diff --git a/fannyapp.pro b/fannyapp.pro index adbdd16..2900c19 100644 --- a/fannyapp.pro +++ b/fannyapp.pro @@ -1,4 +1,4 @@ -QT += qml quick quickcontrols2 +QT += qml quick quickcontrols2 widgets CONFIG += c++11 VERSION = 1.0.1 @@ -69,5 +69,7 @@ ios { DISTFILES += \ android-sources/AndroidManifest.xml \ - CHANGELOG.md + CHANGELOG.md \ + $$files(shared/icons/*.png, true) \ + shared/icons/ibmaterial/index.theme diff --git a/qml/Components/AppToolBar.qml b/qml/Components/AppToolBar.qml index 4be30a2..622f214 100644 --- a/qml/Components/AppToolBar.qml +++ b/qml/Components/AppToolBar.qml @@ -21,92 +21,8 @@ import QtQuick.Controls 2.1 import QtGraphicalEffects 1.0 import QtQuick.Controls.Material 2.1 -Item { +ToolBar { id: control - height: 50 - property bool showErrorBar: true - RectangularGlow { - id: toolBarEffect - glowRadius: 3 - spread: 0.2 - color: "black" - opacity: 0.3 - anchors.fill: toolBar - } - - Rectangle { - id: toolBar - color: app.style.style.menuColor - anchors.fill: parent - - -// anchors { -// top: parent.top -// left: parent.left -// right: parent.right -// topMargin: -60 -// } - - Rectangle { - id: errorField - width: parent.width - height: 30 - enabled: app.is_error & app.state !== "notLoggedIn" & control.showErrorBar - anchors.top: parent.bottom - - color: "red" - onEnabledChanged: { - if(enabled){ - toolBar.state = 'moveIn' - } - else { - toolBar.state = 'moveOut' - } - } - - MouseArea { anchors.fill: parent; onClicked: { - toolBar.state = 'moveOut' - - console.log("clicked") - } - } - - Text { - anchors { - horizontalCenter: parent.horizontalCenter - verticalCenter: parent.verticalCenter - } - - id: errorText - font.family: "Helvetica" - color: "White" - font.pointSize: 8 - visible: parent.height !== 0 - text: app.error - } - } - - states: [ - State { - name: "moveOut" - PropertyChanges { target: errorField; height: 0 } - }, - State { - name: "moveIn" - PropertyChanges { target: errorField; height: 30 } - } - ] - - transitions: [ - Transition { - to: "moveOut" - NumberAnimation { properties: "height"; easing.type: Easing.InOutQuad; duration: 200 } - }, - Transition { - to: "moveIn" - NumberAnimation { properties: "height"; easing.type: Easing.InOutQuad; duration: 200 } - } - ] - } + Material.background: app.style.style.menuColor } diff --git a/qml/Components/FancyButton.qml b/qml/Components/FancyButton.qml index 6f31c7a..360cb36 100644 --- a/qml/Components/FancyButton.qml +++ b/qml/Components/FancyButton.qml @@ -33,14 +33,6 @@ Button { height: control.size width: control.size - scale: control.pressed ? 0.8:1 - - Behavior on scale { - PropertyAnimation { - duration: 100 - } - } - onSizeChanged: { control.width = control.size @@ -72,7 +64,13 @@ Button { radius: control.size * 0.5 - color: control.color + color: control.down ? Qt.darker(control.color, 1.2) : control.color + + Behavior on color { + ColorAnimation { + duration: 200 + } + } } } diff --git a/qml/Forms/FilterForm.qml b/qml/Forms/FilterForm.qml index 4f6f9c5..7d99c2e 100644 --- a/qml/Forms/FilterForm.qml +++ b/qml/Forms/FilterForm.qml @@ -201,15 +201,20 @@ Page { focus: true + add: Transition { + NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 300 } + NumberAnimation { property: "scale"; from: 0.9; to: 1.0; duration: 300 } + } + + displaced: Transition { + NumberAnimation { properties: "x,y"; duration: 300; easing.type: Easing.InOutQuad } + } + delegate: ItemDelegate { id: delegate width: contactView.width - height: 0 - - Component.onCompleted: { - delegate.height = 50 - } + height: 50 text: grade + classLetter font.pixelSize: delegate.height * 0.4 @@ -217,6 +222,24 @@ Page { enabled: root.teacherMode ? role === "t":role === "s" + Rectangle { + + anchors { + top: parent.top + left: parent.left + right: parent.right + } + + visible: index === 0 + + height: 1 + width: parent.width + + color: "lightgrey" + + opacity: 0.5 + } + Rectangle { anchors { @@ -229,24 +252,28 @@ Page { width: parent.width color: "lightgrey" + + opacity: 0.5 } - Behavior on height { + ParallelAnimation { + id: deleteAnimation NumberAnimation { - duration: 500 + target: delegate + property: "scale" + duration: 300 + from: 1 + to: 0.9 + easing.type: Easing.InOutQuad + } + NumberAnimation { + target: delegate + property: "opacity" + duration: 300 + from: 1 + to: 0 easing.type: Easing.InOutQuad } - } - - - NumberAnimation { - id: deleteAnimation - target: delegate - property: "height" - duration: 500 - from: delegate.height - to: 0 - easing.type: Easing.InOutQuad onRunningChanged: { if(!running){ contactView.model.remove(index) @@ -254,7 +281,7 @@ Page { } } - Button { + ToolButton { id: deleteButton anchors { @@ -263,20 +290,14 @@ Page { verticalCenter: parent.verticalCenter } - height: parent.height * 0.6 - width: height + height: parent.height - scale: pressed ? 0.8:1 + icon.name: "delete" onClicked: { deleteAnimation.start() } - background: Image { - source: "/graphics/icons/delete.png" - fillMode: Image.PreserveAspectFit - } - Behavior on scale { PropertyAnimation { duration: 100 @@ -310,10 +331,12 @@ Page { filterDialog.createContact() } - Label { - anchors.centerIn: parent + Text { + anchors.fill: parent font.pixelSize: parent.height * 0.6 text: "+" + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter color: app.style.style.textColor } } diff --git a/qml/Forms/HomeForm.qml b/qml/Forms/HomeForm.qml index b142f09..81d6896 100644 --- a/qml/Forms/HomeForm.qml +++ b/qml/Forms/HomeForm.qml @@ -50,7 +50,7 @@ Page { FancyButton { id: todayButton - image: "qrc:/graphics/icons/sheute.png" + image: "qrc:/icons/sheute.png" size: mainMenu.buttonSize @@ -63,7 +63,7 @@ Page { FancyButton { id: tomorrowButton - image: "qrc:/graphics/icons/smorgen.png" + image: "qrc:/icons/smorgen.png" size: mainMenu.buttonSize @@ -125,7 +125,7 @@ Page { FancyButton { id: logoutButton - image: "qrc:/graphics/icons/logoutRed.png" + image: "qrc:/icons/logoutRed.png" imageScale: 0.8 size: smallMenu.buttonSize diff --git a/qml/Forms/SettingsForm.qml b/qml/Forms/SettingsForm.qml index d91dc30..16ec136 100644 --- a/qml/Forms/SettingsForm.qml +++ b/qml/Forms/SettingsForm.qml @@ -126,6 +126,7 @@ Page { } } } + } SwitchDelegate { diff --git a/qml/Pages/MainPage.qml b/qml/Pages/MainPage.qml index 354e8e1..c43e099 100644 --- a/qml/Pages/MainPage.qml +++ b/qml/Pages/MainPage.qml @@ -19,6 +19,7 @@ import QtQuick 2.2 import QtQuick.Controls 2.1 import QtGraphicalEffects 1.0 +import QtQuick.Layouts 1.3 import "../Components" import "../Forms" @@ -133,67 +134,54 @@ Page { anchors { top: parent.top - left: parent.left - right: parent.right topMargin: -60 } height: 50 + width: parent.width - Button { - id:toolButton - enabled: true - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - leftMargin: parent.width *0.02 - } - height: parent.height - parent.height * 0.5 - width: height + RowLayout { - onClicked: { - if(!formStack.currentItem.locked){ - formStack.pop() - } - } + anchors.fill: parent - onPressed: toolButton.scale = 0.9 - onReleased: toolButton.scale = 1.0 + spacing: width * 0.02 - background: Image { - source: app.style.style.backIcon - height: parent.height - width: parent.width - fillMode: Image.PreserveAspectFit - Behavior on scale { - PropertyAnimation { - duration: 100 + ToolButton { + id: toolButton + + icon.name: "back" + icon.color: app.style.style.textColor + + onClicked: { + if(!formStack.currentItem.locked){ + formStack.pop() } } - } - } - Label { - text: getText() - anchors { - verticalCenter: parent.verticalCenter - left: toolButton.right - leftMargin: parent.width * 0.02 } - font.bold: true - color: app.style.style.textColor - function getText(){ - var titleString = ""; - for(var i=1; i 1){ - titleString += " > " + Label { + + Layout.fillWidth: true + + text: getText() + + font.bold: true + color: app.style.style.textColor + + function getText(){ + var titleString = ""; + for(var i=1; i 1){ + titleString += " > " + } + + titleString += formStack.get(i).title } - - titleString += formStack.get(i).title + return(titleString) } - return(titleString) } + } Behavior on anchors.topMargin { diff --git a/shared/graphics/icons/delete.png b/shared/graphics/icons/delete.png deleted file mode 100644 index 62e09ea..0000000 Binary files a/shared/graphics/icons/delete.png and /dev/null differ diff --git a/shared/graphics/icons/drawer.png b/shared/graphics/icons/drawer.png deleted file mode 100644 index 4e7899e..0000000 Binary files a/shared/graphics/icons/drawer.png and /dev/null differ diff --git a/shared/graphics/icons/menu.png b/shared/graphics/icons/menu.png deleted file mode 100644 index 5a0d148..0000000 Binary files a/shared/graphics/icons/menu.png and /dev/null differ diff --git a/shared/graphics/icons/TreffpunktFannyLogo.png b/shared/icons/TreffpunktFannyLogo.png similarity index 100% rename from shared/graphics/icons/TreffpunktFannyLogo.png rename to shared/icons/TreffpunktFannyLogo.png diff --git a/shared/graphics/icons/back.png b/shared/icons/back.png similarity index 100% rename from shared/graphics/icons/back.png rename to shared/icons/back.png diff --git a/shared/graphics/icons/backDark.png b/shared/icons/backDark.png similarity index 100% rename from shared/graphics/icons/backDark.png rename to shared/icons/backDark.png diff --git a/shared/icons/delete.png b/shared/icons/delete.png new file mode 100644 index 0000000..64cc7e2 Binary files /dev/null and b/shared/icons/delete.png differ diff --git a/shared/graphics/icons/hide.png b/shared/icons/hide.png similarity index 100% rename from shared/graphics/icons/hide.png rename to shared/icons/hide.png diff --git a/shared/icons/ibmaterial/20x20/back.png b/shared/icons/ibmaterial/20x20/back.png new file mode 100644 index 0000000..db43e27 Binary files /dev/null and b/shared/icons/ibmaterial/20x20/back.png differ diff --git a/shared/icons/ibmaterial/20x20/bookmark.png b/shared/icons/ibmaterial/20x20/bookmark.png new file mode 100644 index 0000000..c01e7bf Binary files /dev/null and b/shared/icons/ibmaterial/20x20/bookmark.png differ diff --git a/shared/icons/ibmaterial/20x20/bookmarkFilled.png b/shared/icons/ibmaterial/20x20/bookmarkFilled.png new file mode 100644 index 0000000..db854f9 Binary files /dev/null and b/shared/icons/ibmaterial/20x20/bookmarkFilled.png differ diff --git a/shared/icons/ibmaterial/20x20/buy.png b/shared/icons/ibmaterial/20x20/buy.png new file mode 100644 index 0000000..9f9c09f Binary files /dev/null and b/shared/icons/ibmaterial/20x20/buy.png differ diff --git a/shared/icons/ibmaterial/20x20/calendar.png b/shared/icons/ibmaterial/20x20/calendar.png new file mode 100644 index 0000000..61cc427 Binary files /dev/null and b/shared/icons/ibmaterial/20x20/calendar.png differ diff --git a/shared/icons/ibmaterial/20x20/cup.png b/shared/icons/ibmaterial/20x20/cup.png new file mode 100644 index 0000000..d52dbd1 Binary files /dev/null and b/shared/icons/ibmaterial/20x20/cup.png differ diff --git a/shared/icons/ibmaterial/20x20/delete.png b/shared/icons/ibmaterial/20x20/delete.png new file mode 100644 index 0000000..2f12d05 Binary files /dev/null and b/shared/icons/ibmaterial/20x20/delete.png differ diff --git a/shared/icons/ibmaterial/20x20/drawer.png b/shared/icons/ibmaterial/20x20/drawer.png new file mode 100644 index 0000000..1e974ef Binary files /dev/null and b/shared/icons/ibmaterial/20x20/drawer.png differ diff --git a/shared/icons/ibmaterial/20x20/filter.png b/shared/icons/ibmaterial/20x20/filter.png new file mode 100644 index 0000000..bcc1e8a Binary files /dev/null and b/shared/icons/ibmaterial/20x20/filter.png differ diff --git a/shared/icons/ibmaterial/20x20/flowchart.png b/shared/icons/ibmaterial/20x20/flowchart.png new file mode 100644 index 0000000..6469b0a Binary files /dev/null and b/shared/icons/ibmaterial/20x20/flowchart.png differ diff --git a/shared/icons/ibmaterial/20x20/menu.png b/shared/icons/ibmaterial/20x20/menu.png new file mode 100644 index 0000000..a10473d Binary files /dev/null and b/shared/icons/ibmaterial/20x20/menu.png differ diff --git a/shared/icons/ibmaterial/20x20/pin.png b/shared/icons/ibmaterial/20x20/pin.png new file mode 100644 index 0000000..9908baf Binary files /dev/null and b/shared/icons/ibmaterial/20x20/pin.png differ diff --git a/shared/icons/ibmaterial/20x20/pinFilled.png b/shared/icons/ibmaterial/20x20/pinFilled.png new file mode 100644 index 0000000..fe79afb Binary files /dev/null and b/shared/icons/ibmaterial/20x20/pinFilled.png differ diff --git a/shared/icons/ibmaterial/20x20/star.png b/shared/icons/ibmaterial/20x20/star.png new file mode 100644 index 0000000..55d76f3 Binary files /dev/null and b/shared/icons/ibmaterial/20x20/star.png differ diff --git a/shared/icons/ibmaterial/20x20/starFilled.png b/shared/icons/ibmaterial/20x20/starFilled.png new file mode 100644 index 0000000..78aec7c Binary files /dev/null and b/shared/icons/ibmaterial/20x20/starFilled.png differ diff --git a/shared/icons/ibmaterial/20x20/year.png b/shared/icons/ibmaterial/20x20/year.png new file mode 100644 index 0000000..26f4edc Binary files /dev/null and b/shared/icons/ibmaterial/20x20/year.png differ diff --git a/shared/icons/ibmaterial/20x20@2/back.png b/shared/icons/ibmaterial/20x20@2/back.png new file mode 100644 index 0000000..c55ab31 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/back.png differ diff --git a/shared/icons/ibmaterial/20x20@2/bookmark.png b/shared/icons/ibmaterial/20x20@2/bookmark.png new file mode 100644 index 0000000..47d18cb Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/bookmark.png differ diff --git a/shared/icons/ibmaterial/20x20@2/bookmarkFilled.png b/shared/icons/ibmaterial/20x20@2/bookmarkFilled.png new file mode 100644 index 0000000..1dcf9d4 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/bookmarkFilled.png differ diff --git a/shared/icons/ibmaterial/20x20@2/buy.png b/shared/icons/ibmaterial/20x20@2/buy.png new file mode 100644 index 0000000..2ae229d Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/buy.png differ diff --git a/shared/icons/ibmaterial/20x20@2/calendar.png b/shared/icons/ibmaterial/20x20@2/calendar.png new file mode 100644 index 0000000..53fe9b1 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/calendar.png differ diff --git a/shared/icons/ibmaterial/20x20@2/cup.png b/shared/icons/ibmaterial/20x20@2/cup.png new file mode 100644 index 0000000..b66aa2f Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/cup.png differ diff --git a/shared/icons/ibmaterial/20x20@2/delete.png b/shared/icons/ibmaterial/20x20@2/delete.png new file mode 100644 index 0000000..c56ab44 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/delete.png differ diff --git a/shared/graphics/icons/drawer_black.png b/shared/icons/ibmaterial/20x20@2/drawer.png similarity index 100% rename from shared/graphics/icons/drawer_black.png rename to shared/icons/ibmaterial/20x20@2/drawer.png diff --git a/shared/icons/ibmaterial/20x20@2/filter.png b/shared/icons/ibmaterial/20x20@2/filter.png new file mode 100644 index 0000000..1f88edc Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/filter.png differ diff --git a/shared/icons/ibmaterial/20x20@2/flowchart.png b/shared/icons/ibmaterial/20x20@2/flowchart.png new file mode 100644 index 0000000..c87cc2e Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/flowchart.png differ diff --git a/shared/graphics/icons/menu_black.png b/shared/icons/ibmaterial/20x20@2/menu.png similarity index 100% rename from shared/graphics/icons/menu_black.png rename to shared/icons/ibmaterial/20x20@2/menu.png diff --git a/shared/icons/ibmaterial/20x20@2/pin.png b/shared/icons/ibmaterial/20x20@2/pin.png new file mode 100644 index 0000000..0af60ed Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/pin.png differ diff --git a/shared/icons/ibmaterial/20x20@2/pinFilled.png b/shared/icons/ibmaterial/20x20@2/pinFilled.png new file mode 100644 index 0000000..8c3b904 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/pinFilled.png differ diff --git a/shared/icons/ibmaterial/20x20@2/star.png b/shared/icons/ibmaterial/20x20@2/star.png new file mode 100644 index 0000000..4104d59 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/star.png differ diff --git a/shared/icons/ibmaterial/20x20@2/starFilled.png b/shared/icons/ibmaterial/20x20@2/starFilled.png new file mode 100644 index 0000000..4ff5390 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/starFilled.png differ diff --git a/shared/icons/ibmaterial/20x20@2/year.png b/shared/icons/ibmaterial/20x20@2/year.png new file mode 100644 index 0000000..980d2ee Binary files /dev/null and b/shared/icons/ibmaterial/20x20@2/year.png differ diff --git a/shared/icons/ibmaterial/20x20@3/back.png b/shared/icons/ibmaterial/20x20@3/back.png new file mode 100644 index 0000000..b228eb8 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/back.png differ diff --git a/shared/icons/ibmaterial/20x20@3/bookmark.png b/shared/icons/ibmaterial/20x20@3/bookmark.png new file mode 100644 index 0000000..ca812b1 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/bookmark.png differ diff --git a/shared/icons/ibmaterial/20x20@3/bookmarkFilled.png b/shared/icons/ibmaterial/20x20@3/bookmarkFilled.png new file mode 100644 index 0000000..0dfcd81 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/bookmarkFilled.png differ diff --git a/shared/icons/ibmaterial/20x20@3/buy.png b/shared/icons/ibmaterial/20x20@3/buy.png new file mode 100644 index 0000000..a34fe40 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/buy.png differ diff --git a/shared/icons/ibmaterial/20x20@3/calendar.png b/shared/icons/ibmaterial/20x20@3/calendar.png new file mode 100644 index 0000000..434503c Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/calendar.png differ diff --git a/shared/icons/ibmaterial/20x20@3/cup.png b/shared/icons/ibmaterial/20x20@3/cup.png new file mode 100644 index 0000000..9ad32ba Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/cup.png differ diff --git a/shared/icons/ibmaterial/20x20@3/delete.png b/shared/icons/ibmaterial/20x20@3/delete.png new file mode 100644 index 0000000..efedccd Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/delete.png differ diff --git a/shared/icons/ibmaterial/20x20@3/drawer.png b/shared/icons/ibmaterial/20x20@3/drawer.png new file mode 100644 index 0000000..3584ed6 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/drawer.png differ diff --git a/shared/icons/ibmaterial/20x20@3/filter.png b/shared/icons/ibmaterial/20x20@3/filter.png new file mode 100644 index 0000000..b457f02 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/filter.png differ diff --git a/shared/icons/ibmaterial/20x20@3/flowchart.png b/shared/icons/ibmaterial/20x20@3/flowchart.png new file mode 100644 index 0000000..98bd45f Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/flowchart.png differ diff --git a/shared/icons/ibmaterial/20x20@3/menu.png b/shared/icons/ibmaterial/20x20@3/menu.png new file mode 100644 index 0000000..9554b69 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/menu.png differ diff --git a/shared/icons/ibmaterial/20x20@3/pin.png b/shared/icons/ibmaterial/20x20@3/pin.png new file mode 100644 index 0000000..306add5 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/pin.png differ diff --git a/shared/icons/ibmaterial/20x20@3/pinFilled.png b/shared/icons/ibmaterial/20x20@3/pinFilled.png new file mode 100644 index 0000000..c7eac9c Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/pinFilled.png differ diff --git a/shared/icons/ibmaterial/20x20@3/star.png b/shared/icons/ibmaterial/20x20@3/star.png new file mode 100644 index 0000000..0b03be1 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/star.png differ diff --git a/shared/icons/ibmaterial/20x20@3/starFilled.png b/shared/icons/ibmaterial/20x20@3/starFilled.png new file mode 100644 index 0000000..3984352 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/starFilled.png differ diff --git a/shared/icons/ibmaterial/20x20@3/year.png b/shared/icons/ibmaterial/20x20@3/year.png new file mode 100644 index 0000000..5c2eb8f Binary files /dev/null and b/shared/icons/ibmaterial/20x20@3/year.png differ diff --git a/shared/icons/ibmaterial/20x20@4/back.png b/shared/icons/ibmaterial/20x20@4/back.png new file mode 100644 index 0000000..dd157e7 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/back.png differ diff --git a/shared/icons/ibmaterial/20x20@4/bookmark.png b/shared/icons/ibmaterial/20x20@4/bookmark.png new file mode 100644 index 0000000..c82e389 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/bookmark.png differ diff --git a/shared/icons/ibmaterial/20x20@4/bookmarkFilled.png b/shared/icons/ibmaterial/20x20@4/bookmarkFilled.png new file mode 100644 index 0000000..a021439 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/bookmarkFilled.png differ diff --git a/shared/icons/ibmaterial/20x20@4/buy.png b/shared/icons/ibmaterial/20x20@4/buy.png new file mode 100644 index 0000000..ef6c793 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/buy.png differ diff --git a/shared/icons/ibmaterial/20x20@4/calendar.png b/shared/icons/ibmaterial/20x20@4/calendar.png new file mode 100644 index 0000000..d799f8c Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/calendar.png differ diff --git a/shared/icons/ibmaterial/20x20@4/cup.png b/shared/icons/ibmaterial/20x20@4/cup.png new file mode 100644 index 0000000..4baaf9a Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/cup.png differ diff --git a/shared/icons/ibmaterial/20x20@4/delete.png b/shared/icons/ibmaterial/20x20@4/delete.png new file mode 100644 index 0000000..3a0da9f Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/delete.png differ diff --git a/shared/icons/ibmaterial/20x20@4/drawer.png b/shared/icons/ibmaterial/20x20@4/drawer.png new file mode 100644 index 0000000..60d93af Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/drawer.png differ diff --git a/shared/icons/ibmaterial/20x20@4/filter.png b/shared/icons/ibmaterial/20x20@4/filter.png new file mode 100644 index 0000000..891fcae Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/filter.png differ diff --git a/shared/icons/ibmaterial/20x20@4/flowchart.png b/shared/icons/ibmaterial/20x20@4/flowchart.png new file mode 100644 index 0000000..dc859de Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/flowchart.png differ diff --git a/shared/icons/ibmaterial/20x20@4/menu.png b/shared/icons/ibmaterial/20x20@4/menu.png new file mode 100644 index 0000000..187c171 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/menu.png differ diff --git a/shared/icons/ibmaterial/20x20@4/pin.png b/shared/icons/ibmaterial/20x20@4/pin.png new file mode 100644 index 0000000..e193f91 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/pin.png differ diff --git a/shared/icons/ibmaterial/20x20@4/pinFilled.png b/shared/icons/ibmaterial/20x20@4/pinFilled.png new file mode 100644 index 0000000..f92d9a9 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/pinFilled.png differ diff --git a/shared/icons/ibmaterial/20x20@4/star.png b/shared/icons/ibmaterial/20x20@4/star.png new file mode 100644 index 0000000..cd38f03 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/star.png differ diff --git a/shared/icons/ibmaterial/20x20@4/starFilled.png b/shared/icons/ibmaterial/20x20@4/starFilled.png new file mode 100644 index 0000000..7895700 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/starFilled.png differ diff --git a/shared/icons/ibmaterial/20x20@4/year.png b/shared/icons/ibmaterial/20x20@4/year.png new file mode 100644 index 0000000..bc9ab79 Binary files /dev/null and b/shared/icons/ibmaterial/20x20@4/year.png differ diff --git a/shared/icons/ibmaterial/index.theme b/shared/icons/ibmaterial/index.theme new file mode 100644 index 0000000..d24991d --- /dev/null +++ b/shared/icons/ibmaterial/index.theme @@ -0,0 +1,24 @@ +[Icon Theme] +Name=ibmaterial +Comment=some material icons + +Directories=20x20,20x20@2,20x20@3,20x20@4 + +[20x20] +Size=20 +Type=Fixed + +[20x20@2] +Size=20 +Scale=2 +Type=Fixed + +[20x20@3] +Size=20 +Scale=3 +Type=Fixed + +[20x20@4] +Size=20 +Scale=4 +Type=Fixed diff --git a/shared/graphics/icons/logoutBlack.png b/shared/icons/logoutBlack.png similarity index 100% rename from shared/graphics/icons/logoutBlack.png rename to shared/icons/logoutBlack.png diff --git a/shared/graphics/icons/logoutRed.png b/shared/icons/logoutRed.png similarity index 100% rename from shared/graphics/icons/logoutRed.png rename to shared/icons/logoutRed.png diff --git a/shared/graphics/icons/settings.png b/shared/icons/settings.png similarity index 100% rename from shared/graphics/icons/settings.png rename to shared/icons/settings.png diff --git a/shared/graphics/icons/settingsBlack.png b/shared/icons/settingsBlack.png similarity index 100% rename from shared/graphics/icons/settingsBlack.png rename to shared/icons/settingsBlack.png diff --git a/shared/graphics/icons/sheute.png b/shared/icons/sheute.png similarity index 100% rename from shared/graphics/icons/sheute.png rename to shared/icons/sheute.png diff --git a/shared/graphics/icons/smorgen.png b/shared/icons/smorgen.png similarity index 100% rename from shared/graphics/icons/smorgen.png rename to shared/icons/smorgen.png diff --git a/shared/graphics/icons/view.png b/shared/icons/view.png similarity index 100% rename from shared/graphics/icons/view.png rename to shared/icons/view.png diff --git a/shared/shared.qrc b/shared/shared.qrc index 419fd72..a095c59 100644 --- a/shared/shared.qrc +++ b/shared/shared.qrc @@ -1,27 +1,90 @@ - graphics/icons/sheute.png - graphics/icons/smorgen.png - graphics/icons/back.png - graphics/icons/drawer.png - graphics/icons/menu.png - graphics/icons/hide.png - graphics/icons/view.png graphics/images/FannyLogoDark.jpg graphics/images/FannyLogoLight.png graphics/images/TreffpunktFannyLogoDark.png graphics/images/TreffpunktFannyLogoLight.png - graphics/icons/logoutBlack.png - graphics/icons/logoutRed.png - graphics/icons/settingsBlack.png - graphics/icons/backDark.png - graphics/icons/delete.png sampleEventData/sample.pdf sampleEventData/sample.txt sampleEventData/sample.json fonts/fontawesome-webfont.ttf graphics/images/FannyIcon.png - graphics/icons/TreffpunktFannyLogo.png - graphics/icons/settings.png + icons/ibmaterial/20x20/back.png + icons/ibmaterial/20x20/bookmark.png + icons/ibmaterial/20x20/bookmarkFilled.png + icons/ibmaterial/20x20/buy.png + icons/ibmaterial/20x20/calendar.png + icons/ibmaterial/20x20/cup.png + icons/ibmaterial/20x20/drawer.png + icons/ibmaterial/20x20/filter.png + icons/ibmaterial/20x20/flowchart.png + icons/ibmaterial/20x20/menu.png + icons/ibmaterial/20x20/pin.png + icons/ibmaterial/20x20/pinFilled.png + icons/ibmaterial/20x20/star.png + icons/ibmaterial/20x20/starFilled.png + icons/ibmaterial/20x20/year.png + icons/ibmaterial/20x20@2/back.png + icons/ibmaterial/20x20@2/bookmark.png + icons/ibmaterial/20x20@2/bookmarkFilled.png + icons/ibmaterial/20x20@2/buy.png + icons/ibmaterial/20x20@2/calendar.png + icons/ibmaterial/20x20@2/cup.png + icons/ibmaterial/20x20@2/drawer.png + icons/ibmaterial/20x20@2/filter.png + icons/ibmaterial/20x20@2/flowchart.png + icons/ibmaterial/20x20@2/menu.png + icons/ibmaterial/20x20@2/pin.png + icons/ibmaterial/20x20@2/pinFilled.png + icons/ibmaterial/20x20@2/star.png + icons/ibmaterial/20x20@2/starFilled.png + icons/ibmaterial/20x20@2/year.png + icons/ibmaterial/20x20@3/back.png + icons/ibmaterial/20x20@3/bookmark.png + icons/ibmaterial/20x20@3/bookmarkFilled.png + icons/ibmaterial/20x20@3/buy.png + icons/ibmaterial/20x20@3/calendar.png + icons/ibmaterial/20x20@3/cup.png + icons/ibmaterial/20x20@3/drawer.png + icons/ibmaterial/20x20@3/filter.png + icons/ibmaterial/20x20@3/flowchart.png + icons/ibmaterial/20x20@3/menu.png + icons/ibmaterial/20x20@3/pin.png + icons/ibmaterial/20x20@3/pinFilled.png + icons/ibmaterial/20x20@3/star.png + icons/ibmaterial/20x20@3/starFilled.png + icons/ibmaterial/20x20@3/year.png + icons/ibmaterial/20x20@4/back.png + icons/ibmaterial/20x20@4/bookmark.png + icons/ibmaterial/20x20@4/bookmarkFilled.png + icons/ibmaterial/20x20@4/buy.png + icons/ibmaterial/20x20@4/calendar.png + icons/ibmaterial/20x20@4/cup.png + icons/ibmaterial/20x20@4/drawer.png + icons/ibmaterial/20x20@4/filter.png + icons/ibmaterial/20x20@4/flowchart.png + icons/ibmaterial/20x20@4/menu.png + icons/ibmaterial/20x20@4/pin.png + icons/ibmaterial/20x20@4/pinFilled.png + icons/ibmaterial/20x20@4/star.png + icons/ibmaterial/20x20@4/starFilled.png + icons/ibmaterial/20x20@4/year.png + icons/ibmaterial/index.theme + icons/back.png + icons/backDark.png + icons/delete.png + icons/hide.png + icons/logoutBlack.png + icons/logoutRed.png + icons/settings.png + icons/settingsBlack.png + icons/sheute.png + icons/smorgen.png + icons/TreffpunktFannyLogo.png + icons/view.png + icons/ibmaterial/20x20/delete.png + icons/ibmaterial/20x20@2/delete.png + icons/ibmaterial/20x20@3/delete.png + icons/ibmaterial/20x20@4/delete.png diff --git a/sources/appstyle.cpp b/sources/appstyle.cpp index e357404..4607ffe 100644 --- a/sources/appstyle.cpp +++ b/sources/appstyle.cpp @@ -27,8 +27,8 @@ AppStyle::AppStyle(QObject *parent) : QObject(parent) {"lineColor", "grey"}, - {"backIcon", "qrc:/graphics/icons/back.png"}, - {"settingsIcon", "qrc:/graphics/icons/settings.png"}, + {"backIcon", "qrc:/icons/back.png"}, + {"settingsIcon", "qrc:/icons/settings.png"}, {"treffpunktFannyIcon", "qrc:/graphics/images/TreffpunktFannyLogoLight.png"}, {"fannyLogo", "qrc:/graphics/images/FannyLogoLight.png"}, @@ -62,8 +62,8 @@ AppStyle::AppStyle(QObject *parent) : QObject(parent) {"lineColor", "grey"}, - {"backIcon", "qrc:/graphics/icons/backDark.png"}, - {"settingsIcon", "qrc:/graphics/icons/settingsBlack.png"}, + {"backIcon", "qrc:/icons/backDark.png"}, + {"settingsIcon", "qrc:/icons/settingsBlack.png"}, {"treffpunktFannyIcon", "qrc:/graphics/images/TreffpunktFannyLogoDark.png"}, {"fannyLogo", "qrc:/graphics/images/FannyLogoDark.jpg"} diff --git a/sources/main.cpp b/sources/main.cpp index 8cf9136..652c026 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -23,6 +23,9 @@ #include #include +#include +#include + #include #include #include @@ -44,6 +47,7 @@ int main(int argc, char *argv[]) // ServerConn * pServerConn = new ServerConn(); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QGuiApplication app(argc, argv); @@ -54,6 +58,9 @@ int main(int argc, char *argv[]) qmlRegisterType("Backend", 1, 0, "AppStyle"); QQuickStyle::setStyle("Material"); + QIcon::setFallbackSearchPaths(QIcon::fallbackSearchPaths() << ":/shared/icons"); + QIcon::setThemeName("ibmaterial"); + QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); QQmlContext *context = engine.rootContext();