bar text: truncate instead of having horiz scroll (#320)

This commit is contained in:
end-4
2024-03-10 23:05:41 +07:00
parent 3f05d77664
commit 0b979d9903
2 changed files with 15 additions and 11 deletions
+11 -11
View File
@@ -133,18 +133,18 @@ export default () => {
]
})]
});
const trackTitle = Scrollable({
const trackTitle = Label({
hexpand: true,
child: Label({
className: 'txt-smallie txt-onSurfaceVariant',
setup: (self) => self.hook(Mpris, label => {
const mpris = Mpris.getPlayer('');
if (mpris)
label.label = `${trimTrackTitle(mpris.trackTitle)}${mpris.trackArtists.join(', ')}`;
else
label.label = 'No media';
}),
})
className: 'txt-smallie txt-onSurfaceVariant',
truncate: 'end',
maxWidthChars: 10, // Doesn't matter, just needs to be non negative
setup: (self) => self.hook(Mpris, label => {
const mpris = Mpris.getPlayer('');
if (mpris)
label.label = `${trimTrackTitle(mpris.trackTitle)}${mpris.trackArtists.join(', ')}`;
else
label.label = 'No media';
}),
})
const musicStuff = Box({
className: 'spacing-h-10',