The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Scroll to characters in overview

These changes was commited to the Birdfont repository Wed, 15 Jun 2016 13:59:33 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 15 Jun 2016 13:59:33 +0000 (15:59 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 15 Jun 2016 13:59:33 +0000 (15:59 +0200)
commit 16012e8538721db0cb4ea7621581c427ab6c2b44
tree 62fc20428b2ecc279d8ef56d066eda67cb7d8be4
parent a8bc57661312ee46b4d6bf000e01a83feaf7c0ac
Scroll to characters in overview

libbirdfont/OverView.vala
--- a/libbirdfont/OverView.vala +++ b/libbirdfont/OverView.vala @@ -1145,6 +1145,15 @@ if (o.get_name () == name) { selected = i; selected_item = get_selected_item (); + + if (selected_item.y > allocation.height - OverViewItem.height) { + view_offset_y -= (selected_item.y + OverViewItem.height) - allocation.height; + } + + if (selected_item.y < 0) { + view_offset_y = 0; + } + return true; }