diff --git a/resources/qml/Components/AppToolBar.qml b/resources/qml/Components/AppToolBar.qml
index e0bfa87..12b64bc 100644
--- a/resources/qml/Components/AppToolBar.qml
+++ b/resources/qml/Components/AppToolBar.qml
@@ -37,7 +37,7 @@ Item {
Rectangle {
id: toolBar
- color: "white"
+ color: Material.background
anchors.fill: parent
Rectangle {
diff --git a/resources/qml/Components/ColoredItemDelegate.qml b/resources/qml/Components/ColoredItemDelegate.qml
new file mode 100644
index 0000000..9c5ccdf
--- /dev/null
+++ b/resources/qml/Components/ColoredItemDelegate.qml
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Controls.Material 2.15
+import QtQuick.Controls.Material.impl 2.15
+
+ItemDelegate {
+ id: control
+
+ Material.background: "transparent"
+
+ background: Rectangle {
+ implicitHeight: control.Material.delegateHeight
+
+ color: control.highlighted ? control.Material.listHighlightColor : control.Material.background
+
+ Ripple {
+ width: parent.width
+ height: parent.height
+
+ clip: visible
+ pressed: control.pressed
+ anchor: control
+ active: control.down || control.visualFocus || control.hovered
+ color: control.Material.rippleColor
+ }
+ }
+}
diff --git a/resources/qml/Components/CompetitionCalendarDelegate.qml b/resources/qml/Components/CompetitionCalendarDelegate.qml
index 4d108ff..99056f3 100644
--- a/resources/qml/Components/CompetitionCalendarDelegate.qml
+++ b/resources/qml/Components/CompetitionCalendarDelegate.qml
@@ -1,8 +1,12 @@
import QtQuick 2.9
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
+import QtQuick.Controls.Material 2.12
+import QtQuick.Templates 2.12 as T
+import QtQuick.Controls.impl 2.12
+import QtQuick.Controls.Material.impl 2.12
-ItemDelegate {
+ColoredItemDelegate {
id: competitionDel
property bool over
@@ -81,15 +85,7 @@ ItemDelegate {
NumberAnimation { target: competitionDel; property: "scale"; from: 1; to: 0.8; duration: 400 }
}
- Rectangle {
- id: delBackroundRect
-
- anchors.fill: parent
-
- opacity: 0.5
-
- color: control.getCompCatData(catId) === undefined ? "white":control.getCompCatData(catId)["bgcolor"]
- }
+ Material.background: control.getCompCatData(catId) === undefined ? app.federalColor:control.getCompCatData(catId)["bgcolor"]
Column {
id: compDelCol
@@ -146,8 +142,6 @@ ItemDelegate {
Label {
id: dateLa
- color: "grey"
-
text: date
}
}
diff --git a/resources/qml/Components/FancyButton.qml b/resources/qml/Components/FancyButton.qml
index 69b53ef..3ea03d0 100644
--- a/resources/qml/Components/FancyButton.qml
+++ b/resources/qml/Components/FancyButton.qml
@@ -19,8 +19,10 @@
import QtQuick 2.9
import QtQuick.Controls 2.4
import QtGraphicalEffects 1.0
+import QtQuick.Controls.Material 2.12
+import QtQuick.Controls.Material.impl 2.12
-ToolButton {
+MouseArea {
id: control
property string image
@@ -39,7 +41,7 @@ ToolButton {
}
}
- contentItem: Item {
+ Item {
id: controlBackgroundContainer
anchors.fill: parent
@@ -67,7 +69,7 @@ ToolButton {
radius: height * 0.2
- color: control.down ? Qt.darker(control.backgroundColor, 1.03) : control.backgroundColor
+ color: Material.dialogColor //control.down ? Qt.darker(control.backgroundColor, 1.03) : control.backgroundColor
Image {
id: buttonIcon
@@ -84,22 +86,30 @@ ToolButton {
scale: control.imageScale
}
- Behavior on color {
- ColorAnimation {
- duration: 100
+ Ripple {
+ id: ripple
+ visible: true
+ clipRadius: controlBackground.radius
+ clip: true
+ width: parent.width
+ height: parent.height
+ pressed: control.pressed
+ anchor: control
+ active: control.pressed || control.visualFocus || control.containsMouse
+ color: control.Material.rippleColor
+
+ layer.enabled: true
+ layer.effect: OpacityMask {
+ maskSource: Item {
+ width: ripple.width
+ height: ripple.height
+ Rectangle {
+ anchors.fill: parent
+ radius: controlBackground.radius
+ }
+ }
}
}
}
}
-
- Text {
- id: conetntText
- text: qsTr(control.text)
- anchors.centerIn: parent
- font: parent.font
- color: control.textColor
- opacity: control.enabled ? 1:0.4
- }
-
-
}
diff --git a/resources/qml/Components/ResultDelegate.qml b/resources/qml/Components/ResultDelegate.qml
index 29a1df5..790e083 100644
--- a/resources/qml/Components/ResultDelegate.qml
+++ b/resources/qml/Components/ResultDelegate.qml
@@ -1,12 +1,13 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
+import QtQuick.Controls.Material 2.15
-ItemDelegate {
+ColoredItemDelegate {
id: partDel
- property int ind: index
- property var thisData: widgetData[ "participants" ][partDel.ind]
+ property int thisIndex: index
+ property var thisData: widgetData[ "participants" ][partDel.thisIndex]
width: control.width
height: partDelCol.showSideBySide ? 40:70
@@ -24,23 +25,14 @@ ItemDelegate {
app.openWidget({person:thisData["PerId"]})
}
+ highlighted: partDel.thisIndex % 2 == 0
+
ParallelAnimation {
id: fadeInPa
NumberAnimation { target: partDel; property: "opacity"; from: 0; to: 1.0; duration: 400 }
NumberAnimation { target: partDel; property: "scale"; from: 0.8; to: 1.0; duration: 400 }
}
- Rectangle {
- id: partDelBackgroundRect
- anchors.fill: parent
-
- width: partDel.width
-
- color: partDel.ind % 2 == 0 ? "white":"lightgrey"
-
- opacity: 0.2
- }
-
GridLayout {
id: partDelCol
@@ -133,8 +125,8 @@ ItemDelegate {
function getDataForIcon(index){
// TODO: clean
- var resultString = widgetData[ "participants" ][partDel.ind]["boulder"+(index+1)]
- var numTrys = widgetData[ "participants" ][partDel.ind]["try"+(index+1)]
+ var resultString = widgetData[ "participants" ][partDel.thisIndex]["boulder"+(index+1)]
+ var numTrys = widgetData[ "participants" ][partDel.thisIndex]["try"+(index+1)]
var resultList = []
@@ -311,6 +303,8 @@ ItemDelegate {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
+ color: "#dd000000"
+
text: boulderResCv.resultData[2]
}
@@ -336,6 +330,8 @@ ItemDelegate {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
+ color: "#dd000000"
+
text: boulderResCv.resultData[1]
}
@@ -360,6 +356,8 @@ ItemDelegate {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
+ color: "#dd000000"
+
text: boulderResCv.resultData[0]
}
}
@@ -427,7 +425,7 @@ ItemDelegate {
visible: index === 0
- color: "grey"
+ color: Material.primaryTextColor
}
Rectangle {
@@ -438,7 +436,7 @@ ItemDelegate {
width: 1
height: parent.height
- color: "grey"
+ color: Material.primaryTextColor
}
Label {
@@ -454,7 +452,9 @@ ItemDelegate {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
- text: widgetData[ "participants" ][partDel.ind]["result"+(generalResRep.routes[index][0])] === undefined ? "":widgetData[ "participants" ][partDel.ind]["result"+(generalResRep.routes[index][0])]
+ text: widgetData["participants"][partDel.thisIndex]["result"+(generalResRep.routes[index][0])] === undefined ?
+ "":
+ widgetData[ "participants" ][partDel.thisIndex]["result"+(generalResRep.routes[index][0])]
}
}
@@ -479,7 +479,7 @@ ItemDelegate {
font.pixelSize: Math.abs( height * 0.6 )
minimumPixelSize: 1
- text: widgetData[ "participants" ][partDel.ind]["result"] === undefined ? "":widgetData[ "participants" ][partDel.ind]["result"]
+ text: widgetData[ "participants" ][partDel.thisIndex]["result"] === undefined ? "":widgetData[ "participants" ][partDel.thisIndex]["result"]
}
}
}
diff --git a/resources/qml/Components/SelectorPopup.qml b/resources/qml/Components/SelectorPopup.qml
index f9dcd4d..b598dd5 100644
--- a/resources/qml/Components/SelectorPopup.qml
+++ b/resources/qml/Components/SelectorPopup.qml
@@ -83,6 +83,7 @@ Dialog {
background: Item {
Rectangle {
id: backgroundRect
+
anchors {
fill: parent
bottomMargin: -radius
diff --git a/resources/qml/Components/SpeedFlowChart.qml b/resources/qml/Components/SpeedFlowChart.qml
index 520852b..26705fd 100644
--- a/resources/qml/Components/SpeedFlowChart.qml
+++ b/resources/qml/Components/SpeedFlowChart.qml
@@ -385,7 +385,7 @@ Item {
width: parent.width
height: roundItem.tileSize
//scale: 0.9
- color: "white"
+ color: Material.dialogColor
border.color: "lightgrey"
border.width: 0
radius: height * 0.2
@@ -438,7 +438,7 @@ Item {
font.bold: matchItm.winnerIndex === index
elide: "ElideRight"
- color: matchItm.winnerIndex === index ? "green":"black"
+ color: matchItm.winnerIndex === index ? Material.color(Material.Green):Material.primaryTextColor
text: matchItm.thisMatchData[index] !== undefined ? matchItm.thisMatchData[index]['firstname'] + " " + matchItm.thisMatchData[index]['lastname'] :"-"
}
diff --git a/resources/qml/Pages/StartPage.qml b/resources/qml/Pages/StartPage.qml
index 6289ebb..3e70956 100644
--- a/resources/qml/Pages/StartPage.qml
+++ b/resources/qml/Pages/StartPage.qml
@@ -19,6 +19,7 @@
import QtQuick 2.9
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.0
+import QtQuick.Controls.Material 2.12
import "../Components"
@@ -59,7 +60,7 @@ Page {
height: menuGr.buttonSize
width: height
- image: "qrc:/icons/dav.png"
+ image: Material.theme === Material.Dark ? "qrc:/icons/dav-dark.png":"qrc:/icons/dav.png"
onClicked: {
app.openWidget({nation:"GER"})
@@ -73,7 +74,7 @@ Page {
height: menuGr.buttonSize
width: height
- image: "qrc:/icons/sac.png"
+ image: Material.theme === Material.Dark ? "qrc:/icons/sac-dark.png":"qrc:/icons/sac.png"
onClicked: {
app.openWidget({nation:"SUI"})
@@ -139,6 +140,7 @@ Page {
DisclaimerDialog {
id: ifscDisclaimerDialog
+ Material.theme: root.Material.theme
title: "Where are the IFSC results?"
content: "Unfortunately, the IFSC has restricted the access to their data and is not willing to share results with blueROCK anymore. " +
"Because of this, blueROCK is no longer able to access and display IFSC results.
" +
@@ -147,6 +149,7 @@ Page {
DisclaimerDialog {
id: aboutBluerockDisclaimerDialog
+ Material.theme: root.Material.theme
title: "blueROCK v" + APP_VERSION + "
By Itsblue Development"
content: "This app was built using the Qt Framework " +
"licensed under the GNU lgplV3 license.
"+
diff --git a/resources/qml/Pages/WidgetPage.qml b/resources/qml/Pages/WidgetPage.qml
index 5f01e5b..fd28cb8 100644
--- a/resources/qml/Pages/WidgetPage.qml
+++ b/resources/qml/Pages/WidgetPage.qml
@@ -248,6 +248,8 @@ Page {
SelectorPopup {
id: selectorPu
+ Material.theme: root.Material.theme
+
contentItem: ListView {
id: selectorLv
diff --git a/resources/qml/Widgets/CalendarWidget.qml b/resources/qml/Widgets/CalendarWidget.qml
index f9785c1..c1c78f7 100644
--- a/resources/qml/Widgets/CalendarWidget.qml
+++ b/resources/qml/Widgets/CalendarWidget.qml
@@ -19,6 +19,7 @@
import QtQuick 2.9
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
+import QtQuick.Controls.Material 2.12
import "../Components"
@@ -403,6 +404,8 @@ DataListView {
SelectorPopup {
id: filterSelectPu
+ Material.theme: control.Material.theme
+
contentItem: ListView {
id: selectorLv
diff --git a/resources/qml/Widgets/ProfileWidget.qml b/resources/qml/Widgets/ProfileWidget.qml
index 5f0caa7..55058b0 100644
--- a/resources/qml/Widgets/ProfileWidget.qml
+++ b/resources/qml/Widgets/ProfileWidget.qml
@@ -251,7 +251,7 @@ Page {
height: 1
width: parent.width
- color: "black"
+ color: Material.foreground
}
diff --git a/resources/qml/Widgets/RankingWidget.qml b/resources/qml/Widgets/RankingWidget.qml
index 7a3acd8..2392773 100644
--- a/resources/qml/Widgets/RankingWidget.qml
+++ b/resources/qml/Widgets/RankingWidget.qml
@@ -91,6 +91,8 @@ DataListView {
text: ""
+ highlighted: partDel.thisIndex % 2 == 0
+
onClicked: {
if(state === "closed"){
// close all other delegates
@@ -110,16 +112,6 @@ DataListView {
}
}
- Rectangle {
- anchors.fill: parent
-
- width: partDel.width
-
- color: partDel.thisIndex % 2 == 0 ? "white":"lightgrey"
-
- opacity: 0.2
- }
-
Column {
id: partDelCol
diff --git a/resources/qml/Widgets/RegistrationWidget.qml b/resources/qml/Widgets/RegistrationWidget.qml
index 106d27e..4a85c01 100644
--- a/resources/qml/Widgets/RegistrationWidget.qml
+++ b/resources/qml/Widgets/RegistrationWidget.qml
@@ -165,15 +165,7 @@ DataListView {
text: ""
- Rectangle {
- anchors.fill: parent
-
- width: partDel.width
-
- color: partDel.thisIndex % 2 == 0 ? "white":"lightgrey"
-
- opacity: 0.2
- }
+ highlighted: partDel.thisIndex % 2 == 0
Label {
anchors.fill: parent
diff --git a/resources/qml/Widgets/StartlistWidget.qml b/resources/qml/Widgets/StartlistWidget.qml
index 90959d1..3f98f13 100644
--- a/resources/qml/Widgets/StartlistWidget.qml
+++ b/resources/qml/Widgets/StartlistWidget.qml
@@ -138,15 +138,7 @@ DataListView {
text: ""
- Rectangle {
- anchors.fill: parent
-
- width: partDel.width
-
- color: partDel.thisIndex % 2 == 0 ? "white":"lightgrey"
-
- opacity: 0.2
- }
+ highlighted: partDel.thisIndex % 2 == 0
Row {
id: partDelFirstRow
diff --git a/resources/qml/main.qml b/resources/qml/main.qml
index be4ab63..dddcf92 100644
--- a/resources/qml/main.qml
+++ b/resources/qml/main.qml
@@ -39,6 +39,11 @@ Window {
property int errorCode: -1
+ property var colorShade: Material.theme === Material.Light ? Material.Shade300 : Material.Shade700
+ property color nationalAdultsColor: Material.color(Material.Green, colorShade)
+ property color nationalYouthColor: Material.color(Material.LightGreen, colorShade)
+ property color federalColor: Material.backgroundColor
+
// comp cats source:
// - https://github.com/ralfbecker/ranking/blob/master/sitemgr/digitalrock/dav_calendar.php
// - https://github.com/ralfbecker/ranking/blob/master/sitemgr/digitalrock/sac_calendar.php
@@ -50,7 +55,7 @@ Window {
'ger_meisterschaft' : {
'label' : 'Deutsche Meisterschaft',
'nation' : 'GER',
- 'bgcolor' : '#A8F0A8',
+ 'bgcolor' : app.nationalAdultsColor,//'#A8F0A8',
'sort_rank': 1,
'cat_id' : [57, 59, 60]
},
@@ -61,7 +66,7 @@ Window {
'wettk_reg' : '^[0-9]{2,2}[_J]{1,1}[^WL]+.*',
'serie_reg' : '^[0-9]{2,2}_JC',
// 'rang_title': 'Deutsche Jugend RANGLISTE',
- 'bgcolor' : '#D8FFD8',
+ 'bgcolor' : app.nationalYouthColor,//'#D8FFD8',
'sort_rank': 2,
'cat_id' : [58]
},
@@ -71,7 +76,7 @@ Window {
'wettk_reg' : '^[0-9]{2,2}[_J]{1,1}LM.*',
'serie_reg' : '^[0-9]{2,2}[_J]{1,1}LM.*',
'rang_title': '',
- 'bgcolor' : '#F0F0F0',
+ 'bgcolor' : app.federalColor, //'#F0F0F0',
'sort_rank': 3,
'cat_id' : [61,56]
},
@@ -84,7 +89,7 @@ Window {
'wettk_reg' : '^[0-9]{2,2}_[^R].*',
'serie_reg' : '.*',
'rang_title': 'SWISS RANKING',
- 'bgcolor' : '#A8F0A8',
+ 'bgcolor' : app.nationalAdultsColor, //'#A8F0A8',
'sort_rank': 1,
'cat_id' : [62,63]
},
@@ -94,7 +99,7 @@ Window {
'wettk_reg' : '^[0-9]{2,2}_[^R].*',
'serie_reg' : '.*',
'rang_title': 'SWISS RANKING',
- 'bgcolor' : '#D8FFD8',
+ 'bgcolor' : app.nationalYouthColor, //'#D8FFD8',
'sort_rank': 2,
'cat_id' : [65]
},
@@ -103,7 +108,7 @@ Window {
'nation' : 'SUI',
'wettk_reg' : '^[0-9]{2,2}_RG_.*',
'rang_title': '',
- 'bgcolor' : '#F0F0F0',
+ 'bgcolor' : app.federalColor, //'#F0F0F0',
'sort_rank': 3,
'cat_id' : [64]
},
@@ -112,7 +117,7 @@ Window {
'nation' : 'SUI',
'wettk_reg' : '^[0-9]{2,2}_RC_.*',
'rang_title': '',
- 'bgcolor' : '#F0F0F0',
+ 'bgcolor' : app.federalColor, //'#F0F0F0',
'sort_rank': 4,
'cat_id' : [84]
}
@@ -120,7 +125,7 @@ Window {
anchors.fill: parent
- //Material.theme: Material.Dark
+ Material.theme: Material.Dark
Component.onCompleted: {
//loadingDl.open()
@@ -247,8 +252,6 @@ Window {
font.bold: true
verticalAlignment: Text.AlignVCenter
- color: "black"
-
text: getText()
function getText(){
@@ -287,8 +290,6 @@ Window {
font.bold: false
- color: "black"
-
text: getText()
function getText(){
diff --git a/resources/qml/qml.qrc b/resources/qml/qml.qrc
index 81bf996..a3e6784 100644
--- a/resources/qml/qml.qrc
+++ b/resources/qml/qml.qrc
@@ -26,5 +26,6 @@
Components/SpeedFlowChartPopup.qml
Components/BlueRockBadge.qml
Components/DisclaimerDialog.qml
+ Components/ColoredItemDelegate.qml
diff --git a/resources/shared/icons/dav-dark.png b/resources/shared/icons/dav-dark.png
new file mode 100644
index 0000000..ff29824
Binary files /dev/null and b/resources/shared/icons/dav-dark.png differ
diff --git a/resources/shared/icons/dig_rock.klein.jpg b/resources/shared/icons/dig_rock.klein.jpg
deleted file mode 100644
index 7170811..0000000
Binary files a/resources/shared/icons/dig_rock.klein.jpg and /dev/null differ
diff --git a/resources/shared/icons/dig_rock.klein.png b/resources/shared/icons/dig_rock.klein.png
deleted file mode 100644
index 0eb0963..0000000
Binary files a/resources/shared/icons/dig_rock.klein.png and /dev/null differ
diff --git a/resources/shared/icons/ifsc.png b/resources/shared/icons/ifsc.png
deleted file mode 100644
index 993f23a..0000000
Binary files a/resources/shared/icons/ifsc.png and /dev/null differ
diff --git a/resources/shared/icons/sac-dark.png b/resources/shared/icons/sac-dark.png
new file mode 100644
index 0000000..eae3e00
Binary files /dev/null and b/resources/shared/icons/sac-dark.png differ
diff --git a/resources/shared/shared.qrc b/resources/shared/shared.qrc
index 5c58276..d32c2e9 100644
--- a/resources/shared/shared.qrc
+++ b/resources/shared/shared.qrc
@@ -1,7 +1,6 @@
icons/dav.png
- icons/ifsc.png
icons/sac.png
icons/back.png
icons/backDark.png
@@ -26,8 +25,6 @@
icons/bluerock/20x20@4/drawer.png
icons/bluerock/20x20@4/menu.png
icons/bluerock/index.theme
- icons/dig_rock.klein.jpg
- icons/dig_rock.klein.png
icons/bluerock/20x20/calendar.png
icons/bluerock/20x20@2/calendar.png
icons/bluerock/20x20@3/calendar.png
@@ -80,5 +77,7 @@
screenshots/SpeedFlowchartDemo/ios/1.jpeg
screenshots/SpeedFlowchartDemo/ios/2.jpeg
screenshots/SpeedFlowchartDemo/ios/3.jpeg
+ icons/dav-dark.png
+ icons/sac-dark.png