QML Highlight Color in Harmattan
-
I'm still learning about QML, I was wondering how can I apply a highlight color to my application, I have search for examples but I found nothing, this link provides info about where you can use a highlight color, but it doesn't provide technical information about how can you do this, I think there are 15 or 19 themes in n9, I hope you can share a working example, thanks!
-
Hi,
take a look "here":http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-componentlist.html . There are Style elements ( like ButtonStyle, LabelStyle ), you can use them to get current theme colours, images, font size and etc.
For example: "Button element code":http://qt.gitorious.org/qt-components/qt-components/blobs/1.1.1-meego/src/meego/Button.qml
-
Thank you so much for you answer I'm having a hard time trying to theme my app, basically I need something like this:
@
pressedBackground: "image://theme/" + __colorString + "-meegotouch-button" + __invertedString + "-background-pressed" + (position ? "-" + position : "")
@But I don't know what to enter in __colorString (I think it's an integer from 1-15?), in __invertedString and in position
I've been looking for an opensource app for harmattan that uses all this so I can read, do you know any app like that?
also I was searching about themes and I found this https://qt.gitorious.org/qt-components/qt-components/commit/1321f2abd49545733c746a48f7a7b648caf5016e/diffs but I don't know how to use it, how to set the theme like
@theme.colorScheme = 2 @
Thanks!
-
theme.colorScheme is still not implemented (if I don't remember wrong), you have to manually edit the styles of your components.
Here I set the slider bar color to purple:
@platformStyle : SliderStyle {
handleBackground: "qrc:/images/dot.png"
handleBackgroundPressed: "qrc:/images/dot.png"
grooveItemElapsedBackground: "image://theme/" + "color12-" + "meegotouch-slider-elapsed"+__invertedString+"-background-horizontal"
}@