[gedit] panel: add a frame to the title to correctly handle style
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] panel: add a frame to the title to correctly handle style
- Date: Thu, 25 Apr 2013 13:44:49 +0000 (UTC)
commit 96a52df32ec63b045bf2926bf0dd6ad9bf6c0423
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Apr 25 15:43:57 2013 +0200
panel: add a frame to the title to correctly handle style
gedit/gedit-panel.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/gedit/gedit-panel.c b/gedit/gedit-panel.c
index 1a876e7..ad26c6c 100644
--- a/gedit/gedit-panel.c
+++ b/gedit/gedit-panel.c
@@ -548,18 +548,21 @@ static void
build_vertical_panel (GeditPanel *panel)
{
GtkStyleContext *context;
+ GtkWidget *title_frame;
GtkWidget *title_hbox;
GtkWidget *icon_name_hbox;
GtkWidget *dummy_label;
GtkWidget *close_button;
- context = gtk_widget_get_style_context (GTK_WIDGET (panel));
+ /* Create title */
+ title_frame = gtk_frame_new (NULL);
+ context = gtk_widget_get_style_context (GTK_WIDGET (title_frame));
gtk_style_context_add_class (context, "title");
+ gtk_box_pack_start (GTK_BOX (panel->priv->main_box), title_frame,
+ FALSE, FALSE, 0);
- /* Create title hbox */
title_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
- gtk_box_pack_start (GTK_BOX (panel->priv->main_box), title_hbox,
- FALSE, FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (title_frame), title_hbox);
icon_name_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (title_hbox),
@@ -602,7 +605,7 @@ build_vertical_panel (GeditPanel *panel)
FALSE,
0);
- gtk_widget_show_all (title_hbox);
+ gtk_widget_show_all (title_frame);
gtk_box_pack_start (GTK_BOX (panel->priv->main_box),
panel->priv->notebook,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]