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 129494 Details for
Bug 269563
BranchRender Code makes an exception for carbon osx platform regarding linestyles that is no longer necessary
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Removed OSX Specific code to avoid custom line style
BranchRenderOSXpatch.txt (text/plain), 2.90 KB, created by
Jake fisher
on 2009-03-20 15:07:25 EDT
(
hide
)
Description:
Removed OSX Specific code to avoid custom line style
Filename:
MIME Type:
Creator:
Jake fisher
Created:
2009-03-20 15:07:25 EDT
Size:
2.90 KB
patch
obsolete
>Index: src/org/eclipse/nebula/widgets/grid/internal/BranchRenderer.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.swt.nebula/org.eclipse.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/BranchRenderer.java,v >retrieving revision 1.1 >diff -u -r1.1 BranchRenderer.java >--- src/org/eclipse/nebula/widgets/grid/internal/BranchRenderer.java 7 Jan 2008 21:06:16 -0000 1.1 >+++ src/org/eclipse/nebula/widgets/grid/internal/BranchRenderer.java 20 Mar 2009 18:55:33 -0000 >@@ -102,8 +102,6 @@ > */ > public void paint(GC gc, Object value) { > Rectangle bounds = getBounds(); >- //SWT does not appear to render custom line styles on carbon, so we use solid lines instead >- boolean isCarbon = SWT.getPlatform().equals("carbon"); > > int xLeft = bounds.x; > int yTop = bounds.y - 1; >@@ -124,34 +122,32 @@ > > int dy = bounds.y % 2; > >- if (!isCarbon) { >- // Set line style to dotted >- gc.setLineDash(LINE_STYLE); >- >- // Adjust line positions by a few pixels to create correct effect >- yToggleTop --; >- yTop ++; >- yToggleBottom ++; >- >- // Adjust full height >- // If height is even, we shorten to an odd number of pixels, and start at the original y offset >- if (bounds.height % 2 == 0) { >- yBottom -= 1; >- } >- // If height is odd, we alternate based on the row offset >- else { >- yTop += dy; >- yBottom -= dy; >- } >+ // Set line style to dotted >+ gc.setLineDash(LINE_STYLE); >+ >+ // Adjust line positions by a few pixels to create correct effect >+ yToggleTop --; >+ yTop ++; >+ yToggleBottom ++; >+ >+ // Adjust full height >+ // If height is even, we shorten to an odd number of pixels, and start at the original y offset >+ if (bounds.height % 2 == 0) { >+ yBottom -= 1; >+ } >+ // If height is odd, we alternate based on the row offset >+ else { >+ yTop += dy; >+ yBottom -= dy; >+ } > >- // Adjust ascender and descender >- yToggleBottom += dy; >+ // Adjust ascender and descender >+ yToggleBottom += dy; > >- if ((yToggleTop - yTop + 1) % 2 == 0) >- yToggleTop -= 1; >- if ((yToggleBottom - yBottom + 1) % 2 == 0) >- yToggleBottom += dy == 1 ? -1 : 1; >- } >+ if ((yToggleTop - yTop + 1) % 2 == 0) >+ yToggleTop -= 1; >+ if ((yToggleBottom - yBottom + 1) % 2 == 0) >+ yToggleBottom += dy == 1 ? -1 : 1; > > for (int i = 0; i < branches.length; i++) { > // Calculate offsets for this branch >@@ -161,19 +157,17 @@ > int xToggleRight = xLeft + toggleBounds.width; > > int dx = 0; >- if (!isCarbon) { >- xRight --; >- xMiddleBranch += 2; >- xToggleRight --; >- >- if (indent % 2 == 0) { >- xRight -= 1; >- } >- else { >- dx = xLeft % 2; >- xLeft += dx; >- xRight -= dx; >- } >+ xRight --; >+ xMiddleBranch += 2; >+ xToggleRight --; >+ >+ if (indent % 2 == 0) { >+ xRight -= 1; >+ } >+ else { >+ dx = xLeft % 2; >+ xLeft += dx; >+ xRight -= dx; > } > > // Render line segments
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
Flags:
tom.schindl
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 269563
: 129494