Changeset 850


Ignore:
Timestamp:
02/05/14 17:03:30 (10 years ago)
Author:
jts21
Message:

Enable F1/F2 or shift-scroll on background to zoom whole frame, and hopefully fix broken shift-scroll zooming on Windows

Location:
trunk/src/org/expeditee/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/FrameKeyboardActions.java

    r814 r850  
    10431043                                break;
    10441044                        case SizeDown:
    1045                                 if (isControlDown) {
    1046                                         UserSettings.ScaleFactor.set(UserSettings.ScaleFactor.get() - 0.05f);
    1047                                         Misc.repaint();
    1048                                         return;
    1049                                 }
     1045                                ScaleFrameset.scaleFrame(DisplayIO.getCurrentFrame(), 0.909090909f);
     1046                                DisplayIO.getCurrentFrame().refreshSize();
     1047                                FrameKeyboardActions.Refresh();
     1048                                return;
     1049//                              if (isControlDown) {
     1050//                                      UserSettings.ScaleFactor.set(UserSettings.ScaleFactor.get() - 0.05f);
     1051//                                      Misc.repaint();
     1052//                                      return;
     1053//                              }
    10501054                        case SizeUp:
    1051                                 if (isControlDown) {
    1052                                         UserSettings.ScaleFactor.set(UserSettings.ScaleFactor.get() + 0.05f);
    1053                                         Misc.repaint();
    1054                                         return;
    1055                                 }
     1055                                ScaleFrameset.scaleFrame(DisplayIO.getCurrentFrame(), 1.1f);
     1056                                DisplayIO.getCurrentFrame().refreshSize();
     1057                                FrameKeyboardActions.Refresh();
     1058                                return;
     1059//                              if (isControlDown) {
     1060//                                      UserSettings.ScaleFactor.set(UserSettings.ScaleFactor.get() + 0.05f);
     1061//                                      Misc.repaint();
     1062//                                      return;
     1063//                              }
    10561064                        default:
    10571065                                MessageBay.displayMessageOnce(displayMessage);
     
    16081616                        if (item.isFrameName()) {
    16091617                                // scale the entire frame
    1610                                 ScaleFrameset.scaleFrame(DisplayIO.getCurrentFrame(), (float) (diff > 0 ? 1.1 : 0.909090909));
    1611                                 DisplayIO.getCurrentFrame().refreshSize();
    1612                                 FrameKeyboardActions.Refresh();
     1618                                if(diff != 0) {
     1619                                        ScaleFrameset.scaleFrame(DisplayIO.getCurrentFrame(), (float) (diff > 0 ? 1.1 : 0.909090909));
     1620                                        DisplayIO.getCurrentFrame().refreshSize();
     1621                                        FrameKeyboardActions.Refresh();
     1622                                }
    16131623                                // MessageBay.displayMessage("Can not resize the frame name");
    16141624                                return;
  • trunk/src/org/expeditee/gui/FrameMouseActions.java

    r782 r850  
    32983298                        }
    32993299
    3300                         Item ip = FrameUtils.getCurrentItem();
    3301                         if (ip != null && clicks > 1) {
    3302                                 float size = ip.getSize();
    3303                                 if (ip instanceof Dot || ip instanceof Line
    3304                                                 || ip instanceof Circle) {
    3305                                         size = ip.getThickness();
    3306                                 }
    3307                                 // base the number of clicks on the size of the object
    3308                                 clicks = (int) Math.ceil(size / 20.0 * clicks);
    3309                         }
    3310                         FrameKeyboardActions.functionKey(rotationType, clicks, arg0
     3300                        FrameKeyboardActions.functionKey(rotationType, 1, arg0
    33113301                                        .isShiftDown(), arg0.isControlDown());
    33123302
Note: See TracChangeset for help on using the changeset viewer.