maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   Dev question (https://talk.maemo.org/showthread.php?t=86325)

optimaxxx 2012-08-26 19:23

Dev question
 
http://harmattan-dev.nokia.com/docs/...ation_view.png

Some simple questions i just cannot find the answer to!

How do I change colour of the toolbar (4)?

Is it possible for me to create some kind of theme that would simultaneously handle colours of my whole app (2-4)?

And lastly, how do I show the status bar (1)?

thanks!

optimaxxx 2012-08-28 14:04

Re: Dev question
 
Nobody?

this is really starting to bug me :/

rash.m2k 2012-08-28 14:42

Re: Dev question
 
You can change the colours, enable developer mode on your phone and install the examples you can change the various colours using the menu.

The source code for this is here:

http://qt.gitorious.org/qt-component...s/trees/master

under examples/meego

see: http://qt.gitorious.org/qt-component...y/qml/main.qml

See the Menu {......} item

Quote:

Originally Posted by optimaxxx (Post 1255978)
How do I change colour of the toolbar (4)?

I think you can only have black or white - but I'm not sure.

Quote:

Originally Posted by optimaxxx (Post 1255978)
Is it possible for me to create some kind of theme that would simultaneously handle colours of my whole app (2-4)?

Yes.

Quote:

Originally Posted by optimaxxx (Post 1255978)
And lastly, how do I show the status bar (1)?

Not sure maybe a dbus call.

gionni88 2012-08-28 16:40

Re: Dev question
 
I guess we are talking about qml plugins, and not meego touch framework.

Toolbar only has two colours, one for light theme and one for the dark one. Only one toolbar element is instanced within the PageStack element, and it provides animations when changing page. Considering everything in qml is an "Item" element, you may create your own toolbar and put ToolIcons there if you need more customization.

Theming your app is a bit time consuming. One option is to have a myTheme alias which binds to the current theme, which has to be a QtObject (or a QObject, don't remember how they are called in qml) which contains your values, like buttonsWidth, buttonGradientStartColour etc. Than your custom components just need to have their themable values binded to your alias, like width: myTheme.buttonWidth. When you need to change theme just change myTheme alias and all the customized components will switch theme accordly.
Something in case you don't know, there are 19 colour themes for Meego components. Usage of themes is not directly possible in qml, you need to extend current components changing their images urls.

A status bar is already instanced within a PageStack element, otherwise you can create one using Meego components.

rash.m2k 2012-08-28 16:49

Re: Dev question
 
gionni88 It is possible to change the themes directly from QML see the second link in my post.

gionni88 2012-08-29 07:40

Re: Dev question
 
Quote:

Originally Posted by rash.m2k (Post 1256827)
gionni88 It is possible to change the themes directly from QML see the second link in my post.

Thanks, didn't know it was finally included as default.

EDIT: do you know in which PR this feature was included?

rash.m2k 2012-08-29 07:54

Re: Dev question
 
Quote:

Originally Posted by gionni88 (Post 1257099)
Thanks, didn't know it was finally included as default.

EDIT: do you know in which PR this feature was included?

I'm not sure, but I think it was there in PR1.2 as I did have these examples installed.

qwazix 2012-08-29 09:17

Re: Dev question
 
The annoying thing is that the command to change theme universally breaks simulator and ovi store support. By the way does anyone know how to include pr1.2 qt components in simulator?

rash.m2k 2012-08-29 10:09

Re: Dev question
 
Quote:

Originally Posted by qwazix (Post 1257125)
The annoying thing is that the command to change theme universally breaks simulator and ovi store support. By the way does anyone know how to include pr1.2 qt components in simulator?

Download and open the qt components examples from the first link I gave, they seem to work very well in the simulator, but I've not tried changing themes.

Using the qt update thing you can say include PR1.2 runtime which should include PR1.2 stuff.

Or you can say import com.nokia.meego 1.0 instead of 1.1 for PR1.2


All times are GMT. The time now is 23:50.

vBulletin® Version 3.8.8