2
2
crate :: {
3
3
icons:: Icon ,
4
4
screens:: { Message , Tab , TabId } ,
5
- theme:: { BORDER_WIDTH , DEF_PADDING , DEF_TEXT } ,
5
+ theme:: { DEF_PADDING , DEF_TEXT } ,
6
6
widgets:: { column, SMALL_TEXT } ,
7
7
} ,
8
8
chrono:: Local ,
9
9
iced:: {
10
10
font,
11
11
widget:: { Container , Text } ,
12
- window, Application , Command , Font , Length , Settings ,
12
+ window, Application , Command , Element , Font , Length , Pixels , Settings , Size ,
13
13
} ,
14
14
iced_aw:: { Card , Modal , TabLabel , Tabs } ,
15
15
lazy_static:: lazy_static,
@@ -29,9 +29,6 @@ pub mod screens;
29
29
pub mod theme;
30
30
pub mod widgets;
31
31
32
- pub type Renderer = iced:: Renderer < theme:: Theme > ;
33
- pub type Element < ' a , M > = iced:: Element < ' a , M , Renderer > ;
34
-
35
32
#[ macro_export]
36
33
macro_rules! command {
37
34
( $msg: expr) => {
@@ -49,11 +46,14 @@ lazy_static! {
49
46
pub fn main ( ) -> iced:: Result {
50
47
App :: run ( Settings {
51
48
window : window:: Settings {
52
- min_size : Some ( ( 1360 , 600 ) ) ,
49
+ min_size : Some ( Size {
50
+ width : 1360.0 ,
51
+ height : 600.0 ,
52
+ } ) ,
53
53
..window:: Settings :: default ( )
54
54
} ,
55
55
default_font : FONT ,
56
- default_text_size : DEF_TEXT ,
56
+ default_text_size : Pixels ( DEF_TEXT ) ,
57
57
..Settings :: default ( )
58
58
} )
59
59
}
@@ -67,7 +67,7 @@ impl Application for App {
67
67
type Executor = iced:: executor:: Default ;
68
68
type Message = Message ;
69
69
type Flags = ( ) ;
70
- type Theme = theme :: Theme ;
70
+ type Theme = iced :: Theme ;
71
71
72
72
fn new ( _: Self :: Flags ) -> ( Self , Command < Self :: Message > ) {
73
73
(
@@ -150,7 +150,7 @@ impl Application for App {
150
150
)
151
151
. set_active_tab( & self . tab. id( ) ) ,
152
152
)
153
- . padding( BORDER_WIDTH as u16 ) ,
153
+ . padding( 2 ) ,
154
154
] ,
155
155
self . modal . clone ( ) . map ( move |( title, content) | {
156
156
Card :: new ( Text :: new ( title) , SMALL_TEXT :: new ( content) )
0 commit comments