mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-10-31 04:58:58 +00:00
Support adjustments where the ListBox is not at top
This commit is contained in:
parent
e713145454
commit
fbf0e16483
1 changed files with 6 additions and 3 deletions
|
@ -343,9 +343,12 @@ public class Egg.ListBox : Container {
|
||||||
cursor_child = child;
|
cursor_child = child;
|
||||||
this.grab_focus ();
|
this.grab_focus ();
|
||||||
this.queue_draw ();
|
this.queue_draw ();
|
||||||
if (child != null && adjustment != null)
|
if (child != null && adjustment != null) {
|
||||||
adjustment.clamp_page (cursor_child.y,
|
Allocation allocation;
|
||||||
cursor_child.y + cursor_child.height);
|
this.get_allocation (out allocation);
|
||||||
|
adjustment.clamp_page (cursor_child.y + allocation.y,
|
||||||
|
cursor_child.y + allocation.y + cursor_child.height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update_selected (ChildInfo? child) {
|
private void update_selected (ChildInfo? child) {
|
||||||
|
|
Loading…
Reference in a new issue