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 61987 Details for
Bug 179292
[TabbedProperties] Need to adapt new forms look
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
179292 Need to adopt new forms look.txt (text/plain), 9.62 KB, created by
Anthony Hunter
on 2007-03-26 12:22:45 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Anthony Hunter
Created:
2007-03-26 12:22:45 EDT
Size:
9.62 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.views.properties.tabbed >Index: src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyTitle.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyTitle.java,v >retrieving revision 1.1 >diff -u -r1.1 TabbedPropertyTitle.java >--- src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyTitle.java 17 Apr 2006 19:03:55 -0000 1.1 >+++ src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyTitle.java 26 Mar 2007 16:17:07 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2001, 2006 IBM Corporation and others. >+ * Copyright (c) 2001, 2007 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 >@@ -25,7 +25,7 @@ > import org.eclipse.swt.layout.FormLayout; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Shell; >-import org.eclipse.ui.forms.FormColors; >+import org.eclipse.ui.forms.IFormColors; > import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants; > import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory; > >@@ -46,16 +46,6 @@ > > private static final String BLANK = ""; //$NON-NLS-1$ > >- /** >- * Width of the margin that will be added around the control. >- */ >- public int marginWidth = 4; >- >- /** >- * Height of the margin that will be added around the control. >- */ >- public int marginHeight = 4; >- > private TabbedPropertySheetWidgetFactory factory; > > /** >@@ -94,10 +84,11 @@ > > label = factory.createCLabel(this, BLANK); > label.setBackground(new Color[] { >- factory.getColors().getColor(FormColors.TB_BG), >- factory.getColors().getColor(FormColors.TB_GBG)}, new int[] {100}, >- true); >- label.setFont(JFaceResources.getBannerFont()); >+ factory.getColors().getColor(IFormColors.H_GRADIENT_END), >+ factory.getColors().getColor(IFormColors.H_GRADIENT_START) }, >+ new int[] { 100 }, true); >+ label.setFont(JFaceResources.getHeaderFont()); >+ label.setForeground(factory.getColors().getColor(IFormColors.TITLE)); > FormData data = new FormData(); > data.left = new FormAttachment(0, 0); > data.top = new FormAttachment(0, 0); >@@ -115,50 +106,33 @@ > * @param e > */ > protected void drawTitleBackground(PaintEvent e) { >- Color bg = factory.getColors().getColor(FormColors.TB_BG); >- Color gbg = factory.getColors().getColor(FormColors.TB_GBG); >- Color border = factory.getColors().getColor(FormColors.TB_BORDER); > Rectangle bounds = getClientArea(); >- Point tsize = null; >- Point labelSize = null; >- int twidth = bounds.width - marginWidth - marginWidth; >- if (label != null) { >- labelSize = label.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); >- } >- if (labelSize != null) { >- twidth -= labelSize.x + 4; >- } >- int tvmargin = 4; >- int theight = getHeight(); >- if (tsize != null) { >- theight += Math.max(theight, tsize.y); >- } >- if (labelSize != null) { >- theight = Math.max(theight, labelSize.y); >- } >- theight += tvmargin + tvmargin; >- int midpoint = (theight * 66) / 100; >- int rem = theight - midpoint; >+ label.setBackground(new Color[] { >+ factory.getColors().getColor(IFormColors.H_GRADIENT_END), >+ factory.getColors().getColor(IFormColors.H_GRADIENT_START) }, >+ new int[] { 100 }, true); >+ Color bg = factory.getColors().getColor(IFormColors.H_GRADIENT_END); >+ Color gbg = factory.getColors().getColor(IFormColors.H_GRADIENT_START); > GC gc = e.gc; > gc.setForeground(bg); > gc.setBackground(gbg); >- gc.fillGradientRectangle(marginWidth, marginHeight, bounds.width - 1 >- - marginWidth - marginWidth, midpoint - 1, true); >- gc.setForeground(gbg); >- gc.setBackground(getBackground()); >- gc.fillGradientRectangle(marginWidth, marginHeight + midpoint - 1, >- bounds.width - 1 - marginWidth - marginWidth, rem - 1, true); >- gc.setForeground(border); >- gc.drawLine(marginWidth, marginHeight + 2, marginWidth, marginHeight >- + theight - 1); >- gc.drawLine(marginWidth, marginHeight + 2, marginWidth + 2, >- marginHeight); >- gc.drawLine(marginWidth + 2, marginHeight, bounds.width - marginWidth >- - 3, marginHeight); >- gc.drawLine(bounds.width - marginWidth - 3, marginHeight, bounds.width >- - marginWidth - 1, marginHeight + 2); >- gc.drawLine(bounds.width - marginWidth - 1, marginHeight + 2, >- bounds.width - marginWidth - 1, marginHeight + theight - 1); >+ gc.fillGradientRectangle(bounds.x, bounds.y, bounds.width, >+ bounds.height, true); >+ // background bottom separator >+ if (factory.getColors().getColor(IFormColors.H_BOTTOM_KEYLINE1) != null) >+ gc.setForeground(factory.getColors().getColor( >+ IFormColors.H_BOTTOM_KEYLINE1)); >+ else >+ gc.setForeground(getBackground()); >+ gc.drawLine(bounds.x, bounds.height - 2, bounds.x + bounds.width - 1, >+ bounds.height - 2); >+ if (factory.getColors().getColor(IFormColors.H_BOTTOM_KEYLINE2) != null) >+ gc.setForeground(factory.getColors().getColor( >+ IFormColors.H_BOTTOM_KEYLINE2)); >+ else >+ gc.setForeground(getForeground()); >+ gc.drawLine(bounds.x, bounds.height - 1, bounds.x + bounds.width - 1, >+ bounds.height - 1); > } > > /** >Index: src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyComposite.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyComposite.java,v >retrieving revision 1.1 >diff -u -r1.1 TabbedPropertyComposite.java >--- src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyComposite.java 17 Apr 2006 19:03:55 -0000 1.1 >+++ src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyComposite.java 26 Mar 2007 16:17:07 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2001, 2006 IBM Corporation and others. >+ * Copyright (c) 2001, 2007 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 >@@ -112,6 +112,16 @@ > * Create the contents in the main composite. > */ > protected void createMainContents() { >+ if (displayTitle) { >+ title = new TabbedPropertyTitle(mainComposite, factory); >+ >+ FormData data = new FormData(); >+ data.left = new FormAttachment(0, 0); >+ data.right = new FormAttachment(100, 0); >+ data.top = new FormAttachment(0, 0); >+ title.setLayoutData(data); >+ } >+ > leftComposite = factory.createComposite(mainComposite, SWT.NO_FOCUS); > leftComposite.setLayout(new FormLayout()); > >@@ -122,26 +132,29 @@ > FormData formData = new FormData(); > formData.left = new FormAttachment(leftComposite, 0); > formData.right = new FormAttachment(100, 0); >- formData.top = new FormAttachment(0, 0); >+ if (displayTitle) { >+ formData.top = new FormAttachment(title, 0); >+ } else { >+ formData.top = new FormAttachment(0, 0); >+ } > formData.bottom = new FormAttachment(100, 0); > scrolledComposite.setLayoutData(formData); > > formData = new FormData(); > formData.left = new FormAttachment(0, 0); > formData.right = new FormAttachment(scrolledComposite, 0); >- formData.top = new FormAttachment(0, 0); >+ if (displayTitle) { >+ formData.top = new FormAttachment(title, 0); >+ } else { >+ formData.top = new FormAttachment(0, 0); >+ } > formData.bottom = new FormAttachment(100, 0); > leftComposite.setLayoutData(formData); > >- final Composite rightComposite = factory.createComposite(scrolledComposite, >- SWT.NO_FOCUS); >- rightComposite.setLayout(new FormLayout()); >- FormLayout formLayout = new FormLayout(); >- formLayout.marginHeight = 0; >- formLayout.marginWidth = 0; >- rightComposite.setLayout(formLayout); >+ tabComposite = factory.createComposite(scrolledComposite, SWT.NO_FOCUS); >+ tabComposite.setLayout(new FormLayout()); > >- scrolledComposite.setContent(rightComposite); >+ scrolledComposite.setContent(tabComposite); > scrolledComposite.setAlwaysShowScrollBars(false); > scrolledComposite.setExpandVertical(true); > scrolledComposite.setExpandHorizontal(true); >@@ -154,29 +167,10 @@ > formData.bottom = new FormAttachment(100, 0); > listComposite.setLayoutData(formData); > >- if (displayTitle) { >- title = new TabbedPropertyTitle(rightComposite, factory); >- } >- >- tabComposite = factory.createComposite(rightComposite, SWT.NO_FOCUS); >- tabComposite.setLayout(new FormLayout()); >- >- if (displayTitle) { >- FormData data = new FormData(); >- data.left = new FormAttachment(0, 0); >- data.right = new FormAttachment(100, 0); >- data.top = new FormAttachment(0, 0); >- title.setLayoutData(data); >- } >- > FormData data = new FormData(); > data.left = new FormAttachment(0, 0); > data.right = new FormAttachment(100, 0); >- if (displayTitle) { >- data.top = new FormAttachment(title, 0); >- } else { >- data.top = new FormAttachment(0, 0); >- } >+ data.top = new FormAttachment(0, 0); > data.bottom = new FormAttachment(100, 0); > tabComposite.setLayoutData(data); >
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 Raw
Actions:
View
Attachments on
bug 179292
: 61987 |
63397
|
63411
|
63412
|
63415