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 76053 Details for
Bug 188081
ScrollBar rendered incorrectly when the range model contains large numbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to increase range of scrollbar values
ScrollBar_ScrollBarLayout_patch.txt (text/plain), 1.66 KB, created by
Matt Scarpino
on 2007-08-14 11:44:17 EDT
(
hide
)
Description:
Patch to increase range of scrollbar values
Filename:
MIME Type:
Creator:
Matt Scarpino
Created:
2007-08-14 11:44:17 EDT
Size:
1.66 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.draw2d >Index: src/org/eclipse/draw2d/ScrollBarLayout.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.draw2d/src/org/eclipse/draw2d/ScrollBarLayout.java,v >retrieving revision 1.9 >diff -u -r1.9 ScrollBarLayout.java >--- src/org/eclipse/draw2d/ScrollBarLayout.java 30 Mar 2005 21:27:45 -0000 1.9 >+++ src/org/eclipse/draw2d/ScrollBarLayout.java 13 Aug 2007 07:41:07 -0000 >@@ -112,8 +112,8 @@ > if (thumb != null) > thumb.setVisible(trackBounds.height > thumbHeight); > >- int thumbY = trackBounds.y + (trackBounds.height - thumbHeight) >- * (scrollBar.getValue() - min) / valueRange; >+ int thumbY = trackBounds.y + Math.round((trackBounds.height - thumbHeight) >+ * ((scrollBar.getValue() - min) / (float)valueRange)); > > Rectangle thumbBounds = new Rectangle( > trackBounds.x, >Index: src/org/eclipse/draw2d/ScrollBar.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.gef/plugins/org.eclipse.draw2d/src/org/eclipse/draw2d/ScrollBar.java,v >retrieving revision 1.12 >diff -u -r1.12 ScrollBar.java >--- src/org/eclipse/draw2d/ScrollBar.java 30 Mar 2005 21:27:44 -0000 1.12 >+++ src/org/eclipse/draw2d/ScrollBar.java 13 Aug 2007 07:41:07 -0000 >@@ -628,7 +628,7 @@ > if (!armed) > return; > Dimension difference = transposer.t(me.getLocation().getDifference(start)); >- int change = getValueRange() * difference.height / dragRange; >+ int change = Math.round(difference.height * (getValueRange()/(float)dragRange)); > setValue(revertValue + change); > me.consume(); > }
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 188081
:
67973
| 76053