Introducing panning acceleration factor (see issue #945: Paning a 1:1 preview from border to border need several click (& refresh))

This commit is contained in:
natureh
2011-08-28 20:58:53 +02:00
parent 5d049033d7
commit 5a5775edba
7 changed files with 41 additions and 8 deletions

View File

@@ -380,8 +380,9 @@ void CropWindow::pointerMoved (int x, int y) {
iarea->redraw ();
}
else if (state==SCropImgMove) {
action_x = (press_x - x) / zoomSteps[cropZoom].zoom;
action_y = (press_y - y) / zoomSteps[cropZoom].zoom;
double accel = options.panAccelFactor * zoomSteps[cropZoom].zoom;
action_x = (press_x - x) / zoomSteps[cropZoom].zoom * accel;
action_y = (press_y - y) / zoomSteps[cropZoom].zoom * accel;
for (std::list<CropWindowListener*>::iterator i=listeners.begin(); i!=listeners.end(); i++)
(*i)->cropPositionChanged (this);
iarea->redraw ();