Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » RAP theming Menu Bar(not understanding the selector)
RAP theming Menu Bar [message #1245880] Fri, 14 February 2014 11:54
João Rebelo is currently offline João RebeloFriend
Messages: 28
Registered: December 2013
Junior Member
Hi,

We've been redrawing the Web Entry Point so that we can have a different toolbar and a more traditional Menu Bar.
After extending some internal classes the behavior was achieved and both are created.
My doubt is on the selector to use for styling the Menu Bar!
First it doesn't seem to be affected by "Menu" selector. Also seeing the generated ID it gives "w4" so not much of a clue there.
To go around this we've added a CUSTOM_VARIANT, and using as selector "*.mainMenuBar" we've been able to set the background-color / image.

So which selector should we be using for this Main Menu?

The menu is being generated as:

  protected void createMenubar(Composite theParent) {
    Menu menu = new Menu(theParent.getShell(), SWT.BAR);
    menu.setData(RWT.CUSTOM_VARIANT, VARIANT_MAIN_MENU_BAR);

    RwtMenuUtility.fillContextMenu(getScoutObject().getMenus(), getUiEnvironment(), menu);

    theParent.getShell().setMenuBar(menu);
  }


Current CSS:

*.mainMenuBar {	
	background-image: gradient(linear, left top, left bottom, from(#ffffff), color-stop(52%, #e0e0e0), to(#b0b0b0));
}


  • Attachment: mainMenu.jpg
    (Size: 12.44KB, Downloaded 164 times)

[Updated on: Fri, 14 February 2014 11:55]

Report message to a moderator

Previous Topic:How to rappresent XML in a tree field
Next Topic:Cannot Close Outline using OutlineViewButton
Goto Forum:
  


Current Time: Tue Mar 19 11:54:20 GMT 2024

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

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

Back to the top