The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Page up and down when changing keyboard focus

These changes was commited to the Birdfont repository Tue, 31 Mar 2015 19:53:07 +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>
Tue, 31 Mar 2015 19:53:07 +0000 (21:53 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Tue, 31 Mar 2015 19:53:07 +0000 (21:53 +0200)
commit 12164f86fec427c72ee38e497ad8f8804ccbc836
tree d2762788f617d0c751b029e9e70b41fdb2b89a0a
parent 23663ae7f2c5149a2beceda42e4d2d3c59679a79
Page up and down when changing keyboard focus

libbirdfont/DescriptionDisplay.vala
--- a/libbirdfont/DescriptionDisplay.vala +++ b/libbirdfont/DescriptionDisplay.vala @@ -319,6 +319,23 @@ if (!(0 <= focus_index < focus_ring.size)) { focus_index = 0; } + + if (w.widget_y < 0) { + scroll -= allocation.height; + + if (scroll < 0) { + scroll = 0; + } + } else if (w.widget_y > allocation.height - 30 * MainWindow.units) { + scroll += allocation.height; + + if (scroll + allocation.height >= content_height) { + scroll = content_height - allocation.height; + } + } + + update_scrollbar (); + GlyphCanvas.redraw (); } public override void button_release (int button, double x, double y) {