The Following User Says Thank You to rob_kouw For This Useful Post: | ||
|
2020-01-05
, 20:59
|
Posts: 301 |
Thanked: 531 times |
Joined on Aug 2010
@ The Netherlands
|
#62
|
Rectangle { id: photoRect anchors { fill: parent } color: "black" opacity: Theme.colorScheme == 0 ? 0.65 : 0.9 }
IconButton { id: showBroadcast icon.source: (site === "NOS") ? ( Theme.colorScheme == 0 ? Qt.resolvedUrl("images/icon-nos.svg") : Qt.resolvedUrl("images/icon-nos-light.svg") ) : ( Theme.colorScheme == 0 ? Qt.resolvedUrl("images/icon-the-guardian.svg") : Qt.resolvedUrl("images/icon-the-guardian-light.svg") ) anchors { top: parent.top right: parent.right } onClicked: ExternalLinks.browse(link) }
|
2020-01-05
, 21:03
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#63
|
|
2020-01-09
, 21:41
|
Posts: 301 |
Thanked: 531 times |
Joined on Aug 2010
@ The Netherlands
|
#65
|
|
2020-01-09
, 21:45
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#66
|
Might be somewhere in Theme...
Theme.colorScheme == 0 stands for a dark Ambience.
Theme.LightOnDark Theme.DarkOnLight
|
2020-01-10
, 07:37
|
Posts: 34 |
Thanked: 30 times |
Joined on Nov 2011
|
#67
|
import Sailfish.Silica.private 1.0 ThemeTransaction { onAmbienceAboutToChange: doStuff() ; }
|
2020-01-10
, 09:14
|
|
Posts: 6,436 |
Thanked: 12,701 times |
Joined on Nov 2011
@ Ängelholm, Sweden
|
#68
|
|
2020-01-10
, 09:33
|
Posts: 34 |
Thanked: 30 times |
Joined on Nov 2011
|
#69
|
if you want to detect color scheme change then bind it to property and watch onPropertyChanged
property real themeType: Theme.colorScheme onThemeTypeChanged: console.log ("AmbienceChange");
|
2020-01-10
, 13:19
|
Posts: 301 |
Thanked: 531 times |
Joined on Aug 2010
@ The Netherlands
|
#70
|
there are constants available:
https://github.com/CODeRUS/better-sa...qmltypes#L1472Code:Theme.LightOnDark Theme.DarkOnLight
Thanks for the help!
Palm Treo -> N900 -> N9 -> Jolla -> SailfishX -> XA2
Developer mode novice, and enjoying it