You are not logged in.
So, I'm trying to create a theme for xfce4-notifyd that restricts the size of the contents of any given notification. I'm using text-overflow: ellipsis in an attempt to achieve this, but it seems to break the whole theme down, and it just takes whichever theme I had selected previously. This is the best I've been able to make so far:
#XfceNotifyWindow label#body {
color: #ffffff;
white-space: normal;
max-width: 240ch;
overflow: hidden;
text-overflow: ellipsis;
}
Am I missing something? Is this program not compatible with these properties? Is there something in the program specifically meant to prevent using this type of stuff?
Sorry if the question seems basic, I'm new here.
Offline
Hello and welcome.
I don't believe gtk3 supports those style properties (see: https://gitlab.gnome.org/GNOME/gtk/-/bl … mpl.c#L820
You might be able to get access to max-width-chars or width-chars using something like:
-GtkLabel-max-width-chars: 50
...but you will need to test that to confirm.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Hi ToZ,
Those sources do explain a lot. The good news is that the code you sent didn't break anything. The bad news is that it's still not working.
HOWEVER, I looked a bit more through your sources and found this function, and this example. It looks like gtk just has a different way of achieving the same thing. Here's my code so far. Any ideas?
#XfceNotifyWindow label#body {
color: #ffffff;
-GtkLabel-max-width-chars: 10ch;
-GtkLabel-ellipsize: PANGO_ELLIPSIZE_END;
}
EDIT: I'm seeing that these functions are actually being used in the source code: https://gitlab.xfce.org/apps/xfce4-noti … dow.c#L277
I don't know much about CSS, but it looks to me like I'm just doing something wrong with it...
Last edited by ovc89 (2021-02-03 04:45:00)
Offline
Correct, they are functions within the code. Sometimes, simple properties like "max-width-chars" might work if they are exposed (I'm not sure). However, if during testing they aren't then you can't use them.
To really accomplish what you are trying to do, you will need to create the functionality in the code of xfce4-notifyd using the GTK code.
As an option/alternative, you might consider using another notification daemon, like dunst. On quick review, it appears it may be able to support what you are trying to do.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 534.86 KiB (Peak: 535.7 KiB) ]