]> git.mdlowis.com Git - proto/labwc.git/commitdiff
theme: partially revert c79b8ba
authorJohan Malm <jgm323@gmail.com>
Sat, 9 Dec 2023 19:49:23 +0000 (19:49 +0000)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 9 Dec 2023 21:19:23 +0000 (22:19 +0100)
...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.

docs/labwc-theme.5.scd
src/theme.c

index 8a092c0c26035dbc0650cdd73a6088c439bff774..b75ea1161d5498647fa560473f969a092ffcb03a 100644 (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
 
index 1712ee9392df5f441b9ec036460cfbb6ad036a1f..ed5e6a90e031c6cd8f382c69a64fac47db8a13e7 100644 (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 */