[feat] add blue highlight for drop area

This commit is contained in:
Julian Sparber
2017-12-30 18:30:19 +01:00
parent 8a2d24bccd
commit 514240f23e
3 changed files with 13 additions and 5 deletions

View File

@@ -17,9 +17,9 @@
<child> <child>
<object class="GtkListBoxRow" id="remote_device_row"> <object class="GtkListBoxRow" id="remote_device_row">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">false</property> <property name="can_focus">True</property>
<property name="activatable">false</property> <property name="activatable">True</property>
<property name="selectable">false</property> <property name="selectable">True</property>
<child> <child>
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>

View File

@@ -6,3 +6,10 @@
frame, list, border { frame, list, border {
border-radius: 4px; border-radius: 4px;
} }
:not(decoration):not(window):drop(active):focus, :not(decoration):not(window):drop(active) {
border-color: #4A90D9;
box-shadow: inset 0 0 0 1px #4A90D9;
caret-color: #4A90D9;
border-radius: 4px;
}

View File

@@ -338,8 +338,9 @@ teleport_remote_device_init (TeleportRemoteDevice *self)
/* Make the widget a DnD destination. */ /* Make the widget a DnD destination. */
gtk_drag_dest_set gtk_drag_dest_set
( (
GTK_WIDGET (self), /* widget that will accept a drop */ GTK_WIDGET (self->remote_device_row), /* widget that will accept a drop */
GTK_DEST_DEFAULT_ALL, GTK_DEST_DEFAULT_MOTION /* default actions for dest on DnD */
| GTK_DEST_DEFAULT_HIGHLIGHT,
target_list, /* lists of target to support */ target_list, /* lists of target to support */
n_targets, /* size of list */ n_targets, /* size of list */
GDK_ACTION_COPY /* what to do with data after dropped */ GDK_ACTION_COPY /* what to do with data after dropped */