1
-
2
- import { ListView , ProgressIndicator , StyleMetrics } from "std-widgets.slint" ;
1
+ import { ListView , Palette , ProgressIndicator } from "std-widgets.slint" ;
3
2
import { Icon , MaterialIcons } from "icons.slint" ;
4
3
import { DayTime , Forecast } from "globals.slint" ;
5
4
import { Symbols } from "symbols.slint" ;
6
5
7
6
export component SlintLogo inherits Image {
8
7
opacity : 0.5 ;
9
- source : StyleMetrics.dark- color-scheme ? @image-url ("../images/slint/MadeWithSlint-logo-light.png" )
10
- : @image-url ("../images/slint/MadeWithSlint-logo-dark.png" ) ;
8
+ source : Palette. color-scheme == ColorScheme.dark ? @image-url ("../images/slint/MadeWithSlint-logo-light.png" )
9
+ : @image-url ("../images/slint/MadeWithSlint-logo-dark.png" ) ;
11
10
}
12
11
13
12
export component SmhiLogo inherits Image {
14
13
opacity : 0.5 ;
15
- source : StyleMetrics.dark- color-scheme ? @image-url ("../images/smhi/smhi-logo-dark.png" )
16
- : @image-url ("../images/smhi/smhi-logo-light.png" ) ;
14
+ source : Palette. color-scheme == ColorScheme.dark ? @image-url ("../images/smhi/smhi-logo-dark.png" )
15
+ : @image-url ("../images/smhi/smhi-logo-light.png" ) ;
17
16
}
18
17
19
18
export component ToolBar {
@@ -23,7 +22,7 @@ export component ToolBar {
23
22
callback refresh <=> refresh-button.clicked;
24
23
25
24
Rectangle {
26
- background : StyleMetrics.window- background.mix(StyleMetrics.default-text-color , 0.95 );
25
+ background : Palette. background.mix(Palette.foreground , 0.95 );
27
26
HorizontalLayout {
28
27
padding : 8px ;
29
28
alignment : space-between;
0 commit comments