From 23d0163dd7a64bfe208174be583991eda7fe672a Mon Sep 17 00:00:00 2001 From: Carlos Soriano Date: Sun, 25 Mar 2018 17:46:59 +0200 Subject: action-bar: Flat style with expanding text buttons --- src/nautilus-action-bar.c | 7 +- src/resources/css/Adwaita.css | 22 +- src/resources/ui/nautilus-action-bar.ui | 589 +++++++++++++++++++++++--------- 3 files changed, 445 insertions(+), 173 deletions(-) diff --git a/src/nautilus-action-bar.c b/src/nautilus-action-bar.c index 79e607c3d..e50d2fe5c 100644 --- a/src/nautilus-action-bar.c +++ b/src/nautilus-action-bar.c @@ -188,7 +188,7 @@ real_update_status (gpointer data) gtk_label_set_label (GTK_LABEL (actionbar->loading_label), nautilus_view_is_searching (actionbar->view) ? _("Searching") : _("Loading")); - gtk_stack_set_visible_child_name (GTK_STACK (actionbar->stack), "loading"); + gtk_stack_set_visible_child_name (GTK_STACK (actionbar->stack), "loading_bar"); } else { @@ -201,17 +201,18 @@ real_update_status (gpointer data) if (number_of_files == 0) { gtk_label_set_label (GTK_LABEL (actionbar->primary_label), ""); + gtk_stack_set_visible_child_name (GTK_STACK (actionbar->stack), "background_bar"); } else if (number_of_files == 1) { setup_single_file_selection (actionbar, selection->data); + gtk_stack_set_visible_child_name (GTK_STACK (actionbar->stack), "selection_bar"); } else { setup_multiple_files_selection (actionbar, selection); + gtk_stack_set_visible_child_name (GTK_STACK (actionbar->stack), "selection_bar"); } - - gtk_stack_set_visible_child_name (GTK_STACK (actionbar->stack), "main"); } actionbar->update_status_timeout_id = 0; diff --git a/src/resources/css/Adwaita.css b/src/resources/css/Adwaita.css index c9c065541..98d177f2b 100644 --- a/src/resources/css/Adwaita.css +++ b/src/resources/css/Adwaita.css @@ -216,12 +216,20 @@ actionbar background-color: mix(@theme_bg_color, @theme_base_color, 0.5); } -.border-box +actionbar button, +actionbar button:hover { - /* Same as spacing between icons */ - padding-left: 6px; - background-image: image(mix(@theme_bg_color, @borders, 1.0)); - background-size: 1px 12px; - background-repeat: no-repeat; - background-position: 100% + margin: 2px; + border-color: transparent; + border-width: 0px; + border-radius: 0px; +} + +actionbar button:hover +{ + background-image: none; + border-color: transparent; + box-shadow: none; + background-color: mix (@theme_bg_color, black, 0.06); + transition-duration: 100ms; } \ No newline at end of file diff --git a/src/resources/ui/nautilus-action-bar.ui b/src/resources/ui/nautilus-action-bar.ui index b5b8d10e4..219b0159f 100644 --- a/src/resources/ui/nautilus-action-bar.ui +++ b/src/resources/ui/nautilus-action-bar.ui @@ -5,191 +5,265 @@ - - -
- - Open in New Window - view.open-item-new-window - - - Open in New Tab - view.open-item-new-tab - -
-
- - Copy To… - view.copy-to - - - Move To… - view.move-to - - - New Folder With Selection… - view.new-folder-with-selection - -
-
- - Properties - view.properties - -
-
-- cgit v1.2.1