Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » MenuBar background color
MenuBar background color [message #676711] Mon, 06 June 2011 09:32 Go to next message
Jens  is currently offline Jens Friend
Messages: 13
Registered: March 2011
Junior Member
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 12:54 Go to previous messageGo to next message
Jens  is currently offline Jens Friend
Messages: 13
Registered: March 2011
Junior Member
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 16: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 20:33 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

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 21:20 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

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 10:40 Go to previous messageGo to next message
Anatoliy Pogorelov is currently offline Anatoliy PogorelovFriend
Messages: 10
Registered: April 2013
Junior Member
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 354 times)
Re: MenuBar background color [message #1032001 is a reply to message #1031196] Tue, 02 April 2013 13:04 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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 05:22 Go to previous messageGo to next message
Anatoliy Pogorelov is currently offline Anatoliy PogorelovFriend
Messages: 10
Registered: April 2013
Junior Member
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 17:00 Go to previous messageGo to next message
Milko Krastev is currently offline Milko KrastevFriend
Messages: 17
Registered: July 2013
Junior Member
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 17:38 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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 12:58 Go to previous messageGo to next message
Milko Krastev is currently offline Milko KrastevFriend
Messages: 17
Registered: July 2013
Junior Member
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 13:24 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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 14:59 Go to previous messageGo to next message
Milko Krastev is currently offline Milko KrastevFriend
Messages: 17
Registered: July 2013
Junior Member
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 10:26 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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 13:51 Go to previous message
kirankumar B S is currently offline kirankumar B SFriend
Messages: 36
Registered: July 2015
Member
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: Tue Mar 19 07:32:55 GMT 2024

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

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

Back to the top