Use monospace font for times
This commit is contained in:
parent
06192e553b
commit
a85f4f6538
1 changed files with 11 additions and 7 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
app::{Command, Core, Settings},
|
app::{Command, Core, Settings},
|
||||||
cosmic_config::{self, CosmicConfigEntry},
|
cosmic_config::{self, CosmicConfigEntry},
|
||||||
cosmic_theme, executor,
|
cosmic_theme, executor, font,
|
||||||
iced::{
|
iced::{
|
||||||
event::{self, Event},
|
event::{self, Event},
|
||||||
keyboard::{Event as KeyEvent, Key, Modifiers},
|
keyboard::{Event as KeyEvent, Key, Modifiers},
|
||||||
|
|
@ -343,9 +343,10 @@ impl Application for App {
|
||||||
})
|
})
|
||||||
.on_press(Message::TogglePause),
|
.on_press(Message::TogglePause),
|
||||||
)
|
)
|
||||||
.push(widget::text(format_time(Duration::from_secs_f64(
|
.push(
|
||||||
self.position,
|
widget::text(format_time(Duration::from_secs_f64(self.position)))
|
||||||
))))
|
.font(font::mono()),
|
||||||
|
)
|
||||||
.push(
|
.push(
|
||||||
Slider::new(
|
Slider::new(
|
||||||
0.0..=self.video.duration().as_secs_f64(),
|
0.0..=self.video.duration().as_secs_f64(),
|
||||||
|
|
@ -355,9 +356,12 @@ impl Application for App {
|
||||||
.step(0.1)
|
.step(0.1)
|
||||||
.on_release(Message::SeekRelease),
|
.on_release(Message::SeekRelease),
|
||||||
)
|
)
|
||||||
.push(widget::text(format_time(
|
.push(
|
||||||
self.video.duration() - Duration::from_secs_f64(self.position),
|
widget::text(format_time(
|
||||||
))),
|
self.video.duration() - Duration::from_secs_f64(self.position),
|
||||||
|
))
|
||||||
|
.font(font::mono()),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.style(theme::Container::WindowBackground)
|
.style(theme::Container::WindowBackground)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue