xed-statusbar: Clean up the styling a bit

Make sure the statusbar expands the full width of the window. Do a better job
of lining up buttons in the search and status bar as well.
This commit is contained in:
JosephMcc 2016-12-28 12:26:17 -08:00
parent 9c9e564ec1
commit 94188504ab
3 changed files with 13 additions and 4 deletions

View File

@ -153,7 +153,7 @@ xed_status_combo_box_class_init (XedStatusComboBoxClass *klass)
"-GtkButton-inner-border: 0;\n" "-GtkButton-inner-border: 0;\n"
"-GtkWidget-focus-line-width : 0;\n" "-GtkWidget-focus-line-width : 0;\n"
"-GtkWidget-focus-padding : 0;\n" "-GtkWidget-focus-padding : 0;\n"
"padding: 0;\n" "padding: 2px;\n"
"}"; "}";
object_class->finalize = xed_status_combo_box_finalize; object_class->finalize = xed_status_combo_box_finalize;

View File

@ -120,6 +120,7 @@ xed_statusbar_init (XedStatusbar *statusbar)
gtk_box_pack_end (GTK_BOX (statusbar), gtk_box_pack_end (GTK_BOX (statusbar),
statusbar->priv->overwrite_mode_label, statusbar->priv->overwrite_mode_label,
FALSE, TRUE, 0); FALSE, TRUE, 0);
gtk_widget_set_margin_right (GTK_WIDGET (statusbar->priv->overwrite_mode_label), 6);
statusbar->priv->cursor_position_label = gtk_label_new (NULL); statusbar->priv->cursor_position_label = gtk_label_new (NULL);
gtk_label_set_width_chars (GTK_LABEL (statusbar->priv->cursor_position_label), gtk_label_set_width_chars (GTK_LABEL (statusbar->priv->cursor_position_label),

View File

@ -1633,11 +1633,16 @@ create_statusbar (XedWindow *window,
window->priv->tip_message_cid = gtk_statusbar_get_context_id (GTK_STATUSBAR (window->priv->statusbar), window->priv->tip_message_cid = gtk_statusbar_get_context_id (GTK_STATUSBAR (window->priv->statusbar),
"tip_message"); "tip_message");
gtk_box_pack_end (GTK_BOX(main_box), window->priv->statusbar, FALSE, TRUE, 0); gtk_box_pack_end (GTK_BOX( main_box), window->priv->statusbar, FALSE, TRUE, 0);
gtk_widget_set_margin_left (GTK_WIDGET (window->priv->statusbar), 0);
gtk_widget_set_margin_right (GTK_WIDGET (window->priv->statusbar), 0);
window->priv->tab_width_combo = xed_status_combo_box_new (_("Tab Width")); window->priv->tab_width_combo = xed_status_combo_box_new (_("Tab Width"));
gtk_widget_show (window->priv->tab_width_combo); gtk_widget_show (window->priv->tab_width_combo);
gtk_box_pack_end (GTK_BOX(window->priv->statusbar), window->priv->tab_width_combo, FALSE, TRUE, 0); gtk_box_pack_end (GTK_BOX (window->priv->statusbar), window->priv->tab_width_combo, FALSE, FALSE, 0);
gtk_widget_set_margin_bottom (GTK_WIDGET (window->priv->tab_width_combo), 2);
gtk_widget_set_margin_top (GTK_WIDGET (window->priv->tab_width_combo), 2);
fill_tab_width_combo (window); fill_tab_width_combo (window);
@ -1646,7 +1651,9 @@ create_statusbar (XedWindow *window,
window->priv->language_combo = xed_status_combo_box_new (NULL); window->priv->language_combo = xed_status_combo_box_new (NULL);
gtk_widget_show (window->priv->language_combo); gtk_widget_show (window->priv->language_combo);
gtk_box_pack_end (GTK_BOX(window->priv->statusbar), window->priv->language_combo, FALSE, TRUE, 0); gtk_widget_set_margin_bottom (GTK_WIDGET (window->priv->language_combo), 2);
gtk_widget_set_margin_top (GTK_WIDGET (window->priv->language_combo), 2);
gtk_box_pack_end (GTK_BOX(window->priv->statusbar), window->priv->language_combo, FALSE, FALSE, 0);
fill_language_combo (window); fill_language_combo (window);
@ -1656,6 +1663,7 @@ create_statusbar (XedWindow *window,
button_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); button_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_widget_set_margin_top (button_box, 4); gtk_widget_set_margin_top (button_box, 4);
gtk_widget_set_margin_bottom (button_box, 4); gtk_widget_set_margin_bottom (button_box, 4);
gtk_widget_set_margin_left (button_box, 6);
gtk_box_pack_start (GTK_BOX (window->priv->statusbar), button_box, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (window->priv->statusbar), button_box, FALSE, FALSE, 0);
window->priv->show_side_pane_button = gtk_toggle_button_new (); window->priv->show_side_pane_button = gtk_toggle_button_new ();