Replaced the icons in the TrainBottomBar (#4453)

* Replaced the icons in the TrainBottomBar

* Replaced the icons from oxygen (png) by new ones from breeze (svg)
* Added support for dark- and light-mode
* Grouped the icons by function
* Added a hover-effect to the icons
* The new theme fits better into the overall appearance
* Made the separators visible also for dark themes
This commit is contained in:
Joachim Kohlhammer
2024-03-22 22:26:33 +01:00
committed by GitHub
parent ba47ff741a
commit ce7bbe11ed
48 changed files with 586 additions and 97 deletions

View File

@@ -121,19 +121,34 @@
<file>xml/home-perspectives.xml</file>
<file>ini/measures.ini</file>
<file>html/ltm-summary.html</file>
<file>images/oxygen/power-off.png</file>
<file>images/oxygen/power-on.png</file>
<file>images/oxygen/play.png</file>
<file>images/oxygen/pause.png</file>
<file>images/oxygen/stop.png</file>
<file>images/oxygen/ffwd.png</file>
<file>images/oxygen/rewind.png</file>
<file>images/oxygen/lap.png</file>
<file>images/oxygen/fwd.png</file>
<file>images/oxygen/back.png</file>
<file>images/oxygen/save.png</file>
<file>images/oxygen/open.png</file>
<file>images/oxygen/cal.png</file>
<file>images/breeze/light/unknown.svg</file>
<file>images/breeze/light/offline.svg</file>
<file>images/breeze/light/online.svg</file>
<file>images/breeze/light/play.svg</file>
<file>images/breeze/light/pause.svg</file>
<file>images/breeze/light/ffwd.svg</file>
<file>images/breeze/light/rewind.svg</file>
<file>images/breeze/light/stop.svg</file>
<file>images/breeze/light/lap.svg</file>
<file>images/breeze/light/fwd.svg</file>
<file>images/breeze/light/back.svg</file>
<file>images/breeze/light/up.svg</file>
<file>images/breeze/light/down.svg</file>
<file>images/breeze/light/cal.svg</file>
<file>images/breeze/dark/unknown.svg</file>
<file>images/breeze/dark/offline.svg</file>
<file>images/breeze/dark/online.svg</file>
<file>images/breeze/dark/play.svg</file>
<file>images/breeze/dark/pause.svg</file>
<file>images/breeze/dark/ffwd.svg</file>
<file>images/breeze/dark/rewind.svg</file>
<file>images/breeze/dark/stop.svg</file>
<file>images/breeze/dark/lap.svg</file>
<file>images/breeze/dark/fwd.svg</file>
<file>images/breeze/dark/back.svg</file>
<file>images/breeze/dark/up.svg</file>
<file>images/breeze/dark/down.svg</file>
<file>images/breeze/dark/cal.svg</file>
<file>images/toolbar/close-icon.png</file>
<file>images/toolbar/save.png</file>
<file>images/toolbar/saveas.png</file>
@@ -183,8 +198,6 @@
<file>images/sidebar/movie.png</file>
<file>images/sidebar/power.png</file>
<file>images/sidebar/sync.png</file>
<file>images/oxygen/up.png</file>
<file>images/oxygen/down.png</file>
<file>audio/lap.wav</file>
<file>images/configure.png</file>
<file>images/toolbar/cloud.png</file>

View File

@@ -0,0 +1,8 @@
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#eff0f1;
}</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Text" d="m11 5v1h2v1.0507812c-2.237959 0.2537455-4 2.1467332-4 4.4492188 0 2.473437 2.026563 4.5 4.5 4.5s4.5-2.026563 4.5-4.5c0-1.059095-0.385401-2.0209801-1.005859-2.7871094l0.755859-0.755859 0.396484 0.396484 0.707031-0.7089844-1.501953-1.4980469-0.705078 0.7070313 0.396485 0.396485-0.751953 0.7519525c-0.646025-0.510828-1.432052-0.8537803-2.291016-0.9511719v-1.0507812h2v-1zm-4 1-4 5 4 5zm6.5 2c1.932997 0 3.5 1.5670034 3.5 3.5 0 1.932997-1.567003 3.5-3.5 3.5s-3.5-1.567003-3.5-3.5c0-1.9329966 1.567003-3.5 3.5-3.5z"/>
</svg>

After

Width:  |  Height:  |  Size: 826 B

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#f2f2f2;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 23.779297 3.9804688 L 3.9804688 23.779297 L 8.2226562 28.023438 L 28.021484 8.2246094 L 23.779297 3.9804688 z M 6.25 4 L 5.453125 5.453125 L 4 6.25 L 5.453125 7.046875 L 6.25 8.5 L 7.046875 7.046875 L 8.5 6.25 L 7.046875 5.453125 L 6.25 4 z M 13.75 4 L 12.953125 5.453125 L 11.5 6.25 L 12.953125 7.046875 L 13.75 8.5 L 14.546875 7.046875 L 16 6.25 L 14.546875 5.453125 L 13.75 4 z M 23.777344 5.3945312 L 26.605469 8.2226562 L 20.947266 13.880859 L 18.119141 11.052734 L 23.777344 5.3945312 z M 9.25 10 L 8.453125 11.453125 L 7 12.25 L 8.453125 13.046875 L 9.25 14.5 L 10.046875 13.046875 L 11.5 12.25 L 10.046875 11.453125 L 9.25 10 z "
id="path74"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 1017 B

View File

@@ -0,0 +1,9 @@
<svg viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<style id="current-color-scheme" type="text/css">
.ColorScheme-Text {
color:#eff0f1;
}
</style>
<path fill="#3daee9" d="m10 14v5l2 1 2-1v-5z"/>
<path style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Text" d="m12 2c-1.108 0-2 .892-2 2v10.765625c-.6358612.568731-.9995185 1.381278-1 2.234375 0 1.656854 1.343146 3 3 3s3-1.343146 3-3c-.001-.852416-.364645-1.664145-1-2.232422v-10.767578c0-1.108-.892-2-2-2zm0 1c.554 0 1 .446 1 1v10.173828.826172.263672c.61861.349704.999778.995903 1 1.695312-.000704 1.081041-.895928 1.957032-2 1.957032s-1.999296-.875991-2-1.957032c-.0004909-.700106.380773-1.347212 1-1.697265v-.261719-.828125-10.171875c0-.554.446-1 1-1zm-5 2v1h2v-1zm0 3v1h2v-1zm0 3v1h2v-1zm5 5c-.552285 0-1 .447715-1 1s.447715 1 1 1 1-.447715 1-1-.447715-1-1-1z"/>
</svg>

After

Width:  |  Height:  |  Size: 900 B

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#f2f2f2;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 16.001953 3.9980469 A 12 12 0 0 0 4.0019531 15.998047 A 12 12 0 0 0 16.001953 27.998047 A 12 12 0 0 0 28.001953 15.998047 A 12 12 0 0 0 16.001953 3.9980469 z M 16.001953 4.9980469 A 11 11 0 0 1 27.001953 15.998047 A 11 11 0 0 1 16.001953 26.998047 A 11 11 0 0 1 5.0019531 15.998047 A 11 11 0 0 1 16.001953 4.9980469 z M 10 12 L 10 20 L 17 16 L 10 12 z M 17 16 L 17 20 L 24 16 L 17 12 L 17 16 z "
id="path8"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 774 B

View File

@@ -0,0 +1,8 @@
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#eff0f1;
}</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Text" d="m5 5v1h2v1.0507812c-2.2379593 0.2537455-4 2.1467332-4 4.4492188 0 2.473437 2.0265633 4.5 4.5 4.5 2.473437 0 4.5-2.026563 4.5-4.5 0-1.059095-0.385401-2.0209801-1.005859-2.7871094l0.754297-0.7542968 0.398046 0.3949218 0.707031-0.7089844-1.501953-1.4980469-0.705078 0.7070313 0.394922 0.3980469-0.75039 0.7503906c-0.6460254-0.510828-1.432052-0.8537803-2.291016-0.9511719v-1.0507812h2v-1zm10 1v10l4-5zm-7.5 2c1.932997 0 3.5 1.5670034 3.5 3.5 0 1.932997-1.567003 3.5-3.5 3.5-1.9329966 0-3.5-1.567003-3.5-3.5 0-1.9329966 1.5670034-3.5 3.5-3.5z"/>
</svg>

After

Width:  |  Height:  |  Size: 853 B

View File

@@ -0,0 +1,8 @@
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#eff0f1;
}</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Text" d="m10 3v1h2v1.9941406c0.16642-0.018659 0.328597-0.050781 0.5-0.050781 2.485281 0 4.5 2.0147194 4.5 4.4999994 0 1.583292-0.822479 2.969406-2.058594 3.771485-0.055687 0.436882-0.141177 0.868841-0.285156 1.285156 1.961689-0.842475 3.34375-2.795083 3.34375-5.056641 0-1.3179122-0.485556-2.517631-1.265625-3.4667965l0.769531-0.7617187 0.78711 0.7851562 0.707031-0.7070312-2.294922-2.2910157-0.707031 0.7070313 0.798828 0.7988281-0.761719 0.7558594c-0.839235-0.710208-1.879979-1.189714-3.033203-1.2949219v-0.96875h2v-1zm-4 3.03125v1h2v0.96875c-2.7933601 0.2548365-5 2.617554-5 5.474609 0 3.025725 2.4742758 5.5 5.5 5.5 3.025724 0 5.5-2.474275 5.5-5.5 0-1.317913-0.485556-2.517631-1.265625-3.466797l0.769531-0.7617182 0.78711 0.7851562 0.707031-0.7070312-2.294922-2.2910157-0.707031 0.7070313 0.798828 0.7988281-0.761719 0.7558594c-0.839235-0.710208-1.879979-1.189714-3.033203-1.2949219v-0.96875h2v-1zm2.5 2.9433594c2.485281 0 4.5 2.0147186 4.5 4.4999996s-2.014719 4.5-4.5 4.5c-2.485282 0-4.5-2.014719-4.5-4.5s2.014718-4.4999996 4.5-4.4999996z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,21 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#f2f2f2;
}
.ColorScheme-NegativeText {
color:#da4453;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 19.292969 4 L 15.792969 7.5 L 14.292969 6 L 12.292969 8 L 10.5 9.7929688 L 12 11.292969 L 12.707031 12 L 14.207031 13.5 L 16 11.707031 L 18 9.7070312 L 16.5 8.2070312 L 20 4.7070312 L 19.292969 4 z M 9.7929688 10.5 L 9 11.292969 L 7 13.292969 L 8.5 14.792969 L 4 19.292969 L 4.7070312 20 L 9.2070312 15.5 L 10.707031 17 L 12.707031 15 L 13.5 14.207031 L 12 12.707031 L 11.292969 12 L 9.7929688 10.5 z "
class="ColorScheme-Text"/>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 14.990234 14 L 14 14.990234 L 16.009766 17 L 14 19.009766 L 14.990234 20 L 17 17.990234 L 19.009766 20 L 20 19.009766 L 17.990234 17 L 20 14.990234 L 19.009766 14 L 17 16.009766 L 14.990234 14 z "
class="ColorScheme-NegativeText"
/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#f2f2f2;
}
</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 19.292969 4 L 15.792969 7.5 L 14.292969 6 L 12.292969 8 L 9 11.292969 L 7 13.292969 L 8.5 14.792969 L 4 19.292969 L 4.7070312 20 L 9.2070312 15.5 L 10.707031 17 L 12.707031 15 L 16 11.707031 L 18 9.7070312 L 16.5 8.2070312 L 20 4.7070312 L 19.292969 4 z "
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 592 B

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#f2f2f2;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 16.001953 3.9980469 A 12 12 0 0 0 4.0019531 15.998047 A 12 12 0 0 0 16.001953 27.998047 A 12 12 0 0 0 28.001953 15.998047 A 12 12 0 0 0 16.001953 3.9980469 z M 16.001953 4.9980469 A 11 11 0 0 1 27.001953 15.998047 A 11 11 0 0 1 16.001953 26.998047 A 11 11 0 0 1 5.0019531 15.998047 A 11 11 0 0 1 16.001953 4.9980469 z M 12 12 L 12 20 L 14 20 L 14 12 L 12 12 z M 18 12 L 18 20 L 20 20 L 20 12 L 18 12 z "
id="path8"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 782 B

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#f2f2f2;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 16.001953 3.9980469 A 12 12 0 0 0 4.0019531 15.998047 A 12 12 0 0 0 16.001953 27.998047 A 12 12 0 0 0 28.001953 15.998047 A 12 12 0 0 0 16.001953 3.9980469 z M 16.001953 4.9980469 A 11 11 0 0 1 27.001953 15.998047 A 11 11 0 0 1 16.001953 26.998047 A 11 11 0 0 1 5.0019531 15.998047 A 11 11 0 0 1 16.001953 4.9980469 z M 13 12 L 13 20 L 20 16 L 13 12 z "
id="path105"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 735 B

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#f2f2f2;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="m 16.001953,3.998047 a 12,12 0 0 1 12,12 12,12 0 0 1 -12,12 12,12 0 0 1 -11.9999999,-12 12,12 0 0 1 11.9999999,-12 z m 0,1 a 11,11 0 0 0 -10.9999999,11 11,11 0 0 0 10.9999999,11 11,11 0 0 0 11,-11 11,11 0 0 0 -11,-11 z M 22.003906,12 l 0,8 -7,-4 7,-4 z m -7,4 0,4 -6.9999999,-4 6.9999999,-4 0,4 z"
id="path8"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 675 B

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#f2f2f2;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 16.001953 3.9980469 A 12 12 0 0 0 4.0019531 15.998047 A 12 12 0 0 0 16.001953 27.998047 A 12 12 0 0 0 28.001953 15.998047 A 12 12 0 0 0 16.001953 3.9980469 z M 16.001953 4.9980469 A 11 11 0 0 1 27.001953 15.998047 A 11 11 0 0 1 16.001953 26.998047 A 11 11 0 0 1 5.0019531 15.998047 A 11 11 0 0 1 16.001953 4.9980469 z M 12 12 L 12 20 L 20 20 L 20 12 L 12 12 z "
id="path91"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 741 B

View File

@@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#f2f2f2;
}
</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 4 4 L 4 20 L 5 20 L 20 20 L 20 19 L 20 4 L 19 4 L 5 4 L 4 4 z M 5 5 L 19 5 L 19 19 L 5 19 L 5 5 z M 6 6 L 6 7 L 7 7 L 7 6 L 6 6 z M 7 7 L 7 9 L 9 9 L 9 7 L 7 7 z M 9 7 L 10 7 L 10 6 L 9 6 L 9 7 z M 9 9 L 9 10 L 10 10 L 10 9 L 9 9 z M 7 9 L 6 9 L 6 10 L 7 10 L 7 9 z M 14 6 L 14 7 L 15 7 L 15 6 L 14 6 z M 15 7 L 15 9 L 17 9 L 17 7 L 15 7 z M 17 7 L 18 7 L 18 6 L 17 6 L 17 7 z M 17 9 L 17 10 L 18 10 L 18 9 L 17 9 z M 15 9 L 14 9 L 14 10 L 15 10 L 15 9 z M 10 12 L 10 14 L 14 14 L 14 12 L 10 12 z M 14 14 L 14 16 L 16 16 L 16 14 L 14 14 z M 16 16 L 16 18 L 18 18 L 18 16 L 16 16 z M 10 14 L 8 14 L 8 16 L 10 16 L 10 14 z M 8 16 L 6 16 L 6 18 L 8 18 L 8 16 z "
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 996 B

View File

@@ -0,0 +1,9 @@
<svg viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<style id="current-color-scheme" type="text/css">
.ColorScheme-Text {
color:#eff0f1;
}
</style>
<path fill="#da4453" d="m 10,5 v 14 l 2,1 2,-1 V 5 Z"/>
<path style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Text" d="m12 2c-1.108 0-2 .892-2 2v10.765625c-.6358612.568731-.9995185 1.381278-1 2.234375 0 1.656854 1.343146 3 3 3s3-1.343146 3-3c-.001-.852416-.364645-1.664145-1-2.232422v-10.767578c0-1.108-.892-2-2-2zm0 1c.554 0 1 .446 1 1v10.173828.826172.263672c.61861.349704.999778.995903 1 1.695312-.000704 1.081041-.895928 1.957032-2 1.957032s-1.999296-.875991-2-1.957032c-.0004909-.700106.380773-1.347212 1-1.697265v-.261719-.828125-10.171875c0-.554.446-1 1-1zm-5 2v1h2v-1zm0 3v1h2v-1zm0 3v1h2v-1zm5 5c-.552285 0-1 .447715-1 1s.447715 1 1 1 1-.447715 1-1-.447715-1-1-1z"/>
</svg>

After

Width:  |  Height:  |  Size: 908 B

View File

@@ -0,0 +1,8 @@
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#232629;
}</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Text" d="m11 5v1h2v1.0507812c-2.237959 0.2537455-4 2.1467332-4 4.4492188 0 2.473437 2.026563 4.5 4.5 4.5s4.5-2.026563 4.5-4.5c0-1.059095-0.385401-2.0209801-1.005859-2.7871094l0.755859-0.755859 0.396484 0.396484 0.707031-0.7089844-1.501953-1.4980469-0.705078 0.7070313 0.396485 0.396485-0.751953 0.7519525c-0.646025-0.510828-1.432052-0.8537803-2.291016-0.9511719v-1.0507812h2v-1zm-4 1-4 5 4 5zm6.5 2c1.932997 0 3.5 1.5670034 3.5 3.5 0 1.932997-1.567003 3.5-3.5 3.5s-3.5-1.567003-3.5-3.5c0-1.9329966 1.567003-3.5 3.5-3.5z"/>
</svg>

After

Width:  |  Height:  |  Size: 826 B

View File

@@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#232629;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 4.5,3 3.96875,3.96875 3,4.5 3.96875,5.03125 4.5,6 5.03125,5.03125 6,4.5 5.03125,3.96875 4.5,3 Z M 9.5,3 8.96875,3.96875 8,4.5 8.96875,5.03125 9.5,6 10.03125,5.03125 11,4.5 10.03125,3.96875 9.5,3 Z M 16.171875,3 3,16.171875 5.828125,19 19,5.828125 16.171875,3 Z m -0.06836,1.4824219 1.414062,1.4140625 -3.097656,3.0996094 -1.416016,-1.4160157 3.09961,-3.0976562 z M 6.5,7 5.96875,7.96875 5,8.5 5.96875,9.03125 6.5,10 7.03125,9.03125 8,8.5 7.03125,7.96875 6.5,7 Z"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 813 B

View File

@@ -0,0 +1,9 @@
<svg viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<style id="current-color-scheme" type="text/css">
.ColorScheme-Text {
color:#232629;
}
</style>
<path fill="#3daee9" d="m10 14v5l2 1 2-1v-5z"/>
<path style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Text" d="m12 2c-1.108 0-2 .892-2 2v10.765625c-.6358612.568731-.9995185 1.381278-1 2.234375 0 1.656854 1.343146 3 3 3s3-1.343146 3-3c-.001-.852416-.364645-1.664145-1-2.232422v-10.767578c0-1.108-.892-2-2-2zm0 1c.554 0 1 .446 1 1v10.173828.826172.263672c.61861.349704.999778.995903 1 1.695312-.000704 1.081041-.895928 1.957032-2 1.957032s-1.999296-.875991-2-1.957032c-.0004909-.700106.380773-1.347212 1-1.697265v-.261719-.828125-10.171875c0-.554.446-1 1-1zm-5 2v1h2v-1zm0 3v1h2v-1zm0 3v1h2v-1zm5 5c-.552285 0-1 .447715-1 1s.447715 1 1 1 1-.447715 1-1-.447715-1-1-1z"/>
</svg>

After

Width:  |  Height:  |  Size: 900 B

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#4d4d4d;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 16.001953 3.9980469 A 12 12 0 0 0 4.0019531 15.998047 A 12 12 0 0 0 16.001953 27.998047 A 12 12 0 0 0 28.001953 15.998047 A 12 12 0 0 0 16.001953 3.9980469 z M 16.001953 4.9980469 A 11 11 0 0 1 27.001953 15.998047 A 11 11 0 0 1 16.001953 26.998047 A 11 11 0 0 1 5.0019531 15.998047 A 11 11 0 0 1 16.001953 4.9980469 z M 10 12 L 10 20 L 17 16 L 10 12 z M 17 16 L 17 20 L 24 16 L 17 12 L 17 16 z "
id="path8"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 774 B

View File

@@ -0,0 +1,8 @@
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#232629;
}</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Text" d="m5 5v1h2v1.0507812c-2.2379593 0.2537455-4 2.1467332-4 4.4492188 0 2.473437 2.0265633 4.5 4.5 4.5 2.473437 0 4.5-2.026563 4.5-4.5 0-1.059095-0.385401-2.0209801-1.005859-2.7871094l0.754297-0.7542968 0.398046 0.3949218 0.707031-0.7089844-1.501953-1.4980469-0.705078 0.7070313 0.394922 0.3980469-0.75039 0.7503906c-0.6460254-0.510828-1.432052-0.8537803-2.291016-0.9511719v-1.0507812h2v-1zm10 1v10l4-5zm-7.5 2c1.932997 0 3.5 1.5670034 3.5 3.5 0 1.932997-1.567003 3.5-3.5 3.5-1.9329966 0-3.5-1.567003-3.5-3.5 0-1.9329966 1.5670034-3.5 3.5-3.5z"/>
</svg>

After

Width:  |  Height:  |  Size: 853 B

View File

@@ -0,0 +1,8 @@
<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<defs>
<style id="current-color-scheme" type="text/css">.ColorScheme-Text {
color:#232629;
}</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Text" d="m10 3v1h2v1.9941406c0.16642-0.018659 0.328597-0.050781 0.5-0.050781 2.485281 0 4.5 2.0147194 4.5 4.4999994 0 1.583292-0.822479 2.969406-2.058594 3.771485-0.055687 0.436882-0.141177 0.868841-0.285156 1.285156 1.961689-0.842475 3.34375-2.795083 3.34375-5.056641 0-1.3179122-0.485556-2.517631-1.265625-3.4667965l0.769531-0.7617187 0.78711 0.7851562 0.707031-0.7070312-2.294922-2.2910157-0.707031 0.7070313 0.798828 0.7988281-0.761719 0.7558594c-0.839235-0.710208-1.879979-1.189714-3.033203-1.2949219v-0.96875h2v-1zm-4 3.03125v1h2v0.96875c-2.7933601 0.2548365-5 2.617554-5 5.474609 0 3.025725 2.4742758 5.5 5.5 5.5 3.025724 0 5.5-2.474275 5.5-5.5 0-1.317913-0.485556-2.517631-1.265625-3.466797l0.769531-0.7617182 0.78711 0.7851562 0.707031-0.7070312-2.294922-2.2910157-0.707031 0.7070313 0.798828 0.7988281-0.761719 0.7558594c-0.839235-0.710208-1.879979-1.189714-3.033203-1.2949219v-0.96875h2v-1zm2.5 2.9433594c2.485281 0 4.5 2.0147186 4.5 4.4999996s-2.014719 4.5-4.5 4.5c-2.485282 0-4.5-2.014719-4.5-4.5s2.014718-4.4999996 4.5-4.4999996z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,22 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#232629;
}
.ColorScheme-NegativeText {
color:#da4453;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 18.292969 3 L 14.792969 6.5 L 13.292969 5 L 11.292969 7 L 9.5 8.7929688 L 11 10.292969 L 11.707031 11 L 13.207031 12.5 L 15 10.707031 L 17 8.7070312 L 15.5 7.2070312 L 19 3.7070312 L 18.292969 3 z M 8.7929688 9.5 L 8 10.292969 L 6 12.292969 L 7.5 13.792969 L 3 18.292969 L 3.7070312 19 L 8.2070312 14.5 L 9.7070312 16 L 11.707031 14 L 12.5 13.207031 L 11 11.707031 L 10.292969 11 L 8.7929688 9.5 z "
class="ColorScheme-Text"
/>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 14.833984 14 L 14 14.833984 L 15.666016 16.5 L 14 18.166016 L 14.833984 19 L 16.5 17.333984 L 18.166016 19 L 19 18.166016 L 17.333984 16.5 L 19 14.833984 L 18.166016 14 L 16.5 15.666016 L 14.833984 14 z "
class="ColorScheme-NegativeText"
/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#232629;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 18.292969 3 L 14.792969 6.5 L 13.292969 5 L 11.292969 7 L 8 10.292969 L 6 12.292969 L 7.5 13.792969 L 3 18.292969 L 3.7070312 19 L 8.2070312 14.5 L 9.7070312 16 L 11.707031 14 L 15 10.707031 L 17 8.7070312 L 15.5 7.2070312 L 19 3.7070312 L 18.292969 3 z "
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 598 B

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#4d4d4d;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 16.001953 3.9980469 A 12 12 0 0 0 4.0019531 15.998047 A 12 12 0 0 0 16.001953 27.998047 A 12 12 0 0 0 28.001953 15.998047 A 12 12 0 0 0 16.001953 3.9980469 z M 16.001953 4.9980469 A 11 11 0 0 1 27.001953 15.998047 A 11 11 0 0 1 16.001953 26.998047 A 11 11 0 0 1 5.0019531 15.998047 A 11 11 0 0 1 16.001953 4.9980469 z M 12 12 L 12 20 L 14 20 L 14 12 L 12 12 z M 18 12 L 18 20 L 20 20 L 20 12 L 18 12 z "
id="path8"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 782 B

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#4d4d4d;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 16.001953 3.9980469 A 12 12 0 0 0 4.0019531 15.998047 A 12 12 0 0 0 16.001953 27.998047 A 12 12 0 0 0 28.001953 15.998047 A 12 12 0 0 0 16.001953 3.9980469 z M 16.001953 4.9980469 A 11 11 0 0 1 27.001953 15.998047 A 11 11 0 0 1 16.001953 26.998047 A 11 11 0 0 1 5.0019531 15.998047 A 11 11 0 0 1 16.001953 4.9980469 z M 13 12 L 13 20 L 20 16 L 13 12 z "
id="path105"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 735 B

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#4d4d4d;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="m 16.001953,3.998047 a 12,12 0 0 1 12,12 12,12 0 0 1 -12,12 12,12 0 0 1 -11.9999999,-12 12,12 0 0 1 11.9999999,-12 z m 0,1 a 11,11 0 0 0 -10.9999999,11 11,11 0 0 0 10.9999999,11 11,11 0 0 0 11,-11 11,11 0 0 0 -11,-11 z M 22.003906,12 l 0,8 -7,-4 7,-4 z m -7,4 0,4 -6.9999999,-4 6.9999999,-4 0,4 z"
id="path8"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 675 B

View File

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<defs
id="defs3051">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text {
color:#4d4d4d;
}
</style>
</defs>
<path
style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 16.001953 3.9980469 A 12 12 0 0 0 4.0019531 15.998047 A 12 12 0 0 0 16.001953 27.998047 A 12 12 0 0 0 28.001953 15.998047 A 12 12 0 0 0 16.001953 3.9980469 z M 16.001953 4.9980469 A 11 11 0 0 1 27.001953 15.998047 A 11 11 0 0 1 16.001953 26.998047 A 11 11 0 0 1 5.0019531 15.998047 A 11 11 0 0 1 16.001953 4.9980469 z M 12 12 L 12 20 L 20 20 L 20 12 L 12 12 z "
id="path91"
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 741 B

View File

@@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#4d4d4d;
}
</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none"
d="M 4 4 L 4 20 L 5 20 L 20 20 L 20 19 L 20 4 L 19 4 L 5 4 L 4 4 z M 5 5 L 19 5 L 19 19 L 5 19 L 5 5 z M 6 6 L 6 7 L 7 7 L 7 6 L 6 6 z M 7 7 L 7 9 L 9 9 L 9 7 L 7 7 z M 9 7 L 10 7 L 10 6 L 9 6 L 9 7 z M 9 9 L 9 10 L 10 10 L 10 9 L 9 9 z M 7 9 L 6 9 L 6 10 L 7 10 L 7 9 z M 14 6 L 14 7 L 15 7 L 15 6 L 14 6 z M 15 7 L 15 9 L 17 9 L 17 7 L 15 7 z M 17 7 L 18 7 L 18 6 L 17 6 L 17 7 z M 17 9 L 17 10 L 18 10 L 18 9 L 17 9 z M 15 9 L 14 9 L 14 10 L 15 10 L 15 9 z M 10 12 L 10 14 L 14 14 L 14 12 L 10 12 z M 14 14 L 14 16 L 16 16 L 16 14 L 14 14 z M 16 16 L 16 18 L 18 18 L 18 16 L 16 16 z M 10 14 L 8 14 L 8 16 L 10 16 L 10 14 z M 8 16 L 6 16 L 6 18 L 8 18 L 8 16 z "
class="ColorScheme-Text"
/>
</svg>

After

Width:  |  Height:  |  Size: 996 B

View File

@@ -0,0 +1,9 @@
<svg viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<style id="current-color-scheme" type="text/css">
.ColorScheme-Text {
color:#232629;
}
</style>
<path fill="#da4453" d="m 10,5 v 14 l 2,1 2,-1 V 5 Z"/>
<path style="fill:currentColor;fill-opacity:1;stroke:none" class="ColorScheme-Text" d="m12 2c-1.108 0-2 .892-2 2v10.765625c-.6358612.568731-.9995185 1.381278-1 2.234375 0 1.656854 1.343146 3 3 3s3-1.343146 3-3c-.001-.852416-.364645-1.664145-1-2.232422v-10.767578c0-1.108-.892-2-2-2zm0 1c.554 0 1 .446 1 1v10.173828.826172.263672c.61861.349704.999778.995903 1 1.695312-.000704 1.081041-.895928 1.957032-2 1.957032s-1.999296-.875991-2-1.957032c-.0004909-.700106.380773-1.347212 1-1.697265v-.261719-.828125-10.171875c0-.554.446-1 1-1zm-5 2v1h2v-1zm0 3v1h2v-1zm0 3v1h2v-1zm5 5c-.552285 0-1 .447715-1 1s.447715 1 1 1 1-.447715 1-1-.447715-1-1-1z"/>
</svg>

After

Width:  |  Height:  |  Size: 908 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -34,145 +34,129 @@ TrainBottom::TrainBottom(TrainSidebar *trainSidebar, QWidget *parent) :
HelpWhatsThis *help = new HelpWhatsThis(this);
this->setWhatsThis(help->getWhatsThisText(HelpWhatsThis::WorkoutControl));
setAttribute(Qt::WA_StyledBackground, true); // otherwise the background-color of the widget is not shown
// Control buttons
QHBoxLayout *toolbuttons = new QHBoxLayout;
toolbuttons->setSpacing(0);
toolbuttons->setContentsMargins(0,0,0,0);
QIcon connectButtonIcon(":images/oxygen/power-off.png");
m_connectButton = new QPushButton(connectButtonIcon, "", this);
m_connectButton = new QPushButton(this);
applyIcon(m_connectButton, "offline");
m_connectButton->setFocusPolicy(Qt::NoFocus);
m_connectButton->setIconSize(QSize(64,64));
m_connectButton->setAutoFillBackground(false);
m_connectButton->setAutoDefault(false);
m_connectButton->setFlat(true);
m_connectButton->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
m_connectButton->setShortcut(Qt::Key_MediaPrevious);
toolbuttons->addWidget(m_connectButton);
QIcon rewIcon(":images/oxygen/rewind.png");
m_rewindButton = new QPushButton(rewIcon, "", this);
toolbuttons->addSpacing(5);
toolbuttons->addWidget(newSep());
toolbuttons->addSpacing(5);
m_rewindButton = new QPushButton(this);
applyIcon(m_rewindButton, "rewind");
m_rewindButton->setFocusPolicy(Qt::NoFocus);
m_rewindButton->setIconSize(QSize(64,64));
m_rewindButton->setAutoFillBackground(false);
m_rewindButton->setAutoDefault(false);
m_rewindButton->setFlat(true);
m_rewindButton->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
m_rewindButton->setAutoRepeat(true);
m_rewindButton->setAutoRepeatDelay(400);
m_rewindButton->setShortcut(Qt::Key_MediaPrevious);
toolbuttons->addWidget(m_rewindButton);
QIcon stopIcon(":images/oxygen/stop.png");
m_stopButton = new QPushButton(stopIcon, "", this);
m_stopButton = new QPushButton(this);
applyIcon(m_stopButton, "stop");
m_stopButton->setFocusPolicy(Qt::NoFocus);
m_stopButton->setIconSize(QSize(64,64));
m_stopButton->setAutoFillBackground(false);
m_stopButton->setAutoDefault(false);
m_stopButton->setFlat(true);
m_stopButton->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
m_stopButton->setShortcut(Qt::Key_MediaStop);
toolbuttons->addWidget(m_stopButton);
QIcon playIcon(":images/oxygen/play.png");
m_playButton = new QPushButton(playIcon, "", this);
m_playButton = new QPushButton(this);
applyIcon(m_playButton, "play");
m_playButton->setFocusPolicy(Qt::NoFocus);
m_playButton->setIconSize(QSize(64,64));
m_playButton->setAutoFillBackground(false);
m_playButton->setAutoDefault(false);
m_playButton->setFlat(true);
m_playButton->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
m_playButton->setShortcut(Qt::Key_MediaTogglePlayPause);
toolbuttons->addWidget(m_playButton);
QIcon fwdIcon(":images/oxygen/ffwd.png");
m_forwardButton = new QPushButton(fwdIcon, "", this);
m_forwardButton = new QPushButton(this);
applyIcon(m_forwardButton, "ffwd");
m_forwardButton->setFocusPolicy(Qt::NoFocus);
m_forwardButton->setIconSize(QSize(64,64));
m_forwardButton->setAutoFillBackground(false);
m_forwardButton->setAutoDefault(false);
m_forwardButton->setFlat(true);
m_forwardButton->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
m_forwardButton->setAutoRepeat(true);
m_forwardButton->setAutoRepeatDelay(400);
m_forwardButton->setShortcut(Qt::Key_MediaNext);
toolbuttons->addWidget(m_forwardButton);
QIcon backLapIcon(":images/oxygen/back.png");
backLap = new QPushButton(backLapIcon, "", this);
toolbuttons->addSpacing(5);
toolbuttons->addWidget(newSep());
toolbuttons->addSpacing(5);
backLap = new QPushButton(this);
applyIcon(backLap, "back");
backLap->setFocusPolicy(Qt::NoFocus);
backLap->setIconSize(QSize(64,64));
backLap->setAutoFillBackground(false);
backLap->setAutoDefault(false);
backLap->setFlat(true);
backLap->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
backLap->setAutoRepeat(true);
backLap->setAutoRepeatDelay(400);
toolbuttons->addWidget(backLap);
QIcon lapIcon(":images/oxygen/lap.png");
m_lapButton = new QPushButton(lapIcon, "", this);
m_lapButton = new QPushButton(this);
applyIcon(m_lapButton, "lap");
m_lapButton->setFocusPolicy(Qt::NoFocus);
m_lapButton->setIconSize(QSize(64,64));
m_lapButton->setAutoFillBackground(false);
m_lapButton->setAutoDefault(false);
m_lapButton->setFlat(true);
m_lapButton->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
m_lapButton->setShortcut(Qt::Key_0);
toolbuttons->addWidget(m_lapButton);
QIcon fwdLapIcon(":images/oxygen/fwd.png");
fwdLap = new QPushButton(fwdLapIcon, "", this);
fwdLap = new QPushButton(this);
applyIcon(fwdLap, "fwd");
fwdLap->setFocusPolicy(Qt::NoFocus);
fwdLap->setIconSize(QSize(64,64));
fwdLap->setAutoFillBackground(false);
fwdLap->setAutoDefault(false);
fwdLap->setFlat(true);
fwdLap->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
fwdLap->setAutoRepeat(true);
fwdLap->setAutoRepeatDelay(400);
fwdLap->setShortcut(Qt::Key_MediaLast);
toolbuttons->addWidget(fwdLap);
QIcon calIcon(":images/oxygen/cal.png");
cal = new QPushButton(calIcon, "", this);
toolbuttons->addSpacing(5);
toolbuttons->addWidget(newSep());
toolbuttons->addSpacing(5);
cal = new QPushButton(this);
applyIcon(cal, "cal");
cal->setFocusPolicy(Qt::NoFocus);
cal->setIconSize(QSize(64,64));
cal->setAutoFillBackground(false);
cal->setAutoDefault(false);
cal->setFlat(true);
cal->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
cal->setShortcut(Qt::Key_C);
toolbuttons->addWidget(cal);
QIcon upIcon(":images/oxygen/up.png");
loadUp = new QPushButton(upIcon, "", this);
loadUp->setFocusPolicy(Qt::NoFocus);
loadUp->setIconSize(QSize(64,64));
loadUp->setAutoFillBackground(false);
loadUp->setAutoDefault(false);
loadUp->setFlat(true);
loadUp->setAutoRepeat(true);
loadUp->setAutoRepeatInterval(50);
loadUp->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
loadUp->setShortcut(Qt::Key_Plus);
toolbuttons->addWidget(loadUp);
toolbuttons->addSpacing(5);
toolbuttons->addWidget(newSep());
toolbuttons->addSpacing(5);
QIcon downIcon(":images/oxygen/down.png");
loadDown = new QPushButton(downIcon, "", this);
loadDown = new QPushButton(this);
applyIcon(loadDown, "down");
loadDown->setFocusPolicy(Qt::NoFocus);
loadDown->setIconSize(QSize(64,64));
loadDown->setAutoFillBackground(false);
loadDown->setAutoDefault(false);
loadDown->setFlat(true);
loadDown->setAutoRepeat(true);
loadDown->setAutoRepeatInterval(50);
loadDown->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
loadDown->setShortcut(Qt::Key_Minus);
toolbuttons->addWidget(loadDown);
loadUp = new QPushButton(this);
applyIcon(loadUp, "up");
loadUp->setFocusPolicy(Qt::NoFocus);
loadUp->setAutoDefault(false);
loadUp->setFlat(true);
loadUp->setAutoRepeat(true);
loadUp->setAutoRepeatInterval(50);
loadUp->setShortcut(Qt::Key_Plus);
toolbuttons->addWidget(loadUp);
intensitySlider = new QSlider(Qt::Vertical, this);
intensitySlider->setAutoFillBackground(false);
intensitySlider->setFocusPolicy(Qt::NoFocus);
intensitySlider->setMinimum(75);
intensitySlider->setMaximum(125);
@@ -230,10 +214,10 @@ TrainBottom::TrainBottom(TrainSidebar *trainSidebar, QWidget *parent) :
connect(m_trainSidebar, SIGNAL(setNotification(QString, int)), this, SLOT(setNotification(QString, int)));
connect(m_trainSidebar, SIGNAL(clearNotification(void)), this, SLOT(clearNotification(void)));
connect(m_trainSidebar->context, SIGNAL(configChanged(qint32)), this, SLOT(configChanged(qint32)));
this->setContentsMargins(0,0,0,0);
this->setFocusPolicy(Qt::NoFocus);
this->setAutoFillBackground(false);
this->setStyleSheet("background-color: rgba( 255, 255, 255, 0% ); border: 0px;");
this->setLayout(allControlsLayout);
this->installEventFilter(trainSidebar);
@@ -263,24 +247,23 @@ TrainBottom::TrainBottom(TrainSidebar *trainSidebar, QWidget *parent) :
// Create a timer for notifications, but don't start yet
notificationTimer = new QTimer(this);
connect(notificationTimer, SIGNAL(timeout()), SLOT(clearNotification()));
updateStyles();
}
void TrainBottom::updatePlayButtonIcon()
{
static QIcon playIcon(":images/oxygen/play.png");
static QIcon pauseIcon(":images/oxygen/pause.png");
if (m_trainSidebar->currentStatus() & RT_PAUSED)
{
m_playButton->setIcon(playIcon);
applyIcon(m_playButton, "play");
}
else if (m_trainSidebar->currentStatus() & RT_RUNNING)
{
m_playButton->setIcon(pauseIcon);
applyIcon(m_playButton, "pause");
}
else // Not running or paused means stopped
{
m_playButton->setIcon(playIcon);
applyIcon(m_playButton, "play");
}
}
@@ -292,12 +275,9 @@ void TrainBottom::autoHideCheckboxChanged(int state)
void TrainBottom::statusChanged(int status)
{
static QIcon connectedIcon(":images/oxygen/power-on.png");
static QIcon disconnectedIcon(":images/oxygen/power-off.png");
// not yet connected
if ((status&RT_CONNECTED) == 0) {
m_connectButton->setIcon(disconnectedIcon);
applyIcon(m_connectButton, "offline");
m_connectButton->setEnabled(true);
m_playButton->setEnabled(false);
m_stopButton->setEnabled(false);
@@ -315,7 +295,7 @@ void TrainBottom::statusChanged(int status)
// connected, but not running
if ((status&RT_CONNECTED) && ((status&RT_RUNNING) == 0)) {
m_connectButton->setIcon(connectedIcon);
applyIcon(m_connectButton, "online");
m_connectButton->setEnabled(true);
m_playButton->setEnabled(true);
m_stopButton->setEnabled(false);
@@ -333,7 +313,7 @@ void TrainBottom::statusChanged(int status)
// paused - important to check for paused before running
if (status&RT_PAUSED) {
m_connectButton->setIcon(connectedIcon);
applyIcon(m_connectButton, "online");
m_connectButton->setEnabled(false);
m_playButton->setEnabled(true);
m_stopButton->setEnabled(true);
@@ -351,7 +331,7 @@ void TrainBottom::statusChanged(int status)
// running & calibrating
if ((status&RT_CALIBRATING) && (status&RT_RUNNING)) {
m_connectButton->setIcon(connectedIcon);
applyIcon(m_connectButton, "online");
m_connectButton->setEnabled(false);
m_playButton->setEnabled(false);
m_stopButton->setEnabled(true);
@@ -369,7 +349,7 @@ void TrainBottom::statusChanged(int status)
// running
if (status&RT_RUNNING) {
m_connectButton->setIcon(connectedIcon);
applyIcon(m_connectButton, "online");
m_connectButton->setEnabled(false);
m_playButton->setEnabled(true);
m_stopButton->setEnabled(true);
@@ -406,3 +386,94 @@ void TrainBottom::clearNotification(void)
{
notificationText->clear();
}
void TrainBottom::updateStyles()
{
QColor bg = GColor(CCHROME);
QColor frame = GCColor::invertColor(bg);
QColor hover = GColor(CHOVER);
QString bss = QString(
"QWidget { background-color: %2; }"
"QPushButton { border: 0px; } "
"QPushButton:hover { background-color: %1; } "
"QFrame { color: %3; } "
).arg(hover.name(QColor::HexArgb))
.arg(bg.name(QColor::HexArgb))
.arg(frame.name(QColor::HexArgb));
bool dark = isDark();
reapplyIcon(m_connectButton, dark);
reapplyIcon(m_playButton, dark);
reapplyIcon(m_rewindButton, dark);
reapplyIcon(m_stopButton, dark);
reapplyIcon(m_forwardButton, dark);
reapplyIcon(m_lapButton, dark);
reapplyIcon(m_connectButton, dark);
reapplyIcon(loadDown, dark);
reapplyIcon(loadUp, dark);
reapplyIcon(cal, dark);
reapplyIcon(fwdLap, dark);
reapplyIcon(backLap, dark);
setStyleSheet(bss);
}
QFrame* TrainBottom::newSep()
{
QFrame *sep = new QFrame(this);
sep->setFrameShape(QFrame::VLine);
sep->setFrameShadow(QFrame::Plain);
sep->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
return sep;
}
void TrainBottom::configChanged(qint32)
{
updateStyles();
}
void
TrainBottom::applyIcon
(QPushButton *button, QString iconName, bool dark)
{
iconNames[button] = iconName;
button->setIcon(QIcon(QString(":images/breeze/%1/%2.svg").arg(dark ? "dark" : "light").arg(iconName)));
button->setIconSize(QSize(64, 64));
button->setFixedSize(64, 64);
}
void
TrainBottom::applyIcon
(QPushButton *button, QString iconName)
{
applyIcon(button, iconName, isDark());
}
void
TrainBottom::reapplyIcon
(QPushButton *button, bool dark)
{
applyIcon(button, iconNames.value(button, "unknown"), dark);
}
void
TrainBottom::reapplyIcon
(QPushButton *button)
{
applyIcon(button, iconNames.value(button, "unknown"));
}
bool
TrainBottom::isDark
() const
{
return GColor(CCHROME).lightness() < 127;
}

View File

@@ -20,6 +20,9 @@
#define _GC_TrainBottom_h
#include <QWidget>
#include <QFrame>
#include <QMap>
#include <QString>
class TrainSidebar;
class QPushButton;
@@ -32,6 +35,10 @@ class TrainBottom : public QWidget
public:
TrainBottom(TrainSidebar * trainSidebar, QWidget *parent = 0);
public slots:
void configChanged(qint32);
private:
TrainSidebar *m_trainSidebar;
QPushButton *m_playButton, *m_rewindButton, *m_stopButton, *m_forwardButton;
@@ -39,6 +46,15 @@ private:
QSlider *intensitySlider;
QPlainTextEdit *notificationText;
QTimer *notificationTimer;
QMap<void*, QString> iconNames;
void updateStyles();
QFrame *newSep();
void applyIcon(QPushButton *button, QString iconName, bool dark);
void applyIcon(QPushButton *button, QString iconName);
void reapplyIcon(QPushButton *button, bool dark);
void reapplyIcon(QPushButton *button);
bool isDark() const;
private slots:
void updatePlayButtonIcon();

View File

@@ -1631,9 +1631,6 @@ void TrainSidebar::Disconnect()
// don't try to disconnect if running or not connected
if ((status&RT_RUNNING) || ((status&RT_CONNECTED) == 0)) return;
static QIcon connectedIcon(":images/oxygen/power-on.png");
static QIcon disconnectedIcon(":images/oxygen/power-off.png");
qDebug() << "disconnecting..";
foreach(int dev, activeDevices) {