提交 3ef2b136 编写于 作者: P pbansal

8214253: Tooltip is transparent rather than having a black background

Reviewed-by: serb, psadhukhan
上级 8fc0e69f
......@@ -1773,13 +1773,9 @@ static void gtk3_paint_flat_box(WidgetType widget_type, GtkStateType state_type,
(widget_type == CHECK_BOX || widget_type == RADIO_BUTTON)) {
return;
}
gtk3_widget = gtk3_get_widget(widget_type);
GtkStyleContext* context = fp_gtk_widget_get_style_context (gtk3_widget);
fp_gtk_style_context_save (context);
if (detail != 0) {
transform_detail_string(detail, context);
GtkStyleContext* context = get_style(widget_type, detail);
if (widget_type == TOOL_TIP) {
fp_gtk_style_context_add_class(context, "background");
}
GtkStateFlags flags = get_gtk_flags(state_type);
......@@ -1796,7 +1792,7 @@ static void gtk3_paint_flat_box(WidgetType widget_type, GtkStateType state_type,
fp_gtk_render_background (context, cr, x, y, width, height);
fp_gtk_style_context_restore (context);
disposeOrRestoreContext(context);
}
static void gtk3_paint_focus(WidgetType widget_type, GtkStateType state_type,
......@@ -2361,12 +2357,12 @@ static gint gtk3_get_color_for_state(JNIEnv *env, WidgetType widget_type,
widget_type = TEXT_AREA;
}
gtk3_widget = gtk3_get_widget(widget_type);
GtkStyleContext* context = fp_gtk_widget_get_style_context(gtk3_widget);
GtkStyleContext* context = NULL;
if (widget_type == TOOL_TIP) {
fp_gtk_style_context_add_class(context, "tooltip");
context = get_style(widget_type, "tooltip");
} else {
gtk3_widget = gtk3_get_widget(widget_type);
context = fp_gtk_widget_get_style_context(gtk3_widget);
}
if (widget_type == CHECK_BOX_MENU_ITEM
|| widget_type == RADIO_BUTTON_MENU_ITEM) {
......@@ -2384,7 +2380,9 @@ static gint gtk3_get_color_for_state(JNIEnv *env, WidgetType widget_type,
result = recode_color(color.alpha) << 24 | recode_color(color.red) << 16 |
recode_color(color.green) << 8 | recode_color(color.blue);
if (widget_type == TOOL_TIP) {
disposeOrRestoreContext(context);
}
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册