* @hex: hex string to be parsed
* @rgba: pointer to float[4] for return value
*/
-void
+static void
parse_hexstr(const char *hex, float *rgba)
{
if (!hex || hex[0] != '#' || strlen(hex) < 7) {
*
* theme_builtin() applies a theme very similar to Clearlooks-3.4
*/
-void theme_builtin(struct theme *theme)
+static void
+theme_builtin(struct theme *theme)
{
theme->border_width = 1;
theme->padding_height = 3;
return (bool)g_pattern_match_simple(pattern, string);
}
-static void entry(struct theme *theme, const char *key, const char *value)
+static void
+entry(struct theme *theme, const char *key, const char *value)
{
if (!key || !value) {
return;
info("cannot find theme (%s), using built-in",
theme_name);
}
- theme_builtin(theme);
return;
}
info("read themerc (%s)", themerc);
} corner;
};
-static void set_source(cairo_t *cairo, float *c)
+static void
+set_source(cairo_t *cairo, float *c)
{
cairo_set_source_rgba(cairo, c[0], c[1], c[2], c[3]);
}
theme_init(struct theme *theme, struct wlr_renderer *renderer,
const char *theme_name)
{
+ /*
+ * Set some default values. This is particularly important on
+ * reconfigure as not all themes set all options
+ */
+ theme_builtin(theme);
+
theme_read(theme, theme_name);
post_processing(theme);
create_corners(theme, renderer);