Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » MenuBar background color
MenuBar background color [message #676711] Mon, 06 June 2011 05:32 Go to next message
Eclipse UserFriend
Hi,

how can I change the background color of a Menubar ?. I can change the color of a MenuItem and the Menu itself with CSS but not in the menubar. I have always a white background.

Best Regards,

Jens
Re: MenuBar background color [message #693887 is a reply to message #676711] Thu, 07 July 2011 08:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

is there no way to change the background color of the MenuBar ?.

Regards,

Jens
Re: MenuBar background color [message #694017 is a reply to message #693887] Thu, 07 July 2011 12:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by:

Jens,

you can use theming to change the background color. Somthing like this
should do:
Menu[BAR] {
background-color: red;
}

HTH
Rüdiger

On 07.07.2011 14:54, Jens wrote:
> Hi,
>
> is there no way to change the background color of the MenuBar ?.
>
> Regards,
>
> Jens

--
Rüdiger Herrmann

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: MenuBar background color [message #694114 is a reply to message #693887] Thu, 07 July 2011 16:33 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jens,

I think you're right. The menu bar takes on the background color of the
Shell. If you need to change it, please file an enhancement request.

Regards, Ralf


--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: MenuBar background color [message #694128 is a reply to message #694017] Thu, 07 July 2011 17:20 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

> you can use theming to change the background color. Somthing like this
> should do:
> Menu[BAR] {
> background-color: red;
> }

I doubt that this would work because the style "BAR" is not defined in
the theming definition for Menu. Am I missing something?

Regards, Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: MenuBar background color [message #1031196 is a reply to message #676711] Mon, 01 April 2013 06:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi, in my RAP aplication (RAP 2.0) I'm create menu by use next extension-point
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu">
<menu
label="File">
<command
commandId="org.eclipse.ui.file.exit"
label="Exit">
</command>
</menu>
</menuContribution>
</extension>

then in my css theming use next

MenuItem {
background-color: gray;
}
Shell {
background-color: gray;
}
and get next menu picture.jpg
How I can set background color for all menu?

Thanks, Anatoliy

  • Attachment: picture.JPG
    (Size: 10.66KB, Downloaded 412 times)
Re: MenuBar background color [message #1032001 is a reply to message #1031196] Tue, 02 April 2013 09:04 Go to previous messageGo to next message
Eclipse UserFriend
Hi Anatoliy,
the menu bar is a Menu. You could try:

Menu {
background-color: gray;
}

HTH,
Ivan

On 4/2/2013 3:47 PM, Anatoliy Pogorelov wrote:
> Hi, in my RAP aplication (RAP 2.0) I'm create menu by use next extension-point
> <extension
> point="org.eclipse.ui.menus">
> <menuContribution
> locationURI="menu:org.eclipse.ui.main.menu">
> <menu
> label="File">
> <command
> commandId="org.eclipse.ui.file.exit"
> label="Exit">
> </command>
> </menu>
> </menuContribution>
> </extension>
>
> then in my css theming use next
>
> MenuItem {
> background-color: gray;
> }
> Shell {
> background-color: gray;
> }
> and get next menu picture.jpg
> How I can set background color for all menu?
>
> Thanks, Anatoliy
>
>

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: MenuBar background color [message #1032527 is a reply to message #1032001] Wed, 03 April 2013 01:22 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
In my case it work:
Toolbar{
background-color: gray;
}

Thanks, Anatoliy
Re: MenuBar background color [message #1084491 is a reply to message #676711] Sun, 11 August 2013 13:00 Go to previous messageGo to next message
Eclipse UserFriend
I bumped into the same problem. None of the suggestions works. Menubar stays white and that is. Is there any workaround?
Re: MenuBar background color [message #1084510 is a reply to message #1084491] Sun, 11 August 2013 13:38 Go to previous messageGo to next message
Eclipse UserFriend
Hi Milko,
which RAP version are you using? Do you have custom theme? Are you using
business/fancy theme? Could you post some snippets that demonstrate the
issue?
Best,
Ivan

On 8/11/2013 8:00 PM, Milko Krastev wrote:
> I bumped into the same problem. None of the suggestions works. Menubar
> stays white and that is. Is there any workaround?

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: MenuBar background color [message #1085100 is a reply to message #676711] Mon, 12 August 2013 08:58 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ivan,

The issue is rather simple - when you change background color of a menu via

Menu {
background-color : #888888;
}

in the CSS file, the background of the menubar (the top level menu) stays white. I've tried to override the getBackground method of the parent shell, as Ralph suggested Menu retrieves its color from its parent's background. However, this does not work.


The only workaround I've come up with so far is appending a dummy menu at the end of the menubar with sufficiently long text and with appropriate CSS settings (font and background color the same, no change on hover, and disabled). This "solution" is rather ugly and a simple CSS setting affecting Menu with style BAR (that would be the menubar in question) is the perfect solution.
Re: MenuBar background color [message #1085116 is a reply to message #1085100] Mon, 12 August 2013 09:24 Go to previous messageGo to next message
Eclipse UserFriend
Hi Milko,
as already mentioned in the thread the menu bar styling is bound to...
toolbar (???!!! we really have to fix this). The following snippet works
for me and changes the background color of the menu bar:
ToolBar {
background-color : #888888;
}
Please open a bugzilla about this issue.
Thanks,
Ivan

On 8/12/2013 3:58 PM, Milko Krastev wrote:
> Hi Ivan,
>
> The issue is rather simple - when you change background color of a
> menu via
> Menu {
> background-color : #888888;
> }
>
> in the CSS file, the background of the menubar (the top level menu)
> stays white. I've tried to override the getBackground method of the
> parent shell, as Ralph suggested Menu retrieves its color from its
> parent's background. However, this does not work.
>
> The only workaround I've come up with so far is appending a dummy menu
> at the end of the menubar with sufficiently long text and with
> appropriate CSS settings (font and background color the same, no
> change on hover, and disabled). This "solution" is rather ugly and a
> simple CSS setting affecting Menu with style BAR (that would be the
> menubar in question) is the perfect solution.

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: MenuBar background color [message #1085174 is a reply to message #1085116] Mon, 12 August 2013 10:59 Go to previous messageGo to next message
Eclipse UserFriend
Hmmm ... you are right! The first time I must have typed Toolbar instead of ToolBar and that's why it didn't work. Problem solved. Thanks a lot for the help!
Re: MenuBar background color [message #1085757 is a reply to message #1085174] Tue, 13 August 2013 06:26 Go to previous messageGo to next message
Eclipse UserFriend
I've opened a bugzilla:
414950: [Theming][Menu] Client-side menu bar appearance is bound to
"toolbar"
https://bugs.eclipse.org/bugs/show_bug.cgi?id=414950
Best,
Ivan

On 8/12/2013 5:59 PM, Milko Krastev wrote:
> Hmmm ... you are right! The first time I must have typed Toolbar
> instead of ToolBar and that's why it didn't work. Problem solved.
> Thanks a lot for the help!

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: MenuBar background color [message #1709453 is a reply to message #1085757] Mon, 28 September 2015 09:51 Go to previous message
Eclipse UserFriend
Hello All,
I am trying css for my rcp 3.7 application and i am using eclipse indigo IDE.

But below approach is not working for me. Need Help.

below is my plug-in:

<extension
id="productId"
point="org.eclipse.core.runtime.products">
<product
application="myApp.perspective.application"
name="RCP App">
<property
name="appName"
value="RCP App">
</property>
<property
name="applicationCSS"
value="platform:/config/default.css">
</property>
</product>
</extension>

CSS:-

@CHARSET "ISO-8859-1";

MenuItem {
background-color: red;
}

Menu[BAR] {
background-color: red;
}

CTabItem, Label, Tree, Text {
font-family: "Arial";
}

Shell {
font-size: 12;
background-color: red;
}

CTabItem, ToolBar, Button, CBanner, CoolBar {
font-size: 9;
background-color: red;
}

CTabFolder, CTabItem {
background-color: #F0F1F7;
}
Previous Topic:(no subject)
Next Topic:Make configuration button visible by default in Fancy LAF
Goto Forum:
  


Current Time: Fri Jul 04 00:43:41 EDT 2025

Powered by FUDForum. Page generated in 0.08158 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top