Open tuurep opened 1 week ago
framerender_label
:
self
is an ObFrame
struct, see here:
https://github.com/tuurep/openbox/blob/adb85c538962c15b496b90e79781eb7254c798cf/openbox/frame.h#L82
basically half a character width too far to the right
- How to get the right width with no hardcoded pixel values?
Look into this:
Have to also consider there can be buttons or an app icon on the left side.
Probably best to approach this by first getting the title perfectly centered and then thinking about the truncation as a separate problem.
With
in a theme, the title isn't centered on the whole width of the titlebar, but offset by buttons on the bar, like so:
I found a good lead about how this could maybe be changed:
https://github.com/helloSystem/ISO/issues/145#issuecomment-781527843
Only changing
self->label_width
toself->width
comes close, but is basicallyone characterhalf a character width too far to the right:Adding a sort of arbitrary
self->width - 10
(px?) looks like it's very close:So, looks like it's possible, but a couple issues:
(window title is
downloads
)self->label_width
:self->width
:It does still truncate, as can be seen with a longer title: