@@ -41,7 +41,7 @@ use cosmic::{
41
41
accept_mime_type, finish_dnd, request_dnd_data, set_actions, start_drag,
42
42
} ,
43
43
iced_style:: { application, svg} ,
44
- theme:: { Button , Container } ,
44
+ theme:: { self , Button , Container } ,
45
45
widget:: {
46
46
button, divider, horizontal_space, icon,
47
47
icon:: from_name,
@@ -62,7 +62,7 @@ use futures::future::pending;
62
62
use iced:: { widget:: container, Alignment , Background , Length } ;
63
63
use itertools:: Itertools ;
64
64
use rand:: { thread_rng, Rng } ;
65
- use std:: { collections:: HashMap , fs , path:: PathBuf , rc:: Rc , str:: FromStr , time:: Duration } ;
65
+ use std:: { collections:: HashMap , path:: PathBuf , rc:: Rc , str:: FromStr , time:: Duration } ;
66
66
use switcheroo_control:: Gpu ;
67
67
use tokio:: time:: sleep;
68
68
use url:: Url ;
@@ -262,7 +262,7 @@ impl DockItem {
262
262
. into ( ) ,
263
263
} ;
264
264
265
- let icon_button = cosmic :: widget :: button ( icon_wrapper)
265
+ let icon_button = button :: custom ( icon_wrapper)
266
266
. padding ( app_icon. padding )
267
267
. selected ( is_focused)
268
268
. style ( app_list_icon_style ( is_focused) ) ;
@@ -456,7 +456,7 @@ where
456
456
Msg : ' static + Clone ,
457
457
{
458
458
let border = 1.0 ;
459
- cosmic :: widget :: button (
459
+ button :: custom (
460
460
container (
461
461
column ! [
462
462
container( if let Some ( img) = img {
@@ -1715,14 +1715,14 @@ impl cosmic::Application for CosmicAppList {
1715
1715
fn menu_button < ' a , Message > (
1716
1716
content : impl Into < Element < ' a , Message > > ,
1717
1717
) -> cosmic:: widget:: Button < ' a , Message > {
1718
- cosmic :: widget :: button ( content)
1719
- . height ( 36 )
1720
- . style ( Button :: AppletMenu )
1718
+ button :: custom ( content)
1719
+ . height ( 20 + 2 * theme :: active ( ) . cosmic ( ) . space_xxs ( ) )
1720
+ . style ( Button :: MenuItem )
1721
1721
. padding ( menu_control_padding ( ) )
1722
1722
. width ( Length :: Fill )
1723
1723
}
1724
1724
1725
- let mut content = column ! [ ] . padding ( [ 8 , 0 ] ) . align_items ( Alignment :: Center ) ;
1725
+ let mut content = column ! [ ] . align_items ( Alignment :: Center ) ;
1726
1726
1727
1727
if let Some ( exec) = desktop_info. exec ( ) {
1728
1728
if !toplevels. is_empty ( ) {
@@ -1774,7 +1774,7 @@ impl cosmic::Application for CosmicAppList {
1774
1774
. on_press ( Message :: Exec ( exec. into ( ) , None ) ) ,
1775
1775
) ;
1776
1776
}
1777
- content = content. push ( divider:: horizontal:: default ( ) ) ;
1777
+ content = content. push ( divider:: horizontal:: light ( ) ) ;
1778
1778
}
1779
1779
1780
1780
if !toplevels. is_empty ( ) {
@@ -1791,7 +1791,7 @@ impl cosmic::Application for CosmicAppList {
1791
1791
) ;
1792
1792
}
1793
1793
content = content. push ( list_col) ;
1794
- content = content. push ( divider:: horizontal:: default ( ) ) ;
1794
+ content = content. push ( divider:: horizontal:: light ( ) ) ;
1795
1795
}
1796
1796
1797
1797
let svg_accent = Rc :: new ( |theme : & cosmic:: Theme | {
@@ -1820,7 +1820,7 @@ impl cosmic::Application for CosmicAppList {
1820
1820
) ;
1821
1821
1822
1822
if toplevels. len ( ) > 0 {
1823
- content = content. push ( divider:: horizontal:: default ( ) ) ;
1823
+ content = content. push ( divider:: horizontal:: light ( ) ) ;
1824
1824
content = match toplevels. len ( ) {
1825
1825
1 => content. push (
1826
1826
menu_button ( text:: body ( fl ! ( "quit" ) ) )
@@ -1832,7 +1832,26 @@ impl cosmic::Application for CosmicAppList {
1832
1832
) ,
1833
1833
} ;
1834
1834
}
1835
- self . core . applet . popup_container ( content) . into ( )
1835
+ container ( content)
1836
+ . padding ( 1 )
1837
+ //TODO: move style to libcosmic
1838
+ . style ( theme:: Container :: custom ( |theme| {
1839
+ let cosmic = theme. cosmic ( ) ;
1840
+ let component = & cosmic. background . component ;
1841
+ container:: Appearance {
1842
+ icon_color : Some ( component. on . into ( ) ) ,
1843
+ text_color : Some ( component. on . into ( ) ) ,
1844
+ background : Some ( Background :: Color ( component. base . into ( ) ) ) ,
1845
+ border : Border {
1846
+ radius : 8.0 . into ( ) ,
1847
+ width : 1.0 ,
1848
+ color : component. divider . into ( ) ,
1849
+ } ,
1850
+ ..Default :: default ( )
1851
+ }
1852
+ } ) )
1853
+ . width ( Length :: Fill )
1854
+ . into ( )
1836
1855
}
1837
1856
PopupType :: TopLevelList => match self . core . applet . anchor {
1838
1857
PanelAnchor :: Left | PanelAnchor :: Right => {
0 commit comments