[gtk+/wip/matthiasc/tab-strip] Always show close buttons
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/tab-strip] Always show close buttons
- Date: Tue, 14 Jun 2016 12:01:44 +0000 (UTC)
commit e7b0a47856aa94a3c5f2982c17872b5cb7929fb4
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 14 08:00:26 2016 -0400
Always show close buttons
The resizing is too distracting otherwise, and reserving space
would be unnecessarily complicated.
gtk/gtkclosabletab.c | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
---
diff --git a/gtk/gtkclosabletab.c b/gtk/gtkclosabletab.c
index 2dac42f..42a5206 100644
--- a/gtk/gtkclosabletab.c
+++ b/gtk/gtkclosabletab.c
@@ -72,6 +72,7 @@ gtk_closable_tab_init (GtkClosableTab *self)
g_object_bind_property (self, "title", self->label, "label", G_BINDING_DEFAULT);
self->button = gtk_button_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_MENU);
+ gtk_widget_show (self->button);
gtk_button_set_relief (GTK_BUTTON (self->button), GTK_RELIEF_NONE);
gtk_box_pack_end (GTK_BOX (self->box), self->button, FALSE, FALSE, 0);
@@ -79,22 +80,6 @@ gtk_closable_tab_init (GtkClosableTab *self)
}
static void
-gtk_closable_tab_state_flags_changed (GtkWidget *widget,
- GtkStateFlags old_state)
-{
- GtkClosableTab *tab = GTK_CLOSABLE_TAB (widget);
- gboolean checked;
-
- checked = (gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_CHECKED) != 0;
-
- gtk_widget_set_visible (tab->button, checked);
-}
-
-static void
gtk_closable_tab_class_init (GtkClosableTabClass *klass)
{
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
- widget_class->state_flags_changed = gtk_closable_tab_state_flags_changed;
}
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]