1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-17 14:51:04 +02:00

refactor: move label truncate function to ext trait

 Conflicts:
	src/gtk_helpers.rs
	src/modules/music/mod.rs
This commit is contained in:
Jake Stanger 2024-06-28 23:27:52 +01:00
parent cc6f21ed68
commit 8b05ed526d
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
8 changed files with 44 additions and 35 deletions

View file

@ -1,6 +1,7 @@
use crate::clients::clipboard::{self, ClipboardEvent};
use crate::clients::wayland::{ClipboardItem, ClipboardValue};
use crate::config::{CommonConfig, TruncateMode};
use crate::gtk_helpers::IronbarLabelExt;
use crate::image::new_icon_button;
use crate::modules::{
Module, ModuleInfo, ModuleParts, ModulePopup, ModuleUpdateEvent, PopupButton, WidgetContext,
@ -195,7 +196,7 @@ impl Module<Button> for ClipboardModule {
button.add(&label);
if let Some(truncate) = self.truncate {
truncate.truncate_label(&label);
label.truncate(truncate);
}
button.style_context().add_class("text");