@@ -12,20 +12,20 @@ use std::time::{Duration, Instant};
1212use crate :: iced:: state:: State ;
1313use crate :: xdg_shell_wrapper:: shared_state:: GlobalState ;
1414use cosmic:: Theme ;
15+ use cosmic:: iced:: Renderer as IcedRenderer ;
1516use cosmic:: iced:: advanced:: widget:: Tree ;
17+ use cosmic:: iced:: core:: clipboard:: Null as NullClipboard ;
18+ use cosmic:: iced:: core:: renderer:: Style ;
19+ use cosmic:: iced:: core:: { Color , Font , Length , Pixels } ;
1620use cosmic:: iced:: event:: Event ;
1721use cosmic:: iced:: futures:: { self , FutureExt , StreamExt } ;
1822use cosmic:: iced:: keyboard:: { Event as KeyboardEvent , Modifiers as IcedModifiers } ;
1923use cosmic:: iced:: mouse:: { Button as MouseButton , Cursor , Event as MouseEvent , ScrollDelta } ;
24+ use cosmic:: iced:: runtime:: Action ;
25+ use cosmic:: iced:: runtime:: task:: into_stream;
2026use cosmic:: iced:: touch:: { Event as TouchEvent , Finger } ;
2127use cosmic:: iced:: window:: Event as WindowEvent ;
2228use cosmic:: iced:: { self , Limits , Point as IcedPoint , Size as IcedSize , Task } ;
23- use cosmic:: iced_core:: clipboard:: Null as NullClipboard ;
24- use cosmic:: iced_core:: renderer:: Style ;
25- use cosmic:: iced_core:: { Color , Font , Length , Pixels } ;
26- use cosmic:: iced_renderer:: Renderer as IcedRenderer ;
27- use cosmic:: iced_runtime:: Action ;
28- use cosmic:: iced_runtime:: task:: into_stream;
2929use cosmic:: widget:: Id ;
3030use iced_tiny_skia:: graphics:: Viewport ;
3131use ordered_float:: OrderedFloat ;
@@ -169,7 +169,10 @@ impl iced::Executor for MyExecutor {
169169 Ok ( MyExecutor { scheduler, executor_token : Some ( executor_token) } )
170170 }
171171
172- fn spawn ( & self , future : impl Future < Output = ( ) > + cosmic:: iced_futures:: MaybeSend + ' static ) {
172+ fn spawn (
173+ & self ,
174+ future : impl Future < Output = ( ) > + iced:: runtime:: futures:: MaybeSend + ' static ,
175+ ) {
173176 self . scheduler . schedule ( future) . unwrap ( ) ;
174177 }
175178
@@ -288,10 +291,11 @@ impl<P: Program + Send + 'static> IcedElement<P> {
288291 program : P ,
289292 size : impl Into < Size < i32 , Logical > > ,
290293 handle : LoopHandle < ' static , GlobalState > ,
291- theme : cosmic:: Theme ,
294+ mut theme : cosmic:: Theme ,
292295 panel_id : usize ,
293296 request_redraws : bool ,
294297 ) -> IcedElement < P > {
298+ theme. transparent = theme. cosmic ( ) . frosted_applets ;
295299 let size = size. into ( ) ;
296300 let mut renderer = IcedRenderer :: new ( Font :: default ( ) , Pixels ( 16.0 ) ) ;
297301
@@ -383,7 +387,8 @@ impl<P: Program + Send + 'static> IcedElement<P> {
383387 self . 0 . lock ( ) . unwrap ( ) . update ( true ) ;
384388 }
385389
386- pub fn set_theme ( & self , theme : cosmic:: Theme ) {
390+ pub fn set_theme ( & self , mut theme : cosmic:: Theme ) {
391+ theme. transparent = theme. cosmic ( ) . frosted_applets ;
387392 let mut guard = self . 0 . lock ( ) . unwrap ( ) ;
388393 guard. theme = theme. clone ( ) ;
389394 }
0 commit comments