mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
placessidebar: Stop using gtk_widget_get_allocation
This commit is contained in:
parent
8957d4cb4f
commit
34b6d46276
@ -3484,7 +3484,6 @@ on_row_dragged (GtkGestureDrag *gesture,
|
||||
GdkContentProvider *content;
|
||||
GdkSurface *surface;
|
||||
GdkDevice *device;
|
||||
GtkAllocation allocation;
|
||||
GtkWidget *drag_widget;
|
||||
GdkDrag *drag;
|
||||
|
||||
@ -3509,12 +3508,13 @@ on_row_dragged (GtkGestureDrag *gesture,
|
||||
g_signal_connect (drag, "dnd-finished", G_CALLBACK (dnd_finished_cb), sidebar);
|
||||
g_signal_connect (drag, "cancel", G_CALLBACK (dnd_cancel_cb), sidebar);
|
||||
|
||||
gtk_widget_get_allocation (sidebar->drag_row, &allocation);
|
||||
gtk_widget_set_visible (sidebar->drag_row, FALSE);
|
||||
|
||||
drag_widget = GTK_WIDGET (gtk_sidebar_row_clone (GTK_SIDEBAR_ROW (sidebar->drag_row)));
|
||||
sidebar->drag_row_height = allocation.height;
|
||||
gtk_widget_set_size_request (drag_widget, allocation.width, allocation.height);
|
||||
sidebar->drag_row_height = gtk_widget_get_height (sidebar->drag_row);
|
||||
gtk_widget_set_size_request (drag_widget,
|
||||
gtk_widget_get_width (sidebar->drag_row),
|
||||
gtk_widget_get_height (sidebar->drag_row));
|
||||
gtk_widget_set_opacity (drag_widget, 0.8);
|
||||
|
||||
gtk_drag_icon_set_child (GTK_DRAG_ICON (gtk_drag_icon_get_for_drag (drag)), drag_widget);
|
||||
|
Loading…
Reference in New Issue
Block a user