summaryrefslogtreecommitdiff
path: root/charpick/charpick.c
diff options
context:
space:
mode:
Diffstat (limited to 'charpick/charpick.c')
-rw-r--r--charpick/charpick.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/charpick/charpick.c b/charpick/charpick.c
index b99e9d07..572064f0 100644
--- a/charpick/charpick.c
+++ b/charpick/charpick.c
@@ -382,6 +382,29 @@ chooser_button_clicked (GtkButton *button, charpick_data *curr_data)
static inline void force_no_focus_padding (GtkWidget *widget)
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gboolean first_time = TRUE;
+ GtkCssProvider *provider;
+
+ if (first_time) {
+ provider = gtk_css_provider_new ();
+
+ gtk_css_provider_load_from_data (provider,
+ "#charpick-applet-button {\n"
+ "-GtkWidget-focus-line-width: 0px;\n"
+ "-GtkWidget-focus-padding: 0px;\n"
+ "}",
+ -1,
+ NULL);
+ gtk_style_context_add_provider (gtk_widget_get_style_context (widget),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+
+ g_object_unref (provider);
+
+ first_time = FALSE;
+ }
+#else
gboolean first_time=TRUE;
if (first_time) {
@@ -396,6 +419,7 @@ static inline void force_no_focus_padding (GtkWidget *widget)
"\n");
first_time = FALSE;
}
+#endif
gtk_widget_set_name (widget, "charpick-applet-button");
}