mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 06:15:21 +01:00
[GH-ISSUE #1011] Truncate (or rotate) player metadata in volume and music popups #3120
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#3120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @postsolar on GitHub (May 26, 2025).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1011
Is your feature request related to a problem? Please describe.
It often gets ridiculously long. This one is more than half my monitor width.
I'd like it to have a consistent width.
Describe the solution you'd like
Ideally:
Describe alternatives you've considered
Additional context
@JakeStanger commented on GitHub (May 26, 2025):
Yeah makes sense. Reckon this can be done by copying the existing
truncateandlayoutoptions for the header. Not sure what I'd call the options off the top of my head...@postsolar commented on GitHub (May 26, 2025):
To be clear by rotation I mean continuously showing a shifted slice of a string, e.g.
And so on.
@JakeStanger commented on GitHub (May 26, 2025):
Ah okay. There's no mechanism for that currently but should be easy enough to build in theory, with an interval loop and some string manipulation.
The gotcha there is that GTK doesn't support that (as far as I know, happy to be proved wrong), so it would need to go through its own truncate system, which I guess would have to be based on a maximum character limit.
@postsolar commented on GitHub (May 26, 2025):
It did sound easy until I started thinking about how exactly to move between frames. I mean it shouldn't just redraw the string every, say, 0.3 seconds, it should be smooth. Is there something like pixel-perfect placement of text that would also be safe from user's CSS intervention? 😄
It seems that GTK2 has exactly this, but for now I'm struggling to find a GTK3 equivalent.
Another idea I have is a horizontal scrollbox that would be sent scroll events in a loop.
@JakeStanger commented on GitHub (May 26, 2025):
We could render to a Cairo surface and translate the image but that might get nasty.
@postsolar commented on GitHub (May 27, 2025):
Still investigating this, but from what I gathered so far:
GtkViewportandgtk_widget_add_tick_callback(): discussion on Gnome discoursetransformprop), but Gtk4 seems to be more promising. In this case some sort of a sane default like truncation or line wrapping would still be good for better UX though, not everyone would want or would figure out CSS animations.@postsolar commented on GitHub (May 27, 2025):
So I tested it with Gtk4 but it has a number of issues:
transform: translateX(-100%)Probably not the way to go.