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 175278 Details for
Bug 320784
[CSS] Classic styling issues
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]
Handler for setting selection background color
320784_part2_patch.txt (text/plain), 3.69 KB, created by
Bogdan Gheorghe
on 2010-07-26 18:18:01 EDT
(
hide
)
Description:
Handler for setting selection background color
Filename:
MIME Type:
Creator:
Bogdan Gheorghe
Created:
2010-07-26 18:18:01 EDT
Size:
3.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.e4.ui.css.swt >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.css.swt/plugin.xml,v >retrieving revision 1.1 >diff -u -r1.1 plugin.xml >--- plugin.xml 30 Jun 2010 13:51:18 -0000 1.1 >+++ plugin.xml 26 Jul 2010 22:16:48 -0000 >@@ -299,6 +299,14 @@ > name="unselected-image-visible"> > </property-name> > </handler> >+ <handler >+ adapter="org.eclipse.e4.ui.css.swt.dom.CTabFolderElement" >+ composite="false" >+ handler="org.eclipse.e4.ui.css.swt.properties.custom.CSSPropertySelectedTabsSWTHandler"> >+ <property-name >+ name="selected-tabs-background"> >+ </property-name> >+ </handler> > </extension> > > >Index: src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertySelectedTabsSWTHandler.java >=================================================================== >RCS file: src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertySelectedTabsSWTHandler.java >diff -N src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertySelectedTabsSWTHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/e4/ui/css/swt/properties/custom/CSSPropertySelectedTabsSWTHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,53 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 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 http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.e4.ui.css.swt.properties.custom; >+ >+import org.eclipse.e4.ui.widgets.CTabFolder; >+import org.eclipse.e4.ui.widgets.CTabFolderRenderer; >+ >+import java.lang.reflect.Method; >+ >+import org.eclipse.e4.core.contexts.ContextInjectionFactory; >+import org.eclipse.e4.core.contexts.IEclipseContext; >+import org.eclipse.e4.ui.css.core.dom.properties.Gradient; >+import org.eclipse.e4.ui.css.core.dom.properties.ICSSPropertyHandler; >+import org.eclipse.e4.ui.css.core.engine.CSSEngine; >+import org.eclipse.e4.ui.css.swt.helpers.CSSSWTColorHelper; >+import org.eclipse.e4.ui.css.swt.properties.AbstractCSSPropertySWTHandler; >+import org.eclipse.swt.graphics.Color; >+import org.eclipse.swt.widgets.Control; >+import org.w3c.dom.css.CSSValue; >+ >+public class CSSPropertySelectedTabsSWTHandler extends AbstractCSSPropertySWTHandler { >+ >+ >+ public static final ICSSPropertyHandler INSTANCE = new CSSPropertySelectedTabsSWTHandler(); >+ >+ @Override >+ protected void applyCSSProperty(Control control, String property, >+ CSSValue value, String pseudo, CSSEngine engine) throws Exception { >+ if (!(control instanceof CTabFolder)) return; >+ if (value.getCssValueType() == CSSValue.CSS_VALUE_LIST) { >+ Gradient grad = (Gradient) engine.convert(value, Gradient.class, control.getDisplay()); >+ CTabFolder folder = ((CTabFolder) control); >+ Color[] colors = CSSSWTColorHelper.getSWTColors(grad, folder.getDisplay(), engine); >+ int[] percents = CSSSWTColorHelper.getPercents(grad); >+ folder.setSelectionBackground(colors, percents, true); >+ } >+ } >+ >+ >+ @Override >+ protected String retrieveCSSProperty(Control control, String property, >+ String pseudo, CSSEngine engine) throws Exception { >+ // TODO Auto-generated method stub >+ return null; >+ } >+ >+}
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 320784
:
175271
| 175278 |
175279
|
175282