theme: partially revert c79b8ba

...so that svg and png icons only support the max_toggled_hover format.

There is no need to support max_hover_toggled because there are no
backward compatibility considerations as Openbox does not handle png and
svg icons.
This commit is contained in:
Johan Malm 2023-12-09 19:49:23 +00:00 committed by Consolatis
parent 393f8fadab
commit 5cc6a5b3e1
2 changed files with 2 additions and 17 deletions

View file

@ -212,7 +212,8 @@ One advantage of xbm buttons over other formats is that they change color based
on the theme. Other formats use the suffices "-active" and "-inactive" to align
with the respective titlebar colors. For example: "close-active.png"
For compatibility reasons, the following alternative names are supported:
For compatibility reasons, the following alternative names are supported
for xbm files:
- max_hover_toggled.xbm for max_toggled_hover.xbm

View file

@ -173,16 +173,8 @@ load_buttons(struct theme *theme)
/* Try png icon first */
snprintf(filename, sizeof(filename), "%s-active.png", b->name);
button_png_load(filename, b->active.buffer);
if (!*b->active.buffer && b->alt_name) {
snprintf(filename, sizeof(filename), "%s-active.png", b->alt_name);
button_png_load(filename, b->active.buffer);
}
snprintf(filename, sizeof(filename), "%s-inactive.png", b->name);
button_png_load(filename, b->inactive.buffer);
if (!*b->inactive.buffer && b->alt_name) {
snprintf(filename, sizeof(filename), "%s-inactive.png", b->alt_name);
button_png_load(filename, b->inactive.buffer);
}
#if HAVE_RSVG
/* Then try svg icon */
@ -191,18 +183,10 @@ load_buttons(struct theme *theme)
snprintf(filename, sizeof(filename), "%s-active.svg", b->name);
button_svg_load(filename, b->active.buffer, size);
}
if (!*b->active.buffer && b->alt_name) {
snprintf(filename, sizeof(filename), "%s-active.svg", b->alt_name);
button_svg_load(filename, b->active.buffer, size);
}
if (!*b->inactive.buffer) {
snprintf(filename, sizeof(filename), "%s-inactive.svg", b->name);
button_svg_load(filename, b->inactive.buffer, size);
}
if (!*b->active.buffer && b->alt_name) {
snprintf(filename, sizeof(filename), "%s-inactive.svg", b->alt_name);
button_svg_load(filename, b->inactive.buffer, size);
}
#endif
/* If there were no png/svg buttons, use xbm */