Skip to content

Commit

Permalink
Adjusted to 52px-tall valued OSD container, 4px progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkrull authored and ids1024 committed Sep 26, 2024
1 parent 8d370bd commit 570f35f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/osd_indicator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,25 +155,25 @@ impl State {
let osd_contents = if let Some(value) = self.params.value() {
radius = cosmic::theme::active().cosmic().radius_l();
const OSD_WIDTH: f32 = 392.0;
const OSD_HEIGHT: f32 = 64.0;
const FLANK_WIDTH: f32 = 40.0;
const OSD_HEIGHT: f32 = 52.0;
const FLANK_WIDTH: f32 = 36.0;
const SPACING: f32 = 12.0;
const BAR_WIDTH: f32 = OSD_WIDTH - 2.0 * FLANK_WIDTH - 6.0 * SPACING;
const BAR_WIDTH: f32 = OSD_WIDTH - 2.0 * FLANK_WIDTH - 1.15 * OSD_HEIGHT;
cosmic::widget::container(
widget::row![
cosmic::widget::container(icon.size(20))
.width(FLANK_WIDTH)
.align_x(iced::alignment::Horizontal::Center),
cosmic::widget::horizontal_space(SPACING),
cosmic::widget::progress_bar(0. ..=100., value as f32)
.height(8)
.height(4)
.width(BAR_WIDTH),
cosmic::widget::text(format!("{}%", value))
.size(16)
.width(FLANK_WIDTH)
.width(FLANK_WIDTH + SPACING)
.horizontal_alignment(iced::alignment::Horizontal::Right),
]
.align_items(iced::Alignment::Center)
.spacing(SPACING),
.align_items(iced::Alignment::Center),
)
.width(OSD_WIDTH)
.height(OSD_HEIGHT)
Expand Down

0 comments on commit 570f35f

Please sign in to comment.