diff options
author | raveit65 <[email protected]> | 2017-05-08 19:49:42 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-05-28 09:52:32 +0200 |
commit | d3eb027cee37bbf16a5f5f608d4aea37cbe385dd (patch) | |
tree | 58ea25640dd969a6e8f4df6c63263954d38b2f29 | |
parent | 092843c1fb4295025ead4008f9463df70dd9328b (diff) | |
download | mate-control-center-d3eb027cee37bbf16a5f5f608d4aea37cbe385dd.tar.bz2 mate-control-center-d3eb027cee37bbf16a5f5f608d4aea37cbe385dd.tar.xz |
libslab shellwindow: replace GtkAlignment with a GtkBox
The scrolledwindow child needs to be vertical expand in this case.
-rw-r--r-- | libslab/app-shell.c | 1 | ||||
-rw-r--r-- | libslab/shell-window.c | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/libslab/app-shell.c b/libslab/app-shell.c index dd14a978..c71b7f5b 100644 --- a/libslab/app-shell.c +++ b/libslab/app-shell.c @@ -277,6 +277,7 @@ layout_shell (AppShellData * app_data, const gchar * filter_title, const gchar * app_resizer_new (GTK_BOX (right_vbox), num_cols, TRUE, app_data); sw = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_set_vexpand (GTK_WIDGET (sw), TRUE); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN); diff --git a/libslab/shell-window.c b/libslab/shell-window.c index 3e267c9e..75201d58 100644 --- a/libslab/shell-window.c +++ b/libslab/shell-window.c @@ -121,11 +121,13 @@ shell_window_handle_size_request (GtkWidget * widget, GtkRequisition * requisiti void shell_window_set_contents (ShellWindow * shell, GtkWidget * left_pane, GtkWidget * right_pane) { - shell->_left_pane = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); - shell->_right_pane = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); + shell->_left_pane = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + gtk_widget_set_margin_top (GTK_WIDGET (shell->_left_pane), 15); + gtk_widget_set_margin_bottom (GTK_WIDGET (shell->_left_pane), 15); + gtk_widget_set_margin_start (GTK_WIDGET (shell->_left_pane), 15); + gtk_widget_set_margin_end (GTK_WIDGET (shell->_left_pane), 15); - gtk_alignment_set_padding (GTK_ALIGNMENT (shell->_left_pane), 15, 15, 15, 15); - gtk_alignment_set_padding (GTK_ALIGNMENT (shell->_right_pane), 0, 0, 0, 0); /* space for vertical line */ + shell->_right_pane = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start (shell->_hbox, shell->_left_pane, FALSE, FALSE, 0); gtk_box_pack_start (shell->_hbox, shell->_right_pane, TRUE, TRUE, 0); /* this one takes any extra space */ |