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 179531 Details for
Bug 326162
Support the background-image CSS property for MenuItems
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]
proposed patch
326162_MenuItem_background_image_HEAD.patch (text/plain), 6.13 KB, created by
Istvan Ballok
on 2010-09-24 11:47:47 EDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Istvan Ballok
Created:
2010-09-24 11:47:47 EDT
Size:
6.13 KB
patch
obsolete
>commit d020a539182cb70093aafab589ee2072a310e57b >tree 69937368a2590f152ed9c57b9395b8714548335c >parent b2ec280b21de6abdf2779c315115f644fe651bba >author Istvan Ballok <Istvan.Ballok@cas.de> 1285342590 +0200 >committer Istvan Ballok <Istvan.Ballok@cas.de> 1285342590 +0200 > > 326162: demo > >diff --git a/runtime.ui/org.eclipse.rap.demo/plugin.xml b/runtime.ui/org.eclipse.rap.demo/plugin.xml >index d295893..e8a2216 100644 >--- a/runtime.ui/org.eclipse.rap.demo/plugin.xml >+++ b/runtime.ui/org.eclipse.rap.demo/plugin.xml >@@ -9,6 +9,10 @@ > id="org.eclipse.rap.demo.alttheme" > name="Alternative Demo Theme" > file="theme1/theme.css"/> >+ <themeContribution >+ file="theme2/theme.css" >+ themeId="org.eclipse.rap.rwt.theme.Default"> >+ </themeContribution> > </extension> > > <extension >diff --git a/runtime.ui/org.eclipse.rap.demo/src/org/eclipse/rap/demo/controls/ControlsDemo.java b/runtime.ui/org.eclipse.rap.demo/src/org/eclipse/rap/demo/controls/ControlsDemo.java >index 7f30b74..174a3ca 100644 >--- a/runtime.ui/org.eclipse.rap.demo/src/org/eclipse/rap/demo/controls/ControlsDemo.java >+++ b/runtime.ui/org.eclipse.rap.demo/src/org/eclipse/rap/demo/controls/ControlsDemo.java >@@ -56,6 +56,7 @@ public class ControlsDemo implements IEntryPoint { > ensureMinTabHeight( topFolder ); > > final ExampleTab[] tabs = new ExampleTab[] { >+ new MenuTab( topFolder ), > new ButtonTab( topFolder ), > // new RequestTab( topFolder ), > new CBannerTab( topFolder ), >diff --git a/runtime.ui/org.eclipse.rap.demo/src/org/eclipse/rap/demo/controls/MenuTab.java b/runtime.ui/org.eclipse.rap.demo/src/org/eclipse/rap/demo/controls/MenuTab.java >new file mode 100755 >index 0000000..26d1c28 >--- /dev/null >+++ b/runtime.ui/org.eclipse.rap.demo/src/org/eclipse/rap/demo/controls/MenuTab.java >@@ -0,0 +1,54 @@ >+/******************************************************************************* >+ * Copyright (c) 2002, 2009 Innoopract Informationssysteme GmbH. >+ * 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: >+ * Innoopract Informationssysteme GmbH - initial API and implementation >+ * EclipseSource - ongoing development >+ ******************************************************************************/ >+ >+package org.eclipse.rap.demo.controls; >+ >+import org.eclipse.rwt.lifecycle.WidgetUtil; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.custom.CTabFolder; >+import org.eclipse.swt.widgets.*; >+ >+public class MenuTab extends ExampleTab { >+ >+ >+ public MenuTab( final CTabFolder folder ) { >+ super( folder, "Menu" ); >+ } >+ >+ protected void createStyleControls( final Composite parent ) { >+ } >+ >+ protected void createExampleControls( final Composite parent ) { >+ // Set a context menu >+ Menu menu = new Menu( parent ); >+ MenuItem itemDefault = new MenuItem( menu, SWT.CASCADE ); >+ itemDefault.setMenu( new Menu( itemDefault ) ); >+ itemDefault.setText( "default" ); >+ for( int i = 0; i < 5; i++ ) { >+ MenuItem item = new MenuItem( itemDefault.getMenu(), SWT.PUSH ); >+ item.setText( "default Item " + ( i + 1 ) ); >+ } >+ >+ MenuItem itemFancy = new MenuItem( menu, SWT.CASCADE ); >+ itemFancy.setMenu( new Menu( itemFancy ) ); >+ itemFancy.setText( "fancy" ); >+ itemFancy.setData( WidgetUtil.CUSTOM_VARIANT, "fancy" ); >+ for( int i = 0; i < 5; i++ ) { >+ MenuItem item = new MenuItem( itemFancy.getMenu(), SWT.PUSH ); >+ item.setText( "fancy Item " + ( i + 1 ) ); >+ item.setData( WidgetUtil.CUSTOM_VARIANT, "fancy" ); >+ } >+ >+ parent.setMenu( menu ); >+ } >+ >+} >diff --git a/runtime.ui/org.eclipse.rap.demo/theme2/theme.css b/runtime.ui/org.eclipse.rap.demo/theme2/theme.css >new file mode 100755 >index 0000000..a6fc8bb >--- /dev/null >+++ b/runtime.ui/org.eclipse.rap.demo/theme2/theme.css >@@ -0,0 +1,7 @@ >+Menu.fancy { >+ border: 1px solid #B3C7E1; >+} >+ >+MenuItem.fancy:hover { >+ background-image: gradient(linear, left top, left bottom, from(#83ACDF), to(#608CCA) ); >+} >\ No newline at end of file > >commit b2ec280b21de6abdf2779c315115f644fe651bba >tree e7edfa3fe0287bcb3a0efec53cce15875784f754 >parent e5de6e65b5a223f15e8d9124ae11a82e32ba9e88 >author Istvan Ballok <Istvan.Ballok@cas.de> 1285342555 +0200 >committer Istvan Ballok <Istvan.Ballok@cas.de> 1285342555 +0200 > > 326162: Support the background-image CSS property for MenuItem > >diff --git a/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/theme/AppearancesBase.js b/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/theme/AppearancesBase.js >index d24fde6..a994901 100644 >--- a/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/theme/AppearancesBase.js >+++ b/runtime.rwt/org.eclipse.rap.rwt.q07/js/org/eclipse/swt/theme/AppearancesBase.js >@@ -562,7 +562,9 @@ qx.Theme.define( "org.eclipse.swt.theme.AppearancesBase", > var tv = new org.eclipse.swt.theme.ThemeValues( states ); > var result = { > spacing : 2, >- padding : [ 2, 4 ], >+ padding : [ 2, 4 ], >+ backgroundImage : tv.getCssImage( "MenuItem","background-image" ), >+ backgroundGradient : tv.getCssGradient("MenuItem", "background-image" ), > backgroundColor : tv.getCssColor( "MenuItem", "background-color" ), > height : states.bar ? "100%" : "auto", > opacity : tv.getCssFloat( "MenuItem", "opacity" ) >diff --git a/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/swt/internal/widgets/menukit/Menu.theme.xml b/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/swt/internal/widgets/menukit/Menu.theme.xml >index 5b646b4..51b2d5c 100644 >--- a/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/swt/internal/widgets/menukit/Menu.theme.xml >+++ b/runtime.rwt/org.eclipse.rap.rwt/src/org/eclipse/swt/internal/widgets/menukit/Menu.theme.xml >@@ -62,6 +62,9 @@ > <property name="background-color" > description="Background color" /> > >+ <property name="background-image" >+ description="Background image" /> >+ > <property name="opacity" > description="The opacity of the item. A value between 0 and 1." /> >
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 326162
: 179531