Commit ffaeb483 authored by Alexander Schwinn's avatar Alexander Schwinn

move all .css to one place: thunar-application

parent c2c833ff
......@@ -577,9 +577,12 @@ thunar_application_load_css (void)
css_provider = gtk_css_provider_new ();
/* For the pathbar-buttons any margin looks ugly, so we overwrite "margin-right" of the used theme with 0. */
/* The method "gtk_widget_set_margin_right" cannot be used since style-margin is prioritized over default widget-margin by gtk3. */
gtk_css_provider_load_from_data (css_provider, " .path-bar-button { margin-right: 0; }", -1, NULL);
/* For the pathbar-buttons any margin looks ugly*/
gtk_css_provider_load_from_data (css_provider, ".path-bar-button { margin-right: 0; }"
/* remove extra border between side pane and view */
".shortcuts-pane { border-right-width: 0px; }"
".standard-view { border-left-width: 0px; }", -1, NULL);
screen = gdk_screen_get_default ();
gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER (css_provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (css_provider);
......
......@@ -163,8 +163,6 @@ 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);
......@@ -181,15 +179,8 @@ 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 (GTK_WIDGET (shortcuts_pane))),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider);
/* add widget to css class */
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (shortcuts_pane)), "shortcuts-pane");
/* connect the "shortcut-activated" signal */
g_signal_connect_swapped (G_OBJECT (shortcuts_pane->view), "shortcut-activated", G_CALLBACK (thunar_navigator_change_directory), shortcuts_pane);
......
......@@ -635,8 +635,6 @@ 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) */
......@@ -737,15 +735,8 @@ thunar_standard_view_init (ThunarStandardView *standard_view)
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 (GTK_WIDGET (standard_view))),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider);
/* add widget to css class */
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (standard_view)), "standard-view");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment