Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to change background style when loading home page(RAP 2.3.2)
How to change background style when loading home page [message #1752757] Thu, 26 January 2017 21:57 Go to next message
Tass Burrfoot is currently offline Tass BurrfootFriend
Messages: 19
Registered: April 2015
Junior Member
Hello

The following code is taken from the RAP Example demo application

public void configure( Application application ) {
    Map<String, String> properties = new HashMap<String, String>();
    properties.put( WebClient.PAGE_TITLE, "RAP Examples" );
    properties.put( WebClient.BODY_HTML, readTextFromResource( "resources/body.html", "UTF-8" ) );
    properties.put( WebClient.HEAD_HTML, readTextFromResource( "resources/head.html", "UTF-8" ) );
    properties.put( WebClient.FAVICON, "icons/favicon.png" );
    application.setOperationMode( OperationMode.SWT_COMPATIBILITY );
    application.addEntryPoint( "/", MainUi.class, properties );
    application.addStyleSheet( RWT.DEFAULT_THEME_ID, "theme/theme.css" );
    application.addResource( "icons/favicon.png", createResourceLoader( "icons/favicon.png" ) );
    application.addResource( "icons/loading.gif", createResourceLoader( "icons/loading.gif" ) );
    registerClientScriptingResources( application );
  }


This generates the following background color and dynamic gif when home page is loading:
index.php/fa/28239/0/

Is there any way to change the gray like background color? I tried to set custom theme in EntryPoint.createShell(Display) like this

@Override
	protected Shell createShell(Display display) {
		Shell shell = super.createShell(display);
		shell.setData(RWT.CUSTOM_VARIANT, "application");
		return shell;
	}


That's not working. I tried to set the theme on the display object and it is not working either. What is the correct way to handle this? Thanks
Re: How to change background style when loading home page [message #1752772 is a reply to message #1752757] Fri, 27 January 2017 07:42 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
the gray background is themeable. See [1] -> Display#background-image.

[1] http://download.eclipse.org/rt/rap/doc/3.1/guide/reference/theming/Widget.html

HTH,
Ivan
Previous Topic:Sending Data to RAP Application
Next Topic:Eclipse RAP - UI-Session vs Http-Session
Goto Forum:
  


Current Time: Thu Apr 25 15:33:55 GMT 2024

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

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

Back to the top