From 7e00febc4da1dad4689b9657f7ea7fe8c472229e Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 7 Dec 2022 11:25:00 -0500 Subject: [PATCH] fix: lifetime --- src/applet/mod.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/applet/mod.rs b/src/applet/mod.rs index 53fb9dd0..a9c98e8a 100644 --- a/src/applet/mod.rs +++ b/src/applet/mod.rs @@ -31,18 +31,6 @@ impl Default for CosmicAppletHelper { } } -// pub fn icon_button<'a, M: 'a, Renderer>( -// name: &str, - -// icon_style: ::Style, -// ) -> Button<'a, M, Renderer> -// where -// Renderer::Theme: iced_native::svg::StyleSheet + iced_style::button::StyleSheet, -// Renderer: iced_native::Renderer + iced_native::svg::Renderer + 'a, -// { -// button(icon_style).icon(name, pixels).style(icon_style)) -// } - impl CosmicAppletHelper { pub fn suggested_icon_size(&self) -> u16 { match self.size { @@ -55,7 +43,7 @@ impl CosmicAppletHelper { } - pub fn icon_button(&self, icon_name: &'static str) -> widget::Button<'static, Message, Renderer> { + pub fn icon_button<'a, Message: 'static>(&self, icon_name: &'a str) -> widget::Button<'a, Message, Renderer> { crate::widget::button(crate::theme::Button::Text).icon(crate::theme::Svg::Symbolic, icon_name, self.suggested_icon_size()) }