[gnome-control-center/wip/feborges/new-search-panel: 19/19] search: Hide row while its being dragged
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/feborges/new-search-panel: 19/19] search: Hide row while its being dragged
- Date: Tue, 16 Jul 2019 11:21:26 +0000 (UTC)
commit b382f58808789747e59a223cc63e65ccf1472b1e
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Jul 9 09:22:41 2019 +0000
search: Hide row while its being dragged
Otherwise we leave the look & feel of a duplicated row. Instead
we should hide the selected row when the drag event begins and
show it again once the drag event ends.
panels/search/cc-search-panel-row.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/panels/search/cc-search-panel-row.c b/panels/search/cc-search-panel-row.c
index ace3d4848..8201a0c63 100644
--- a/panels/search/cc-search-panel-row.c
+++ b/panels/search/cc-search-panel-row.c
@@ -98,6 +98,7 @@ drag_begin_cb (CcSearchPanelRow *self,
self->drag_widget = GTK_LIST_BOX (gtk_list_box_new ());
gtk_widget_show (GTK_WIDGET (self->drag_widget));
+ gtk_widget_hide (GTK_WIDGET (self));
gtk_widget_set_size_request (GTK_WIDGET (self->drag_widget), alloc.width, alloc.height);
drag_row = cc_search_panel_row_new (self->app_info);
@@ -111,6 +112,8 @@ drag_begin_cb (CcSearchPanelRow *self,
static void
drag_end_cb (CcSearchPanelRow *self)
{
+ gtk_widget_show (GTK_WIDGET (self));
+
g_clear_pointer ((GtkWidget **) &self->drag_widget, gtk_widget_destroy);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]