[geary] Place the status bar in the bottom left paned child
- From: Robert Schroll <rschroll src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Place the status bar in the bottom left paned child
- Date: Tue, 10 Mar 2015 23:09:51 +0000 (UTC)
commit b32fa78b362791a1ba61e48ee87a0c9acb537f7d
Author: Robert Schroll <rschroll gmail com>
Date: Thu Feb 12 03:36:45 2015 -0500
Place the status bar in the bottom left paned child
This depends on the orientation.
https://bugzilla.gnome.org/show_bug.cgi?id=714793
src/client/components/main-window.vala | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
---
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index 239724d..1bf14b3 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -28,6 +28,8 @@ public class MainWindow : Gtk.ApplicationWindow {
private Gtk.ScrolledWindow conversation_list_scrolled;
private MonitoredSpinner spinner = new MonitoredSpinner();
+ private Gtk.Box folder_box;
+ private Gtk.Box conversation_box;
private Geary.AggregateProgressMonitor progress_monitor = new Geary.AggregateProgressMonitor();
private Geary.ProgressMonitor? conversation_monitor_progress = null;
private Geary.ProgressMonitor? folder_progress = null;
@@ -89,9 +91,9 @@ public class MainWindow : Gtk.ApplicationWindow {
set_titlebar(main_toolbar);
}
- on_change_orientation();
set_styling();
create_layout();
+ on_change_orientation();
}
public override void show_all() {
@@ -192,6 +194,8 @@ public class MainWindow : Gtk.ApplicationWindow {
folder_frame.shadow_type = Gtk.ShadowType.IN;
folder_frame.get_style_context ().add_class ("folder_frame");
folder_frame.add(folder_list_scrolled);
+ folder_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
+ folder_box.pack_start(folder_frame, true, true);
// message list
conversation_list_scrolled = new Gtk.ScrolledWindow(null, null);
@@ -202,16 +206,14 @@ public class MainWindow : Gtk.ApplicationWindow {
conversation_frame.shadow_type = Gtk.ShadowType.IN;
conversation_frame.get_style_context ().add_class ("conversation_frame");
conversation_frame.add(conversation_list_scrolled);
+ conversation_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
+ conversation_box.pack_start(conversation_frame, true, true);
// Three-pane display.
- Gtk.Box status_bar_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
status_bar.set_size_request(-1, STATUS_BAR_HEIGHT);
status_bar.set_border_width(2);
spinner.set_size_request(STATUS_BAR_HEIGHT - 2, -1);
status_bar.add(spinner);
- status_bar_box.pack_start(folder_frame);
- status_bar_box.pack_start(status_bar, false, false, 0);
- status_bar_box.get_style_context().add_class(Gtk.STYLE_CLASS_SIDEBAR);
folder_paned.get_style_context().add_class("sidebar-pane-separator");
@@ -220,8 +222,10 @@ public class MainWindow : Gtk.ApplicationWindow {
viewer_frame.add(conversation_viewer);
// Folder list to the left of everything.
- folder_paned.pack1(status_bar_box, false, false);
- folder_paned.pack2(conversation_frame, true, false);
+ folder_paned.pack1(folder_box, false, false);
+ folder_paned.pack2(conversation_box, true, false);
+
+ folder_paned.get_style_context().add_class(Gtk.STYLE_CLASS_SIDEBAR);
// Message list left of message viewer.
conversations_paned.pack1(folder_paned, false, false);
@@ -331,16 +335,22 @@ public class MainWindow : Gtk.ApplicationWindow {
private void on_change_orientation() {
bool horizontal = GearyApplication.instance.config.folder_list_pane_horizontal;
+ if (status_bar.parent != null)
+ status_bar.parent.remove(status_bar);
+
GLib.Settings.unbind(folder_paned, "position");
folder_paned.orientation = horizontal ? Gtk.Orientation.HORIZONTAL :
Gtk.Orientation.VERTICAL;
int folder_list_width =
GearyApplication.instance.config.folder_list_pane_position_horizontal;
- if (horizontal)
+ if (horizontal) {
conversations_paned.position += folder_list_width;
- else
+ folder_box.pack_start(status_bar, false, false);
+ } else {
conversations_paned.position -= folder_list_width;
+ conversation_box.pack_start(status_bar, false, false);
+ }
GearyApplication.instance.config.bind(
horizontal ? Configuration.FOLDER_LIST_PANE_POSITION_HORIZONTAL_KEY
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]