- added animations on theme change

- added white icons for base station, buzzer and startpad in the dark theme
This commit is contained in:
Dorian Zedler 2019-03-24 21:31:59 +01:00
parent ef60a4065a
commit c3c4d0b18d
6 changed files with 49 additions and 7 deletions

View file

@ -69,6 +69,12 @@ Popup {
border.color: appTheme.style.lineColor border.color: appTheme.style.lineColor
border.width: 0 border.width: 0
Behavior on color {
ColorAnimation {
duration: 200
}
}
RectangularGlow { RectangularGlow {
id: effect_2 id: effect_2
glowRadius: 7 glowRadius: 7
@ -77,7 +83,6 @@ Popup {
opacity: 0.18 opacity: 0.18
anchors.fill: headlineUnderline anchors.fill: headlineUnderline
scale: 1 scale: 1
} }
Canvas { Canvas {
@ -96,6 +101,12 @@ Popup {
property color color: appTheme.style.viewColor property color color: appTheme.style.viewColor
Behavior on color {
ColorAnimation {
duration: 200
}
}
onColorChanged: { onColorChanged: {
requestPaint() requestPaint()
} }

View file

@ -4,7 +4,6 @@ import QtQuick.Window 2.2
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import "." import "."
import "./components" import "./components"
import "./styles"
import com.itsblue.speedclimbingstopwatch 1.0 import com.itsblue.speedclimbingstopwatch 1.0
Item { Item {

View file

@ -24,6 +24,12 @@ Button {
} }
} }
Behavior on backgroundColor {
ColorAnimation {
duration: 200
}
}
background: Item { background: Item {
id: controlBackgroundContainer id: controlBackgroundContainer

View file

@ -49,6 +49,12 @@ Window {
id: backgroundRect id: backgroundRect
anchors.fill: parent anchors.fill: parent
color: appTheme.style.backgroundColor color: appTheme.style.backgroundColor
Behavior on color {
ColorAnimation {
duration: 200
}
}
} }
SpeedBackend { SpeedBackend {
@ -107,6 +113,12 @@ Window {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: appTheme.style.menuColor color: appTheme.style.menuColor
Behavior on color {
ColorAnimation {
duration: 200
}
}
} }
Label { Label {
@ -157,7 +169,7 @@ Window {
id: baseConnConnIcon id: baseConnConnIcon
status: speedBackend.baseStationState status: speedBackend.baseStationState
source: "qrc:/graphics/icons/BaseStation_black.png" source: appTheme.style.baseStationIcon
anchors { anchors {
top: parent.top top: parent.top
topMargin: 10 topMargin: 10
@ -172,7 +184,7 @@ Window {
id: buzzerConnIcon id: buzzerConnIcon
status: speedBackend.baseStationConnections[1]["state"] status: speedBackend.baseStationConnections[1]["state"]
source: "qrc:/graphics/icons/buzzer_black.png" source: appTheme.style.buzzerIcon
anchors { anchors {
top: parent.top top: parent.top
topMargin: 10 topMargin: 10
@ -186,7 +198,7 @@ Window {
id: startpadConnIcon id: startpadConnIcon
status: speedBackend.baseStationConnections[0]["state"] status: speedBackend.baseStationConnections[0]["state"]
source: "qrc:/graphics/icons/startpad_black.png" source: appTheme.style.startpadIcon
anchors { anchors {
top: parent.top top: parent.top
topMargin: 10 topMargin: 10
@ -397,6 +409,12 @@ Window {
id: lowerMenuBackground id: lowerMenuBackground
anchors.fill: parent anchors.fill: parent
color: appTheme.style.menuColor color: appTheme.style.menuColor
Behavior on color {
ColorAnimation {
duration: 200
}
}
} }
FancyButton { FancyButton {

View file

@ -24,5 +24,7 @@
<file>graphics/icons/error.png</file> <file>graphics/icons/error.png</file>
<file>graphics/icons/BaseStation.png</file> <file>graphics/icons/BaseStation.png</file>
<file>graphics/icons/BaseStation_black.png</file> <file>graphics/icons/BaseStation_black.png</file>
<file>graphics/icons/buzzer.png</file>
<file>graphics/icons/startpad.png</file>
</qresource> </qresource>
</RCC> </RCC>

View file

@ -29,7 +29,10 @@ AppTheme::AppTheme(QObject *parent) : QObject(parent)
{"lineColor", "grey"}, {"lineColor", "grey"},
{"backIcon", "qrc:/graphics/icons/back.png"}, {"backIcon", "qrc:/graphics/icons/back.png"},
{"settIcon", "qrc:/graphics/icons/settings.png"} {"settIcon", "qrc:/graphics/icons/settings.png"},
{"buzzerIcon", "qrc:/graphics/icons/buzzer.png"},
{"startpadIcon", "qrc:/graphics/icons/startpad.png"},
{"baseStationIcon", "qrc:/graphics/icons/BaseStation.png"}
}; };
this->darkTheme = tmpDarkTheme; this->darkTheme = tmpDarkTheme;
@ -60,7 +63,10 @@ AppTheme::AppTheme(QObject *parent) : QObject(parent)
{"lineColor", "grey"}, {"lineColor", "grey"},
{"backIcon", "qrc:/graphics/icons/back_black.png"}, {"backIcon", "qrc:/graphics/icons/back_black.png"},
{"settIcon", "qrc:/graphics/icons/settings_black.png"} {"settIcon", "qrc:/graphics/icons/settings_black.png"},
{"buzzerIcon", "qrc:/graphics/icons/buzzer_black.png"},
{"startpadIcon", "qrc:/graphics/icons/startpad_black.png"},
{"baseStationIcon", "qrc:/graphics/icons/BaseStation_black.png"}
}; };
this->lightTheme = tmpLightTheme; this->lightTheme = tmpLightTheme;