File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
- use iced:: { time, Subscription , Theme } ;
1
+ use iced:: { time, window , Subscription , Theme } ;
2
2
use minesweeper:: model:: GameState ;
3
3
use minesweeper_iced:: { AppMsg , AppState } ;
4
4
use std:: time:: Duration ;
@@ -9,7 +9,6 @@ fn main() -> iced::Result {
9
9
10
10
fn launch ( ) -> iced:: Result {
11
11
iced:: application ( "Minesweeper" , AppState :: update, AppState :: view)
12
- . window_size ( ( 1024. , 1124. ) )
13
12
. subscription ( |state| {
14
13
if matches ! ( state. board. state( ) , GameState :: Active ) {
15
14
time:: every ( Duration :: from_secs ( 1 ) ) . map ( |_| AppMsg :: Tick )
@@ -18,5 +17,14 @@ fn launch() -> iced::Result {
18
17
}
19
18
} )
20
19
. theme ( |_state| Theme :: Dark )
20
+ . window ( window:: Settings {
21
+ size : ( 1024. , 1124. ) . into ( ) ,
22
+ #[ cfg( target_os = "linux" ) ]
23
+ platform_specific : window:: settings:: PlatformSpecific {
24
+ application_id : "minesweeper" . into ( ) ,
25
+ ..Default :: default ( )
26
+ } ,
27
+ ..Default :: default ( )
28
+ } )
21
29
. run_with ( AppState :: new)
22
30
}
You can’t perform that action at this time.
0 commit comments