33use std:: collections:: HashMap ;
44
55use crate :: { fl, pages} ;
6- use cosmic:: app:: { Command , Core } ;
6+ use cosmic:: app:: { Core , Task } ;
77use cosmic:: iced:: alignment:: { Horizontal , Vertical } ;
88use cosmic:: iced:: { Alignment , Length } ;
99use cosmic:: widget:: { self , icon, menu, nav_bar} ;
@@ -114,7 +114,7 @@ impl Application for Devmode {
114114 /// - `core` is used to passed on for you by libcosmic to use in the core of your own application.
115115 /// - `flags` is used to pass in any data that your application needs to use before it starts.
116116 /// - `Command` type is used to send messages to your application. `Command::none()` can be used to send no messages to your application.
117- fn init ( core : Core , _flags : Self :: Flags ) -> ( Self , Command < Self :: Message > ) {
117+ fn init ( core : Core , _flags : Self :: Flags ) -> ( Self , Task < Self :: Message > ) {
118118 let mut nav = nav_bar:: Model :: default ( ) ;
119119
120120 nav. insert ( )
@@ -150,7 +150,7 @@ impl Application for Devmode {
150150 nav,
151151 } ;
152152
153- ( app, Command :: none ( ) )
153+ ( app, Task :: none ( ) )
154154 }
155155
156156 /// Elements to pack at the start of the header bar.
@@ -189,7 +189,7 @@ impl Application for Devmode {
189189 /// Application messages are handled here. The application state can be modified based on
190190 /// what message was received. Commands may be returned for asynchronous execution on a
191191 /// background thread managed by the application's executor.
192- fn update ( & mut self , message : Self :: Message ) -> Command < Self :: Message > {
192+ fn update ( & mut self , message : Self :: Message ) -> Task < Self :: Message > {
193193 match message {
194194 Message :: Clone ( message) => {
195195 for command in self . clone . update ( message) {
@@ -220,7 +220,7 @@ impl Application for Devmode {
220220 self . set_context_title ( context_page. title ( ) ) ;
221221 }
222222 }
223- Command :: none ( )
223+ Task :: none ( )
224224 }
225225
226226 /// Display a context drawer if the context page is requested.
@@ -235,15 +235,15 @@ impl Application for Devmode {
235235 }
236236
237237 /// Called when a nav item is selected.
238- fn on_nav_select ( & mut self , id : nav_bar:: Id ) -> Command < Self :: Message > {
238+ fn on_nav_select ( & mut self , id : nav_bar:: Id ) -> Task < Self :: Message > {
239239 // Activate the page in the model.
240240 self . nav . activate ( id) ;
241241
242242 if let Some ( page) = self . nav . active_data :: < Page > ( ) {
243243 self . page = * page;
244244 }
245245
246- Command :: none ( )
246+ Task :: none ( )
247247 }
248248}
249249
@@ -266,7 +266,7 @@ impl Devmode {
266266 . push ( icon)
267267 . push ( title)
268268 . push ( link)
269- . align_items ( Alignment :: Center )
269+ . align_x ( Alignment :: Center )
270270 . spacing ( space_xxs)
271271 . into ( )
272272 }
0 commit comments