I'm trying to create themes for a program for GNOME that uses GtkLabel in a widget. I see that GTK Label already has a function for constraining the maximum length of a label, similar to the standard CSS text-overflow: ellipsis. GTK uses _ellipsize and max-width-chars.
text-overflow: ellipsis
However, I need to access these properties EXCLUSIVELY from my gtk.css, without changing the source code of the program. I don't even need to use these properties directly, I just want to take advantage of the fact that GTK already has that capability. If there's an indirect way of using them (i.e.: using Pango attributes somehow...), it works.
Here's the source of the program I'm using: https://gitlab.xfce.org/apps/xfce4-notifyd/-/blob/master/xfce4-notifyd/xfce-notify-daemon.c
The part of the GTK code I believe to be relevant: https://code.woboq.org/gtk/gtk/gtk/gtklabel.c.html
I've only been able to find documentation about how to implement Ellipsize in HTML, python, etc. I haven't found a way to use it from CSS.
Is it possible to do this, or should I just try a different program?
2.1m questions
2.1m answers
60 comments
57.0k users