2
votes

When I run webide project in UI5, it use sap_bluecrystal theme(webapp/resources/sap/ui/core/themes/sap_bluecrystal/library.css), but when I register my project to Fiori Launchpad of Portal Service, the theme changed to sap_belize.(resources/sap/fiori/themes/sap_belize/library.css?version=1.44.11&sap-ui-dist-version=1.44.11)

I want the theme to be consistent, I changed the manifest.json but it did not work:

"sap.ui": {
    "supportedThemes": [
        "sap_belize"
    ]
}

And in Project Settings -> SAPUI5, it can only change UI5 versions, not theme.

2
Actually, it is mentioned in ui5 doc: openui5.hana.ondemand.com/#docs/guide/…, but the component-based app template confused me. Thanks to @loki, I located that index html file in test/flpSandbox.htmlTina Chen

2 Answers

2
votes

You can even force the app to load the theme with this code

sap.ui.getCore().applyTheme("sap_belize"); 

Initialise this either in component.js or the initial view onInit method.

1
votes

Are you mentioning the theme while bootstrapping as follows:

<script id="sap-ui-bootstrap" 
            src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"         
            data-sap-ui-theme="sap_bluecrystal" ... > </script>

Maybe this can help it become consistent.