#define HINT_CLASS "__hint"
#define HINT_CONTAINER_STYLE "line-height:1em;"
-#define HINT_STYLE "z-index:100000;"\
- "position:absolute;"\
- "font-family:monospace;"\
- "font-size:10px;"\
- "font-weight:bold;"\
- "color:#000;"\
- "background-color:#fff;"\
- "margin:0;"\
- "padding:0px 1px;"\
- "border:1px solid #444;"\
- "opacity:0.7;"\
- "left:%lipx;top:%lipx;"
+#define HINT_STYLE "z-index:100000;position:absolute;left:%lipx;top:%lipx;%s"
typedef struct {
gulong num;
gulong left = rect.left - 3;
gulong top = rect.top - 3;
- dom_element_set_style(hint, HINT_STYLE, left, top);
+ dom_element_set_style(hint, HINT_STYLE, left, top, vp.style.hint_style);
gchar* num = g_strdup_printf("%li", newHint->num);
webkit_dom_html_element_set_inner_text(WEBKIT_DOM_HTML_ELEMENT(hint), num, NULL);
/* initialize the keybindings */
keybind_init();
- /* initialize settings */
- setting_init();
-
/* initialize the hints */
hints_init();
+ /* initialize settings */
+ setting_init();
+
vp_read_config();
}
gchar hint_bg[HEX_COLOR_LEN];
gchar hint_bg_focus[HEX_COLOR_LEN];
gchar hint_fg[HEX_COLOR_LEN];
+ gchar* hint_style;
} Style;
typedef struct {
{NULL, "hint-bg", TYPE_CHAR, setting_hint_style, {.s = "#ff0"}},
{NULL, "hint-bg-focus", TYPE_CHAR, setting_hint_style, {.s = "#8f0"}},
{NULL, "hint-fg", TYPE_CHAR, setting_hint_style, {.s = "#000"}},
+ {NULL, "hint-style", TYPE_CHAR, setting_hint_style, {.s = "font-family:monospace;font-weight:bold;color:#000;background-color:#fff;margin:0;padding:0px 1px;border:1px solid #444;opacity:0.7;"}},
};
} else if (!g_strcmp0(s->name, "hint-fg")) {
strncpy(style->hint_fg, s->arg.s, HEX_COLOR_LEN - 1);
style->hint_fg[HEX_COLOR_LEN - 1] = '\0';
+ } else if (!g_strcmp0(s->name, "hint-style")) {
+ if (style->hint_style) {
+ g_free(style->hint_style);
+ style->hint_style = NULL;
+ }
+ style->hint_style = g_strdup(s->arg.s);
}
return TRUE;