diff --git a/Cargo.lock b/Cargo.lock index 0e64799..4f56c06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2399,6 +2399,7 @@ dependencies = [ "gio", "iced", "iced_aw", + "iced_fonts", "iced_futures", "iced_layershell", "iced_runtime", diff --git a/lala_bar/Cargo.toml b/lala_bar/Cargo.toml index b97cc8e..f5382c4 100644 --- a/lala_bar/Cargo.toml +++ b/lala_bar/Cargo.toml @@ -45,3 +45,4 @@ chrono = "0.4.38" async-trait.workspace = true tracing-journald = "0.3.0" iced_aw = "0.11.0" +iced_fonts = "0.1.1" diff --git a/lala_bar/src/music_bar.rs b/lala_bar/src/music_bar.rs index c475883..a1d74f7 100644 --- a/lala_bar/src/music_bar.rs +++ b/lala_bar/src/music_bar.rs @@ -63,13 +63,16 @@ impl LalaMusicBar { let week = date.format("%A").to_string(); let time = self.datetime.time(); let time_info = time.format("%H:%M").to_string(); - let week_btn = button(text(week.clone())).on_press(Message::ToggleCalendar); + + let week_btn = button(text(week)) + .on_press(Message::ToggleCalendar) + .style(button::secondary); container(row![ week_btn, Space::with_width(5.), - text(time_info), + container(text(time_info)).center_y(Length::Fill), Space::with_width(5.), - text(dateday) + container(text(dateday)).center_y(Length::Fill) ]) .center_y(Length::Fill) .height(Length::Fill) @@ -606,13 +609,13 @@ impl MultiApplication for LalaMusicBar { self.is_calendar_open = true; return Command::done(Message::NewLayerShell { settings: NewLayerShellSettings { - size: Some((400, 350)), + size: Some((350, 350)), exclusive_zone: None, anchor: Anchor::Right | Anchor::Bottom, layer: Layer::Top, margin: Some((10, 10, 10, 10)), - keyboard_interactivity: KeyboardInteractivity::Exclusive, - use_last_output: false, + keyboard_interactivity: KeyboardInteractivity::None, + use_last_output: true, }, info: LaLaInfo::Calendar, }); @@ -1042,14 +1045,16 @@ impl MultiApplication for LalaMusicBar { } } LaLaInfo::Calendar => { - let datepicker = date_picker( + return container(date_picker( true, self.date, button(text("Pick date")), Message::Cancel, Message::Submit, - ); - return column![datepicker].into(); + )) + .center_y(Length::Fill) + .center_x(Length::Fill) + .into(); } LaLaInfo::Notify(unitwidgetinfo) => { let btnwidgets: Element = unitwidgetinfo.notify_button(self);