Use Granite's Thin Pane for horizontal panes: Closes #5855
This commit is contained in:
parent
cdbf4b8937
commit
e24aff2d05
4 changed files with 37 additions and 5 deletions
|
|
@ -46,6 +46,7 @@ find_package(PkgConfig)
|
|||
pkg_check_modules(LIBINDICATE QUIET indicate-0.7>=0.6.1)
|
||||
pkg_check_modules(LIBUNITY QUIET unity>=5.12.0)
|
||||
pkg_check_modules(LIBMESSAGINGMENU QUIET messaging-menu>=12.10.2)
|
||||
pkg_check_modules(LIBGRANITE QUIET granite>=0.1.5)
|
||||
|
||||
# intl
|
||||
include(Gettext)
|
||||
|
|
|
|||
1
THANKS
1
THANKS
|
|
@ -5,6 +5,7 @@ Jürg Billeter <j@bitron.ch>
|
|||
Sergey Shnatsel Davidoff <sergey@elementaryos.org>
|
||||
Joanmarie Diggs <jdiggs@igalia.com>
|
||||
Christian Dywan <christian@twotoasts.de>
|
||||
Victor Eduardo <victor@elementaryos.org>
|
||||
Timo Kluck <tkluck@infty.nl>
|
||||
Charles Lindsay <chaz@yorba.org>
|
||||
Thomas Moschny <thomas.moschny@gmx.de>
|
||||
|
|
|
|||
|
|
@ -333,6 +333,26 @@ else ()
|
|||
message(STATUS "Unity launcher support: OFF")
|
||||
endif ()
|
||||
|
||||
if (LIBGRANITE_FOUND)
|
||||
message(STATUS "Granite support: ON")
|
||||
set(EXTRA_CLIENT_PKG_CONFIG
|
||||
${EXTRA_CLIENT_PKG_CONFIG}
|
||||
granite
|
||||
)
|
||||
|
||||
set(EXTRA_CLIENT_PACKAGES
|
||||
${EXTRA_CLIENT_PACKAGES}
|
||||
granite
|
||||
)
|
||||
|
||||
set(EXTRA_VALA_OPTIONS
|
||||
${EXTRA_VALA_OPTIONS}
|
||||
-D HAVE_LIBGRANITE
|
||||
)
|
||||
else ()
|
||||
message(STATUS "Granite support: OFF")
|
||||
endif ()
|
||||
|
||||
set(TARGET_GLIB 2.32)
|
||||
|
||||
pkg_check_modules(DEPS REQUIRED QUIET
|
||||
|
|
|
|||
|
|
@ -17,8 +17,15 @@ public class MainWindow : Gtk.Window {
|
|||
private int window_width;
|
||||
private int window_height;
|
||||
private bool window_maximized;
|
||||
|
||||
#if HAVE_LIBGRANITE
|
||||
private Granite.Widgets.SidebarPaned folder_paned = new Granite.Widgets.SidebarPaned();
|
||||
private Granite.Widgets.SidebarPaned conversations_paned = new Granite.Widgets.SidebarPaned();
|
||||
#else
|
||||
private Gtk.Paned folder_paned = new Gtk.Paned(Gtk.Orientation.HORIZONTAL);
|
||||
private Gtk.Paned conversations_paned = new Gtk.Paned(Gtk.Orientation.HORIZONTAL);
|
||||
#endif
|
||||
|
||||
private Gtk.Spinner spinner = new Gtk.Spinner();
|
||||
private bool is_shown = false;
|
||||
|
||||
|
|
@ -44,8 +51,8 @@ public class MainWindow : Gtk.Window {
|
|||
if (GearyApplication.instance.config.window_maximize)
|
||||
maximize();
|
||||
|
||||
folder_paned.set_position(GearyApplication.instance.config.folder_list_pane_position);
|
||||
conversations_paned.set_position(GearyApplication.instance.config.messages_pane_position);
|
||||
folder_paned.position = GearyApplication.instance.config.folder_list_pane_position;
|
||||
conversations_paned.position = GearyApplication.instance.config.messages_pane_position;
|
||||
|
||||
base.show_all();
|
||||
is_shown = true;
|
||||
|
|
@ -59,8 +66,8 @@ public class MainWindow : Gtk.Window {
|
|||
GearyApplication.instance.config.window_maximize = window_maximized;
|
||||
|
||||
// Save pane positions.
|
||||
GearyApplication.instance.config.folder_list_pane_position = folder_paned.get_position();
|
||||
GearyApplication.instance.config.messages_pane_position = conversations_paned.get_position();
|
||||
GearyApplication.instance.config.folder_list_pane_position = folder_paned.position;
|
||||
GearyApplication.instance.config.messages_pane_position = conversations_paned.position;
|
||||
}
|
||||
|
||||
base.destroy();
|
||||
|
|
@ -117,7 +124,10 @@ public class MainWindow : Gtk.Window {
|
|||
status_bar.add(spinner);
|
||||
status_bar_box.pack_start(folder_list_scrolled);
|
||||
status_bar_box.pack_start(status_bar, false, false, 0);
|
||||
get_style_context().add_class("sidebar-pane-separator");
|
||||
|
||||
#if !HAVE_LIBGRANITE
|
||||
folder_paned.get_style_context().add_class("sidebar-pane-separator");
|
||||
#endif
|
||||
|
||||
// Message list left of message viewer.
|
||||
conversations_paned.pack1(conversation_list_scrolled, false, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue