SwayNotificationCenter icon indicating copy to clipboard operation
SwayNotificationCenter copied to clipboard

[Feature] add text wrap to notification title & mpris player title

Open zspher opened this issue 4 months ago • 1 comments

Please read through the README and the Man pages before submitting Please also make sure that there isn't any prior issue describing this feature

Thank you for creating this application.

Is your feature request related to a problem? Please describe. Hi, currently updating my config to 0.12. I've noticed that the title of the mpris player does not wrap its text (also the same for the notification title). Because the titles do not wrap and are cropped out, it is sometimes hard to read the currently playing song's title.

Describe the solution you'd like If you have the time, would it be possible to add text wrap to both mpris player title and notification title.

Describe alternatives you've considered I've tried css but I don't think this is possible in gtk

Additional context

Image
  • mpris player using default swaync theme

zspher avatar Jul 30 '25 06:07 zspher

the ff patch adds the text wrap to mpris title & subtitle (tho I'm new to vala and I don't know if this is the right way of implementing this)

diff --git a/data/ui/mpris_player.blp b/data/ui/mpris_player.blp
index 19bf20f..fcad65a 100644
--- a/data/ui/mpris_player.blp
+++ b/data/ui/mpris_player.blp
@@ -43,7 +43,7 @@ template $SwayNotificationCenterWidgetsMprisMprisPlayer: $Underlay {
 
         Label title {
           justify: left;
-          ellipsize: end;
+          wrap: true;
           wrap-mode: word_char;
           xalign: 0;
           yalign: 0;
@@ -55,7 +55,7 @@ template $SwayNotificationCenterWidgetsMprisMprisPlayer: $Underlay {
 
         Label sub_title {
           justify: left;
-          ellipsize: end;
+          wrap: true;
           wrap-mode: word_char;
           xalign: 0;
           yalign: 0;

zspher avatar Jul 30 '25 06:07 zspher