diff options
author | neoraider <devnull@localhost> | 2008-01-18 19:41:02 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2008-01-18 19:41:02 +0100 |
commit | a39525ca36e2c002332f914907f74061533c2b04 (patch) | |
tree | 6e61ba79b1f73b68de08bc34343e66db82d7a470 | |
parent | 7f879850b5e4cf57b95c169238617c199e431cc7 (diff) | |
download | zoomedit-a39525ca36e2c002332f914907f74061533c2b04.tar zoomedit-a39525ca36e2c002332f914907f74061533c2b04.zip |
zoomedit: Fixed zoom bug.
-rw-r--r-- | Drawer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -135,7 +135,7 @@ void Drawer::updateScrollbars(float x, float y) { if(pageSize > (upper-lower) && width < imageWidth) value = 0; else - value = gtk_adjustment_get_value(hAdjustment) + (x-0.5)*pageSize*(pageSize/width-1); + value = gtk_adjustment_get_value(hAdjustment) + (x-0.5)*(pageSize-width); gtk_adjustment_set_value(hAdjustment, MAX(MIN(value, maxX - width/2), minX + width/2)); g_object_get(G_OBJECT(vAdjustment), "lower", &lower, "upper", &upper, "page_size", &pageSize, NULL); @@ -145,7 +145,7 @@ void Drawer::updateScrollbars(float x, float y) { if(pageSize > (upper-lower) && height < imageHeight) value = 0; else - value = gtk_adjustment_get_value(vAdjustment) + (y-0.5)*pageSize*(pageSize/height-1); + value = gtk_adjustment_get_value(vAdjustment) + (y-0.5)*(pageSize-height); gtk_adjustment_set_value(vAdjustment, MAX(MIN(value, maxY - height/2), minY + height/2)); gdk_window_thaw_updates(drawingArea->window); |