Skip to content

Commit

Permalink
fix: centerize track name
Browse files Browse the repository at this point in the history
closes: #125
  • Loading branch information
Rirusha committed Jul 25, 2024
1 parent d745730 commit 8f571b6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/widgets/track-info-panel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public class Cassette.TrackInfoPanel : Adw.Bin, Gtk.Orientable {

play_mark_track.init_content (value.id);
}

update_labels_visibility ();
}
}

Expand Down Expand Up @@ -211,19 +213,16 @@ public class Cassette.TrackInfoPanel : Adw.Bin, Gtk.Orientable {
}

construct {
track_version_label.notify["label"].connect (() => {
track_version_label.visible = track_version_label.label != "";
});

track_authors_label.notify["label"].connect (() => {
track_authors_label.visible = track_authors_label.label != "";
});

notify["position"].connect (() => {
position_label.label = position.to_string ();
});
}

void update_labels_visibility () {
track_version_label.visible = track_version_label.label != "";
track_authors_label.visible = track_authors_label.label != "";
}

public PlayMarkTrack get_play_mark_track () {
return play_mark_track;
}
Expand Down

0 comments on commit 8f571b6

Please sign in to comment.