[gtk+] Adwaita: placessidebar dnd fixes



commit 8b505d570ef37ddf8028442ea0ba519910647ca5
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Mon Mar 14 18:33:40 2016 +0100

    Adwaita: placessidebar dnd fixes

 gtk/theme/Adwaita/_common.scss           |   23 +++++++++++++++--------
 gtk/theme/Adwaita/gtk-contained-dark.css |   22 ++++++++++++++--------
 gtk/theme/Adwaita/gtk-contained.css      |   22 ++++++++++++++--------
 3 files changed, 43 insertions(+), 24 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index a732394..c54dd44 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -3645,18 +3645,25 @@ placessidebar {
       &:not(:hover):not(:active),
       &:backdrop { > image { opacity: $_placesidebar_icons_opacity; }}
     }
-  }
 
-  // in the sidebar case it makes no sense to click the selected row
-  row:selected:active { box-shadow: none; }
+    // in the sidebar case it makes no sense to click the selected row
+    &:selected:active { box-shadow: none; }
 
-   // looks like the label doesn't get all the states so work around
-  row:selected:disabled label { @extend %selected_items:disabled; }
-  row:selected:backdrop:disabled label { @extend %selected_items:backdrop:disabled; }
+    &.sidebar-placeholder-row {
+      padding: 0 8px;
+      min-height: 2px;
+      background-image: image($drop_target_color);
+      background-clip: content-box;
+    }
 
-  row.sidebar-placeholder-row { border: solid 1px $selected_bg_color; }
+    &.sidebar-new-bookmark-row { color: $selected_bg_color; }
 
-  row.sidebar-new-bookmark-row { color: $selected_bg_color; }
+    &:drop(active):not(:disabled) {
+      color: $drop_target_color;
+      box-shadow: inset 0 1px $drop_target_color,
+                  inset 0 -1px $drop_target_color;
+    }
+  }
 }
 
 placesview {
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index cf16f91..7db7eb9 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -3695,12 +3695,18 @@ placessidebar row {
     -gtk-outline-radius: 100%; }
     button.sidebar-button:not(:hover):not(:active) > image, button.sidebar-button:backdrop > image {
       opacity: 0.7; }
-placessidebar row:selected:active {
-  box-shadow: none; }
-placessidebar row.sidebar-placeholder-row {
-  border: solid 1px #215d9c; }
-placessidebar row.sidebar-new-bookmark-row {
-  color: #215d9c; }
+  placessidebar row:selected:active {
+    box-shadow: none; }
+  placessidebar row.sidebar-placeholder-row {
+    padding: 0 8px;
+    min-height: 2px;
+    background-image: image(black);
+    background-clip: content-box; }
+  placessidebar row.sidebar-new-bookmark-row {
+    color: #215d9c; }
+  placessidebar row:drop(active):not(:disabled) {
+    color: black;
+    box-shadow: inset 0 1px black, inset 0 -1px black; }
 
 placesview .server-list-button > image {
   transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
@@ -4059,7 +4065,7 @@ popover.background radiobutton:selected,
   label selection:disabled, spinbutton:not(.vertical) selection:disabled,
   entry selection:disabled, modelbutton.flat:disabled:selected, popover.background 
checkbutton:disabled:selected,
   popover.background radiobutton:disabled:selected,
-  .menuitem.button.flat:disabled:selected, row:disabled:selected, calendar:disabled:selected, .sidebar 
:disabled:selected, placessidebar row:selected:disabled label {
+  .menuitem.button.flat:disabled:selected, row:disabled:selected, calendar:disabled:selected, .sidebar 
:disabled:selected {
     color: #90aece; }
   iconview:backdrop:selected:focus, .view:backdrop:selected, iconview:backdrop:selected,
   iconview text:backdrop:selected:focus,
@@ -4081,7 +4087,7 @@ popover.background radiobutton:selected,
     label selection:backdrop:disabled, spinbutton:not(.vertical) selection:backdrop:disabled,
     entry selection:backdrop:disabled, modelbutton.flat:backdrop:disabled:selected, popover.background 
checkbutton:backdrop:disabled:selected,
     popover.background radiobutton:backdrop:disabled:selected,
-    .menuitem.button.flat:backdrop:disabled:selected, row:backdrop:disabled:selected, 
calendar:backdrop:disabled:selected, .sidebar :backdrop:disabled:selected, placessidebar 
row:selected:disabled label:backdrop, placessidebar row:selected:backdrop:disabled label {
+    .menuitem.button.flat:backdrop:disabled:selected, row:backdrop:disabled:selected, 
calendar:backdrop:disabled:selected, .sidebar :backdrop:disabled:selected {
       color: #648eba; }
 
 .monospace {
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 8ed73e7..b1630ea 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -3728,12 +3728,18 @@ placessidebar row {
     -gtk-outline-radius: 100%; }
     button.sidebar-button:not(:hover):not(:active) > image, button.sidebar-button:backdrop > image {
       opacity: 0.7; }
-placessidebar row:selected:active {
-  box-shadow: none; }
-placessidebar row.sidebar-placeholder-row {
-  border: solid 1px #4a90d9; }
-placessidebar row.sidebar-new-bookmark-row {
-  color: #4a90d9; }
+  placessidebar row:selected:active {
+    box-shadow: none; }
+  placessidebar row.sidebar-placeholder-row {
+    padding: 0 8px;
+    min-height: 2px;
+    background-image: image(black);
+    background-clip: content-box; }
+  placessidebar row.sidebar-new-bookmark-row {
+    color: #4a90d9; }
+  placessidebar row:drop(active):not(:disabled) {
+    color: black;
+    box-shadow: inset 0 1px black, inset 0 -1px black; }
 
 placesview .server-list-button > image {
   transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
@@ -4093,7 +4099,7 @@ popover.background radiobutton:selected,
   label selection:disabled, spinbutton:not(.vertical) selection:disabled,
   entry selection:disabled, modelbutton.flat:disabled:selected, popover.background 
checkbutton:disabled:selected,
   popover.background radiobutton:disabled:selected,
-  .menuitem.button.flat:disabled:selected, row:disabled:selected, calendar:disabled:selected, .sidebar 
:disabled:selected, placessidebar row:selected:disabled label {
+  .menuitem.button.flat:disabled:selected, row:disabled:selected, calendar:disabled:selected, .sidebar 
:disabled:selected {
     color: #a5c8ec; }
   iconview:backdrop:selected:focus, .view:backdrop:selected, iconview:backdrop:selected,
   iconview text:backdrop:selected:focus,
@@ -4115,7 +4121,7 @@ popover.background radiobutton:selected,
     label selection:backdrop:disabled, spinbutton:not(.vertical) selection:backdrop:disabled,
     entry selection:backdrop:disabled, modelbutton.flat:backdrop:disabled:selected, popover.background 
checkbutton:backdrop:disabled:selected,
     popover.background radiobutton:backdrop:disabled:selected,
-    .menuitem.button.flat:backdrop:disabled:selected, row:backdrop:disabled:selected, 
calendar:backdrop:disabled:selected, .sidebar :backdrop:disabled:selected, placessidebar 
row:selected:disabled label:backdrop, placessidebar row:selected:backdrop:disabled label {
+    .menuitem.button.flat:backdrop:disabled:selected, row:backdrop:disabled:selected, 
calendar:backdrop:disabled:selected, .sidebar :backdrop:disabled:selected {
       color: #80b1e4; }
 
 .monospace {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]