diff options
author | Robin Stocker | 2013-02-02 15:14:31 +0000 |
---|---|---|
committer | Robin Stocker | 2014-08-21 11:41:51 +0000 |
commit | b87ba2186f8e7b6b0c6e7cfbd47a7604f69f17eb (patch) | |
tree | e4eabefefe10c7a5a027a8737dd0705a7060a8e0 | |
parent | 25f8355309a9eea23a2a0ca2210fe285d302a479 (diff) | |
download | eclipse.platform.team-b87ba2186f8e7b6b0c6e7cfbd47a7604f69f17eb.tar.gz eclipse.platform.team-b87ba2186f8e7b6b0c6e7cfbd47a7604f69f17eb.tar.xz eclipse.platform.team-b87ba2186f8e7b6b0c6e7cfbd47a7604f69f17eb.zip |
Bug 399960 - [Edit] Make merge arrow buttons easier to hit
Getting the arrow buttons ([>], [<]) to show up can be tricky because
one has to aim for a 5x5 pixel rectangle. The arrow buttons that show up
once the mouse is over the rectangle are bigger and easily clickable.
This change just increases the size of the mouse rectangle to that of
the buttons, which makes them much easier to use.
Bug: 399960
Change-Id: I29309e4a5aae0426d88c0763c80a758bbab1e2a5
Signed-off-by: Robin Stocker <robin@nibor.org>
-rw-r--r-- | bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java index 3492dbd31..ec80e01dc 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -15,6 +15,7 @@ * Matt McCutchen (hashproduct+eclipse@gmail.com) - Bug 191524 [Viewers] Synchronize horizontal scrolling by # characters, not % of longest line * Stephan Herrmann (stephan@cs.tu-berlin.de) - Bug 291695: Element compare fails to use source range * Robin Stocker (robin@nibor.org) - Bug 398594: [Edit] Enable center arrow buttons when editable and for both sides + * Robin Stocker (robin@nibor.org) - Bug 399960: [Edit] Make merge arrow buttons easier to hit *******************************************************************************/ package org.eclipse.compare.contentmergeviewer; @@ -2163,13 +2164,13 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable { if (Math.min(ly, ry) >= visibleHeight) break; - int cx= (w-RESOLVE_SIZE)/2; - int cy= ((ly+lh/2) + (ry+rh/2) - RESOLVE_SIZE)/2; - if (my >= cy && my < cy+RESOLVE_SIZE && mx >= cx && mx < cx+RESOLVE_SIZE) { + int SIZE= fIsCarbon ? 30 : 20; + int cx= (w-SIZE)/2; + int cy= ((ly+lh/2) + (ry+rh/2) - SIZE)/2; + if (my >= cy && my < cy+SIZE && mx >= cx && mx < cx+SIZE) { if (r != null) { - int SIZE= fIsCarbon ? 30 : 20; - r.x= cx+(RESOLVE_SIZE-SIZE)/2; - r.y= cy+(RESOLVE_SIZE-SIZE)/2; + r.x= cx; + r.y= cy; r.width= SIZE; r.height= SIZE; } |