diff options
-rw-r--r-- | src/tab.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -161,15 +161,19 @@ mq_tab_populate_tab(MqTab *tab) GtkWidget *box; tab->title = "New tab"; + + /* Set up tab image. */ tab->tab_image = gtk_image_new_from_icon_name("text-x-generic", GTK_ICON_SIZE_BUTTON); + /* Set up tab label. */ tab->tab_label = gtk_label_new(NULL); gtk_label_set_ellipsize(GTK_LABEL(tab->tab_label), PANGO_ELLIPSIZE_END); gtk_widget_set_hexpand(tab->tab_label, TRUE); gtk_widget_set_size_request(tab->tab_label, 50, 1); + /* Pack tab box. */ box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start(GTK_BOX(box), tab->tab_image, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(box), tab->tab_label, TRUE, TRUE, 0); @@ -177,6 +181,7 @@ mq_tab_populate_tab(MqTab *tab) "window-close", GTK_ICON_SIZE_BUTTON), FALSE, FALSE, 0); gtk_widget_show_all(box); + /* Set up event box. */ tab->tab = gtk_event_box_new(); g_signal_connect(tab->tab, "button-press-event", G_CALLBACK(tab_label_button_press_cb), tab); |