mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 02:31:04 +02:00
feat: enable use of markup in clock module format and format_popup, and update documentation to reflect supporting Pango markup in both
This commit is contained in:
parent
d981265dac
commit
f4384b6252
2 changed files with 11 additions and 6 deletions
|
@ -99,8 +99,10 @@ impl Module<Button> for ClockModule {
|
|||
info: &ModuleInfo,
|
||||
) -> Result<ModuleParts<Button>> {
|
||||
let button = Button::new();
|
||||
let label = Label::new(None);
|
||||
label.set_angle(info.bar_position.get_angle());
|
||||
let label = Label::builder()
|
||||
.angle(info.bar_position.get_angle())
|
||||
.use_markup(true)
|
||||
.build();
|
||||
button.add(&label);
|
||||
|
||||
let tx = context.tx.clone();
|
||||
|
@ -132,7 +134,10 @@ impl Module<Button> for ClockModule {
|
|||
) -> Option<gtk::Box> {
|
||||
let container = gtk::Box::new(Orientation::Vertical, 0);
|
||||
|
||||
let clock = Label::builder().halign(Align::Center).build();
|
||||
let clock = Label::builder()
|
||||
.halign(Align::Center)
|
||||
.use_markup(true)
|
||||
.build();
|
||||
clock.add_class("calendar-clock");
|
||||
|
||||
container.add(&clock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue