shell: fix panel centering on CcPanelList
the calculation to center the panel row was failing when the panel list was not scrolled to the top. Fix it by taking the distance from the row to the CcPanelList, instead of the GtkScrolledWindow that contains it. Part of issue #2506
This commit is contained in:
parent
3f3409cbc1
commit
2b3c157c07
1 changed files with 1 additions and 1 deletions
|
@ -914,7 +914,7 @@ cc_panel_list_scroll_to_center_row (CcPanelList *self,
|
|||
if (!adj)
|
||||
return;
|
||||
|
||||
if (!gtk_widget_compute_point (row, scrolled_window, &GRAPHENE_POINT_INIT (0, 0), &p))
|
||||
if (!gtk_widget_compute_point (row, GTK_WIDGET (self), &GRAPHENE_POINT_INIT (0, 0), &p))
|
||||
return;
|
||||
|
||||
target_value = p.y + gtk_widget_get_height (row) / 2;
|
||||
|
|
Loading…
Add table
Reference in a new issue