Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » RAP theming Menu Bar(not understanding the selector)
RAP theming Menu Bar [message #1245880] Fri, 14 February 2014 06:54
João Rebelo is currently offline João Rebelo
Messages: 21
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 36 times)

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

Report message to a moderator

Previous Topic:How to rappresent XML in a tree field
Next Topic:Using different view-sets (perspectives)
Goto Forum:
  


Current Time: Thu Apr 17 11:44:54 EDT 2014

Powered by FUDForum. Page generated in 0.02427 seconds