Skip to content

Commit fc2da44

Browse files
Oowoosh0jeremypw
andauthored
Correctly display arists name in NowPlayingView (#804)
Co-authored-by: Jeremy Wootten <[email protected]>
1 parent ec08093 commit fc2da44

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Views/NowPlayingView.vala

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ public class Music.NowPlayingView : Gtk.Box {
2020
};
2121
title_label.add_css_class (Granite.STYLE_CLASS_H3_LABEL);
2222

23-
var artist_label = new Gtk.Label (_("Not playing"));
23+
var artist_label = new Gtk.Label (_("Not playing")) {
24+
ellipsize = Pango.EllipsizeMode.MIDDLE
25+
};
2426

2527
var artist_revealer = new Gtk.Revealer () {
2628
child = artist_label
@@ -119,11 +121,8 @@ public class Music.NowPlayingView : Gtk.Box {
119121
}
120122
});
121123

122-
artist_label.bind_property (
123-
"label", artist_revealer, "reveal-child", BindingFlags.SYNC_CREATE,
124-
(binding, src_val, ref target_val) => {
125-
target_val.set_boolean (src_val.get_string () != null);
126-
}
127-
);
124+
artist_label.notify["label"].connect (() => {
125+
artist_revealer.reveal_child = artist_label.label != "";
126+
});
128127
}
129128
}

0 commit comments

Comments
 (0)