- if (!read_appearance(db, inst,
- "window.active.button.disabled.bg",
- theme->a_disabled_focused_max,
- TRUE))
- set_default_appearance(theme->a_disabled_focused_max);
- if (!read_appearance(db, inst,
- "window.inactive.button.disabled.bg",
- theme->a_disabled_unfocused_max,
- TRUE))
- set_default_appearance(theme->a_disabled_unfocused_max);
- if (!read_appearance(db, inst,
- "window.active.button.pressed.bg",
- theme->a_focused_pressed_max,
- TRUE))
- set_default_appearance(theme->a_focused_pressed_max);
- if (!read_appearance(db, inst,
- "window.inactive.button.pressed.bg",
- theme->a_unfocused_pressed_max,
- TRUE))
- set_default_appearance(theme->a_unfocused_pressed_max);
- if (!read_appearance(db, inst,
- "window.active.button.toggled.unpressed.bg",
- theme->a_toggled_focused_unpressed_max,
- TRUE) &&
- !read_appearance(db, inst,
- "window.active.button.toggled.bg",
- theme->a_toggled_focused_unpressed_max,
- TRUE))
- {
- RrAppearanceFree(theme->a_toggled_focused_unpressed_max);
- theme->a_toggled_focused_unpressed_max =
- RrAppearanceCopy(theme->a_focused_pressed_max);
- }
- if (!read_appearance(db, inst,
- "window.inactive.button.toggled.unpressed.bg",
- theme->a_toggled_unfocused_unpressed_max,
- TRUE) &&
- !read_appearance(db, inst,
- "window.inactive.button.toggled.bg",
- theme->a_toggled_unfocused_unpressed_max,
- TRUE))
- {
- RrAppearanceFree(theme->a_toggled_unfocused_unpressed_max);
- theme->a_toggled_unfocused_unpressed_max =
- RrAppearanceCopy(theme->a_unfocused_pressed_max);
- }
- if (!read_appearance(db, inst,
- "window.active.button.toggled.hover.bg",
- theme->a_toggled_hover_focused_max,
- TRUE))
- {
- RrAppearanceFree(theme->a_toggled_hover_focused_max);
- theme->a_toggled_hover_focused_max =
- RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
- }
- if (!read_appearance(db, inst,
- "window.inactive.button.toggled.hover.bg",
- theme->a_toggled_hover_unfocused_max,
- TRUE))
- {
- RrAppearanceFree(theme->a_toggled_hover_unfocused_max);
- theme->a_toggled_hover_unfocused_max =
- RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
- }
- if (!read_appearance(db, inst,
- "window.active.button.toggled.pressed.bg",
- theme->a_toggled_focused_pressed_max,
- TRUE))
- {
- RrAppearanceFree(theme->a_toggled_focused_pressed_max);
- theme->a_toggled_focused_pressed_max =
- RrAppearanceCopy(theme->a_focused_pressed_max);
- }
- if (!read_appearance(db, inst,
- "window.inactive.button.toggled.pressed.bg",
- theme->a_toggled_unfocused_pressed_max,
- TRUE))
- {
- RrAppearanceFree(theme->a_toggled_unfocused_pressed_max);
- theme->a_toggled_unfocused_pressed_max =
- RrAppearanceCopy(theme->a_unfocused_pressed_max);
- }
- if (!read_appearance(db, inst,
- "window.active.button.unpressed.bg",
- theme->a_focused_unpressed_max,
- TRUE))
- set_default_appearance(theme->a_focused_unpressed_max);
- if (!read_appearance(db, inst,
- "window.inactive.button.unpressed.bg",
- theme->a_unfocused_unpressed_max,
- TRUE))
- set_default_appearance(theme->a_unfocused_unpressed_max);
- if (!read_appearance(db, inst,
- "window.active.button.hover.bg",
- theme->a_hover_focused_max,
- TRUE))
- {
- RrAppearanceFree(theme->a_hover_focused_max);
- theme->a_hover_focused_max =
- RrAppearanceCopy(theme->a_focused_unpressed_max);
- }
- if (!read_appearance(db, inst,
- "window.inactive.button.hover.bg",
- theme->a_hover_unfocused_max,
- TRUE))
- {
- RrAppearanceFree(theme->a_hover_unfocused_max);
- theme->a_hover_unfocused_max =
- RrAppearanceCopy(theme->a_unfocused_unpressed_max);
- }
-
+ READ_APPEARANCE("window.active.button.disabled.bg",
+ theme->a_disabled_focused_max, TRUE);
+ READ_APPEARANCE("window.inactive.button.disabled.bg",
+ theme->a_disabled_unfocused_max, TRUE);
+ READ_APPEARANCE("window.active.button.pressed.bg",
+ theme->a_focused_pressed_max, TRUE);
+ READ_APPEARANCE("window.inactive.button.pressed.bg",
+ theme->a_unfocused_pressed_max, TRUE);
+
+ READ_APPEARANCE_("window.active.button.toggled.unpressed.bg",
+ "window.active.button.toggled.bg",
+ theme->a_toggled_focused_unpressed_max, TRUE,
+ theme->a_focused_pressed_max);
+ READ_APPEARANCE_("window.inactive.button.toggled.unpressed.bg",
+ "window.inactive.button.toggled.bg",
+ theme->a_toggled_unfocused_unpressed_max, TRUE,
+ theme->a_unfocused_pressed_max);
+
+ READ_APPEARANCE_COPY("window.active.button.toggled.hover.bg",
+ theme->a_toggled_hover_focused_max, TRUE,
+ theme->a_toggled_focused_unpressed_max);
+ READ_APPEARANCE_COPY("window.inactive.button.toggled.hover.bg",
+ theme->a_toggled_hover_unfocused_max, TRUE,
+ theme->a_toggled_unfocused_unpressed_max);
+
+ READ_APPEARANCE_COPY("window.active.button.toggled.pressed.bg",
+ theme->a_toggled_focused_pressed_max, TRUE,
+ theme->a_focused_pressed_max);
+ READ_APPEARANCE_COPY("window.inactive.button.toggled.pressed.bg",
+ theme->a_toggled_unfocused_pressed_max, TRUE,
+ theme->a_unfocused_pressed_max);
+
+ READ_APPEARANCE("window.active.button.unpressed.bg",
+ theme->a_focused_unpressed_max, TRUE);
+ READ_APPEARANCE("window.inactive.button.unpressed.bg",
+ theme->a_unfocused_unpressed_max, TRUE);
+
+ READ_APPEARANCE_COPY("window.active.button.hover.bg",
+ theme->a_hover_focused_max, TRUE,
+ theme->a_focused_unpressed_max);
+ READ_APPEARANCE_COPY("window.inactive.button.hover.bg",
+ theme->a_hover_unfocused_max, TRUE,
+ theme->a_unfocused_unpressed_max);
+