[Xfce4-commits] [xfce/thunar] 39/46: Fix small styling details
noreply at xfce.org
noreply at xfce.org
Tue Aug 15 02:35:47 CEST 2017
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/thunar.
commit e883d6bd26d25a52ec0446e89b5c10369f22a124
Author: Andre Miranda <andre42m at gmail.com>
Date: Tue Jun 20 23:42:32 2017 -0300
Fix small styling details
---
thunar/thunar-shortcuts-pane.c | 12 ++++++++++++
thunar/thunar-standard-view.c | 12 ++++++++++++
thunar/thunar-statusbar.c | 19 +++++++++++--------
3 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/thunar/thunar-shortcuts-pane.c b/thunar/thunar-shortcuts-pane.c
index 590a92c..1838eb2 100644
--- a/thunar/thunar-shortcuts-pane.c
+++ b/thunar/thunar-shortcuts-pane.c
@@ -163,6 +163,8 @@ thunar_shortcuts_pane_side_pane_init (ThunarSidePaneIface *iface)
static void
thunar_shortcuts_pane_init (ThunarShortcutsPane *shortcuts_pane)
{
+ GtkCssProvider *provider;
+
/* setup the action group for the shortcuts actions */
shortcuts_pane->action_group = gtk_action_group_new ("ThunarShortcutsPane");
gtk_action_group_set_translation_domain (shortcuts_pane->action_group, GETTEXT_PACKAGE);
@@ -179,6 +181,16 @@ thunar_shortcuts_pane_init (ThunarShortcutsPane *shortcuts_pane)
gtk_container_add (GTK_CONTAINER (shortcuts_pane), shortcuts_pane->view);
gtk_widget_show (shortcuts_pane->view);
+ /* remove extra border between side pane and view */
+ provider = gtk_css_provider_new ();
+
+ gtk_css_provider_load_from_data (provider, ".frame { border-right-width: 0px; }", -1, NULL);
+ gtk_style_context_add_provider (
+ GTK_STYLE_CONTEXT (gtk_widget_get_style_context (shortcuts_pane)),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (provider);
+
/* connect the "shortcut-activated" signal */
g_signal_connect_swapped (G_OBJECT (shortcuts_pane->view), "shortcut-activated", G_CALLBACK (thunar_navigator_change_directory), shortcuts_pane);
g_signal_connect_swapped (G_OBJECT (shortcuts_pane->view), "shortcut-activated-tab", G_CALLBACK (thunar_navigator_open_new_tab), shortcuts_pane);
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 3262e2a..60630ba 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -635,6 +635,8 @@ thunar_standard_view_view_init (ThunarViewIface *iface)
static void
thunar_standard_view_init (ThunarStandardView *standard_view)
{
+ GtkCssProvider *provider;
+
standard_view->priv = THUNAR_STANDARD_VIEW_GET_PRIVATE (standard_view);
/* allocate the scroll_to_files mapping (directory GFile -> first visible child GFile) */
@@ -734,6 +736,16 @@ thunar_standard_view_init (ThunarStandardView *standard_view)
/* connect to size allocation signals for generating thumbnail requests */
g_signal_connect_after (G_OBJECT (standard_view), "size-allocate",
G_CALLBACK (thunar_standard_view_size_allocate), NULL);
+
+ /* remove extra border between side pane and view */
+ provider = gtk_css_provider_new ();
+
+ gtk_css_provider_load_from_data (provider, ".frame { border-left-width: 0px; }", -1, NULL);
+ gtk_style_context_add_provider (
+ GTK_STYLE_CONTEXT (gtk_widget_get_style_context (standard_view)),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (provider);
}
diff --git a/thunar/thunar-statusbar.c b/thunar/thunar-statusbar.c
index f875f45..6a00703 100644
--- a/thunar/thunar-statusbar.c
+++ b/thunar/thunar-statusbar.c
@@ -90,14 +90,13 @@ thunar_statusbar_class_init (ThunarStatusbarClass *klass)
if (!style_initialized)
{
- gtk_widget_class_install_style_property(gobject_class, g_param_spec_int (
- "shadow-type", //name
- "shadow-type", //nick
- "the type of the shadow", //blurb
- GTK_SHADOW_NONE, //min
- GTK_SHADOW_ETCHED_OUT, //max
- GTK_SHADOW_NONE, //default
- G_PARAM_READWRITE)); //flags
+ gtk_widget_class_install_style_property (gobject_class, g_param_spec_enum (
+ "shadow-type", //name
+ "shadow-type", //nick
+ "type of shadow", //blurb
+ gtk_shadow_type_get_type(), //type
+ GTK_SHADOW_NONE, //default
+ G_PARAM_READWRITE )); //flags
}
}
@@ -107,6 +106,10 @@ static void
thunar_statusbar_init (ThunarStatusbar *statusbar)
{
statusbar->context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "Main text");
+
+ /* make the status thinner */
+ gtk_widget_set_margin_top (statusbar, 0);
+ gtk_widget_set_margin_bottom (statusbar, 0);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list