bar: fix being too tall when vertical
This commit is contained in:
parent
58d26dcf60
commit
7bf8cd4cf0
2 changed files with 2 additions and 2 deletions
|
|
@ -151,7 +151,7 @@ const MediaPlaying = () => {
|
||||||
angle={config.vertical ? 270 : 0}
|
angle={config.vertical ? 270 : 0}
|
||||||
setup={self =>
|
setup={self =>
|
||||||
players.hookLastPlayer(self, ["notify::title", "notify::artist"], () => {
|
players.hookLastPlayer(self, ["notify::title", "notify::artist"], () => {
|
||||||
self.label = ellipsize(getLabel("No media")); // TODO: scroll text
|
self.label = ellipsize(getLabel("No media"), config.vertical ? 30 : 40); // TODO: scroll text
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
export const ellipsize = (str: string, len = 40) => (str.length > len ? `${str.slice(0, len - 1)}…` : str);
|
export const ellipsize = (str: string, len: number) => (str.length > len ? `${str.slice(0, len - 1)}…` : str);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue