power button implemented (without the power button functionality)
This commit is contained in:
parent
23fe371656
commit
3789f5eb7b
4 changed files with 99 additions and 2 deletions
|
|
@ -3,11 +3,13 @@ use iced::Subscription;
|
|||
use iced::Task;
|
||||
use iced_layershell::to_layer_message;
|
||||
|
||||
use crate::widgets::powerbutton::ShutdownEvents;
|
||||
|
||||
pub trait PanelWidget {
|
||||
fn update(&mut self, message: &Message) -> Task<Message>;
|
||||
fn subscribe(&self) -> Subscription<Message>;
|
||||
fn view(&self, id: iced::window::Id) -> Element<'_, Message>;
|
||||
fn own_window(&self, _id: iced::window::Id) -> bool {
|
||||
fn has_window(&self, _id: iced::window::Id) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
|
@ -17,4 +19,5 @@ pub trait PanelWidget {
|
|||
pub enum Message {
|
||||
Battery(Option<f64>),
|
||||
Time,
|
||||
ShutdownEvent(ShutdownEvents),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue