timers work, fix crash when vscode window closes after timeout

This commit is contained in:
2026-02-07 22:54:31 +01:00
parent 6be70a7d93
commit a90d1c2f6c
7 changed files with 72 additions and 11 deletions

View File

@@ -36,10 +36,12 @@ SpotifyNotification::SpotifyNotification(uint64_t notificationId, std::shared_pt
auto artistLabel = Gtk::make_managed<Gtk::Label>();
if (!mpris.artist.empty()) {
artistLabel->set_text(StringHelper::trimToSize(mpris.artist[0], 30));
artistLabel->set_text(mpris.artist[0]);
} else {
artistLabel->set_text("Unknown Artist");
}
artistLabel->set_ellipsize(Pango::EllipsizeMode::END);
artistLabel->set_max_width_chars(30);
artistLabel->set_hexpand(true);
artistLabel->set_halign(Gtk::Align::CENTER);