summaryrefslogtreecommitdiff
path: root/src/book-view.vala
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2012-04-04 21:01:18 +0200
committerAlessio Treglia <alessio@debian.org>2012-04-04 21:01:18 +0200
commit3423cc86f86a823a318ea72981dc8eb889fc7987 (patch)
tree01c27814a7d75d2b39c9ad1df8a730993496e3ec /src/book-view.vala
parent7249c8ed3cb0da5185af4ecd2031c483bfc0258a (diff)
Imported Upstream version 3.4.0upstream/3.4.0
Diffstat (limited to 'src/book-view.vala')
-rw-r--r--src/book-view.vala19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/book-view.vala b/src/book-view.vala
index 9dfd361..3acd14e 100644
--- a/src/book-view.vala
+++ b/src/book-view.vala
@@ -30,7 +30,7 @@ public class BookView : Gtk.VBox
private Gtk.Widget drawing_area;
/* Horizontal scrollbar */
- private Gtk.HScrollbar scroll;
+ private Gtk.Scrollbar scroll;
private Gtk.Adjustment adjustment;
private Gdk.CursorType cursor;
@@ -68,7 +68,7 @@ public class BookView : Gtk.VBox
drawing_area.set_events (Gdk.EventMask.POINTER_MOTION_MASK | Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK | Gdk.EventMask.FOCUS_CHANGE_MASK | Gdk.EventMask.STRUCTURE_MASK | Gdk.EventMask.SCROLL_MASK);
pack_start (drawing_area, true, true, 0);
- scroll = new Gtk.HScrollbar (null);
+ scroll = new Gtk.Scrollbar (Gtk.Orientation.HORIZONTAL, null);
adjustment = scroll.get_adjustment ();
pack_start (scroll, false, true, 0);
@@ -419,15 +419,11 @@ public class BookView : Gtk.VBox
context.restore ();
if (page.get_selected ())
- Gtk.paint_focus (drawing_area.get_style (),
- context,
- Gtk.StateType.SELECTED,
- null,
- null,
- page.get_x_offset () - get_x_offset (),
- page.get_y_offset (),
- page.get_width (),
- page.get_height ());
+ drawing_area.get_style_context ().render_focus (context,
+ page.get_x_offset () - get_x_offset (),
+ page.get_y_offset (),
+ page.get_width (),
+ page.get_height ());
}
return false;
@@ -435,6 +431,7 @@ public class BookView : Gtk.VBox
private PageView? get_page_at (int x, int y, out int x_, out int y_)
{
+ x_ = y_ = 0;
for (var i = 0; i < book.get_n_pages (); i++)
{
var page = get_nth_page (i);