Skip to content

Commit

Permalink
chore: fix ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Nov 17, 2024
1 parent 1bd14ac commit 52ef3d7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lala_bar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
23 changes: 14 additions & 9 deletions lala_bar/src/music_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
});
Expand Down Expand Up @@ -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<Message> = unitwidgetinfo.notify_button(self);
Expand Down

0 comments on commit 52ef3d7

Please sign in to comment.