mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 14:51:04 +02:00
parent
56153f189a
commit
b2db7b0bb5
10 changed files with 51 additions and 30 deletions
|
@ -2,13 +2,13 @@ use gtk::prelude::*;
|
|||
use gtk::{Button, Label, Orientation};
|
||||
use serde::Deserialize;
|
||||
|
||||
use super::{CustomWidget, CustomWidgetContext, ExecEvent, WidgetConfig};
|
||||
use crate::config::ModuleOrientation;
|
||||
use crate::dynamic_value::dynamic_string;
|
||||
use crate::gtk_helpers::IronbarLabelExt;
|
||||
use crate::modules::PopupButton;
|
||||
use crate::{build, try_send};
|
||||
|
||||
use super::{CustomWidget, CustomWidgetContext, ExecEvent, WidgetConfig};
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
|
||||
pub struct ButtonWidget {
|
||||
|
@ -75,7 +75,7 @@ impl CustomWidget for ButtonWidget {
|
|||
button.add(&label);
|
||||
|
||||
dynamic_string(&text, move |string| {
|
||||
label.set_markup(&string);
|
||||
label.set_label_escaped(&string);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue