diff options
author | neoraider <devnull@localhost> | 2008-04-15 23:47:03 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2008-04-15 23:47:03 +0200 |
commit | b90de8c582b41bbb3af5f77df69ae537e106ce59 (patch) | |
tree | 38d2eeab249df19c0090c1dc336d16ee68b483b4 /src/Gui | |
parent | cfd608527e167877d623bf5b9682b5c4b6130df9 (diff) | |
download | zoomedit-b90de8c582b41bbb3af5f77df69ae537e106ce59.tar zoomedit-b90de8c582b41bbb3af5f77df69ae537e106ce59.zip |
zoomedit:
* Some scrolling tweaks
Diffstat (limited to 'src/Gui')
-rw-r--r-- | src/Gui/RenderArea.cpp | 10 | ||||
-rw-r--r-- | src/Gui/RenderArea.h | 1 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/Gui/RenderArea.cpp b/src/Gui/RenderArea.cpp index 4d250f8..8062b80 100644 --- a/src/Gui/RenderArea.cpp +++ b/src/Gui/RenderArea.cpp @@ -193,15 +193,13 @@ void RenderArea::updateScrollbars(float x, float y) { get_window()->thaw_updates(); - updateScrollingWithSize(2*xVal, 2*yVal); + updateScrolling(); } void RenderArea::updateScrolling() { - updateScrollingWithSize(hScrollbar->get_adjustment()->get_upper()-hScrollbar->get_adjustment()->get_lower(), - vScrollbar->get_adjustment()->get_upper()-vScrollbar->get_adjustment()->get_lower()); -} - -void RenderArea::updateScrollingWithSize(float imageWidth, float imageHeight) { + const float imageWidth = hScrollbar->get_adjustment()->get_upper()-hScrollbar->get_adjustment()->get_lower(); + const float imageHeight = vScrollbar->get_adjustment()->get_upper()-vScrollbar->get_adjustment()->get_lower(); + if(hScrollbar) { if(imageWidth < getViewWidth()) xCenter = 0; diff --git a/src/Gui/RenderArea.h b/src/Gui/RenderArea.h index 61e5291..59498d4 100644 --- a/src/Gui/RenderArea.h +++ b/src/Gui/RenderArea.h @@ -79,7 +79,6 @@ class RenderArea : public Gtk::DrawingArea { void updateViewport(); void updateScrollbars(float x = 0.5f, float y = 0.5f); void updateScrolling(); - void updateScrollingWithSize(float imageWidth, float imageHeight); bool gdkGLBegin() { GtkWidget *widget = GTK_WIDGET(gobj()); |