generated from PlexSheep/rs-base
Compare commits
No commits in common. "27d135b1c833530f4d2fd37b13ff1d28e77d5049" and "d62fd468ffd04fe2f1e551d42f7e782df42368ea" have entirely different histories.
27d135b1c8
...
d62fd468ff
1 changed files with 5 additions and 10 deletions
15
src/clock.rs
15
src/clock.rs
|
@ -374,12 +374,6 @@ impl Clock {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::cast_sign_loss)]
|
||||
#[allow(clippy::cast_possible_truncation)]
|
||||
let padding = [
|
||||
(f32::from(parts[2].width) * 0.43) as u16,
|
||||
(f32::from(parts[2].width) * 0.25) as u16,
|
||||
];
|
||||
let timebarw = LineGauge::default()
|
||||
.filled_style(if self.did_notify {
|
||||
Style::default()
|
||||
|
@ -393,9 +387,9 @@ impl Clock {
|
|||
})
|
||||
.unfilled_style(Style::default())
|
||||
.block(Block::default().padding(Padding::right(if a.width > 80 {
|
||||
padding[0]
|
||||
(f32::from(parts[2].width) * 0.43) as u16
|
||||
} else {
|
||||
padding[1]
|
||||
(f32::from(parts[2].width) * 0.25) as u16
|
||||
})))
|
||||
.ratio(ratio);
|
||||
Some(timebarw)
|
||||
|
@ -452,6 +446,9 @@ impl Clock {
|
|||
// NOTE: sadly, notify_rust does not (yet) support KDE plasma, because
|
||||
// they have a weird way of making sounds and notifications in general
|
||||
// work. At least we get a little notification.
|
||||
//
|
||||
// TODO: add something to make a sound without the notification system,
|
||||
// as that is not reliable but the user might depend on it.
|
||||
|
||||
// only play this when we don't use built in sound, this
|
||||
// isn't as consistent
|
||||
|
@ -493,8 +490,6 @@ impl Clock {
|
|||
Constraint::Length(if r.width > 80 { 8 } else { 5 }),
|
||||
])
|
||||
.split(r);
|
||||
#[allow(clippy::cast_sign_loss)]
|
||||
#[allow(clippy::cast_possible_truncation)]
|
||||
let hlen_date: u16 = (f32::from(part[1].width) * 0.35) as u16;
|
||||
let subparts = Layout::default()
|
||||
.direction(Direction::Horizontal)
|
||||
|
|
Reference in a new issue