Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 83841 Details for
Bug 210189
scroll screenshot using ctrl+drag
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
ctrl-drag scrolling for screenshot page
clipboard.txt (text/plain), 3.07 KB, created by
Eugene Kuleshov
on 2007-11-27 02:51:33 EST
(
hide
)
Description:
ctrl-drag scrolling for screenshot page
Filename:
MIME Type:
Creator:
Eugene Kuleshov
Created:
2007-11-27 02:51:33 EST
Size:
3.07 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenshotAttachmentPage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenshotAttachmentPage.java,v >retrieving revision 1.4 >diff -u -r1.4 ScreenshotAttachmentPage.java >--- src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenshotAttachmentPage.java 16 Nov 2007 06:24:49 -0000 1.4 >+++ src/org/eclipse/mylyn/internal/tasks/ui/wizards/ScreenshotAttachmentPage.java 27 Nov 2007 07:48:39 -0000 >@@ -112,7 +112,7 @@ > */ > private static enum Action { > >- IDLE, SELECTING, RESIZING_SELECTION, MOVING_SELECTION; >+ IDLE, SELECTING, RESIZING_SELECTION, MOVING_SELECTION, MOVING_IMAGE; > > }; > >@@ -221,14 +221,12 @@ > e.gc.drawImage(screenshotImage, 0, 0); > } > >- if (currentAction == Action.IDLE) { >- if (currentSelection != null) { >- drawSelection(e.gc); >- } >- } else if (currentAction == Action.SELECTING || currentAction == Action.RESIZING_SELECTION >- || currentAction == Action.MOVING_SELECTION) { >- if (currentSelection != null) { >+ if (currentSelection != null) { >+ if (currentAction == Action.SELECTING || currentAction == Action.RESIZING_SELECTION >+ || currentAction == Action.MOVING_SELECTION) { > drawSelectionPreview(e.gc); >+ } else { >+ drawSelection(e.gc); > } > } > } else { >@@ -464,7 +462,15 @@ > * If a selection is in course, moving the mouse around refreshes the selection rectangle > */ > public void mouseMove(MouseEvent e) { >- if (currentAction == Action.SELECTING) { >+ if (currentAction == Action.MOVING_IMAGE) { >+ Point origin = scrolledComposite.getOrigin(); >+ int diffx = (e.x - startPoint.x) / 2; >+ int diffy = (e.y - startPoint.y) / 2; >+ scrolledComposite.setOrigin(origin.x + diffx, origin.y + diffy); >+ startPoint.x = e.x; >+ startPoint.y = e.y; >+ canvas.redraw(); >+ } else if (currentAction == Action.SELECTING) { > // Selection in course > refreshCurrentSelection((int) Math.round(e.x / scaleFactor), (int) Math.round(e.y / scaleFactor)); > canvas.redraw(); >@@ -506,6 +512,11 @@ > * image > */ > public void mouseUp(MouseEvent e) { >+ if (currentAction == Action.MOVING_IMAGE) { >+ currentAction = Action.IDLE; >+ startPoint = null; >+ return; >+ } > if (currentAction == Action.SELECTING || currentAction == Action.RESIZING_SELECTION > || currentAction == Action.MOVING_SELECTION) { > canvas.setCursor(cursors.get(SWT.CURSOR_ARROW)); >@@ -538,6 +549,12 @@ > return; > } > >+ if ((e.stateMask & SWT.MOD1) > 0) { >+ startPoint = new Point(e.x, e.y); >+ currentAction = Action.MOVING_IMAGE; >+ return; >+ } >+ > // Check the most appropriate action to follow; first check if I'm on some grab point > if (currentSelection != null) { > for (GrabPoint point : grabPoints) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210189
: 83841 |
83842