Merge lp:~elementary-apps/pantheon-mail/sidebar into lp:~elementary-apps/pantheon-mail/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: Danielle Foré
Approved revision: 1866
Merged at revision: 1865
Proposed branch: lp:~elementary-apps/pantheon-mail/sidebar
Merge into: lp:~elementary-apps/pantheon-mail/trunk
Diff against target: 112 lines (+9/-51)
1 file modified
src/client/components/main-window.vala (+9/-51)
To merge this branch: bzr merge lp:~elementary-apps/pantheon-mail/sidebar
Reviewer Review Type Date Requested Status
Corentin Noël Approve
Review via email: mp+277916@code.launchpad.net

Commit message

* Move sidebar class to appropriate box
* Remove extra panes
* Remove style classes associated with panes

To post a comment you must log in.
Revision history for this message
Corentin Noël (tintou) wrote :

Everything looks fine

review: Approve
1866. By Danielle Foré

yorba code style

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/client/components/main-window.vala'
2--- src/client/components/main-window.vala 2015-03-26 21:04:40 +0000
3+++ src/client/components/main-window.vala 2015-11-18 21:59:55 +0000
4@@ -160,17 +160,6 @@
5 provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
6 // Gtk < 3.14: No borders along top or left side of window
7 string css = """
8- .folder-frame {
9- border-left-width: 0px;
10- border-top-width: 0px;
11- }
12- .sidebar-pane-separator.horizontal .conversation-frame {
13- border-top-width: 0px;
14- border-bottom-width: 0px;
15- }
16- .sidebar-pane-separator.vertical .conversation-frame {
17- border-left-width: 0px;
18- }
19 ComposerBox {
20 border-left-width: 0px;
21 border-right-width: 0px;
22@@ -193,23 +182,6 @@
23 border-top-left-radius: 0px;
24 }
25 """;
26-
27- if(Gtk.MAJOR_VERSION > 3 || Gtk.MAJOR_VERSION == 3 && Gtk.MINOR_VERSION >= 14) {
28- // Gtk >= 3.14: Borders only along status bar
29- css += """
30- .folder-frame {
31- border-right-width: 0px;
32- }
33- .sidebar-pane-separator.vertical .folder-frame {
34- border-bottom-width: 0px;
35- }
36- .conversation-frame {
37- border-top-width: 0px;
38- border-left-width: 0px;
39- border-right-width: 0px;
40- }
41- """;
42- }
43
44 try {
45 provider.load_from_data(css, -1);
46@@ -217,7 +189,7 @@
47 debug("Could not load styling from data: %s", error.message);
48 }
49 }
50-
51+
52 private void create_layout() {
53 Gtk.Box main_layout = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
54
55@@ -226,49 +198,35 @@
56 folder_list_scrolled.set_size_request(FOLDER_LIST_WIDTH, -1);
57 folder_list_scrolled.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
58 folder_list_scrolled.add(folder_list);
59- Gtk.Frame folder_frame = new Gtk.Frame(null);
60- folder_frame.shadow_type = Gtk.ShadowType.IN;
61- folder_frame.get_style_context ().add_class ("folder-frame");
62- folder_frame.add(folder_list_scrolled);
63 folder_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
64- folder_box.pack_start(folder_frame, true, true);
65-
66+ folder_box.get_style_context().add_class(Gtk.STYLE_CLASS_SIDEBAR);
67+ folder_box.pack_start(folder_list_scrolled, true, true);
68+
69 // message list
70 conversation_list_scrolled = new Gtk.ScrolledWindow(null, null);
71 conversation_list_scrolled.set_size_request(MESSAGE_LIST_WIDTH, -1);
72 conversation_list_scrolled.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
73 conversation_list_scrolled.add(conversation_list_view);
74- Gtk.Frame conversation_frame = new Gtk.Frame(null);
75- conversation_frame.shadow_type = Gtk.ShadowType.IN;
76- conversation_frame.get_style_context ().add_class ("conversation-frame");
77- conversation_frame.add(conversation_list_scrolled);
78 conversation_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
79- conversation_box.pack_start(conversation_frame, true, true);
80+ conversation_box.pack_start(conversation_list_scrolled, true, true);
81
82 // Three-pane display.
83 status_bar.set_size_request(-1, STATUS_BAR_HEIGHT);
84 status_bar.set_border_width(2);
85 spinner.set_size_request(STATUS_BAR_HEIGHT - 2, -1);
86 status_bar.add(spinner);
87-
88- folder_paned.get_style_context().add_class("sidebar-pane-separator");
89-
90- Gtk.Frame viewer_frame = new Gtk.Frame(null);
91- viewer_frame.shadow_type = Gtk.ShadowType.NONE;
92- viewer_frame.add(conversation_viewer);
93-
94+
95 // Folder list to the left of everything.
96 folder_paned.pack1(folder_box, false, false);
97 folder_paned.pack2(conversation_box, true, false);
98-
99+
100 Gtk.Box search_bar_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
101 search_bar_box.pack_start(search_bar, false, false, 0);
102 search_bar_box.pack_start(folder_paned);
103- search_bar_box.get_style_context().add_class(Gtk.STYLE_CLASS_SIDEBAR);
104-
105+
106 // Message list left of message viewer.
107 conversations_paned.pack1(search_bar_box, false, false);
108- conversations_paned.pack2(viewer_frame, true, true);
109+ conversations_paned.pack2(conversation_viewer, true, true);
110
111 if (GearyApplication.instance.is_running_unity)
112 main_layout.pack_start(main_toolbar, false, true, 0);

Subscribers

People subscribed via source and target branches