Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Highlight Color in Harmattan
Forum Updated to NodeBB v4.3 + New Features

QML Highlight Color in Harmattan

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Iktwo
    wrote on last edited by
    #1

    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!

    http://www.developer.nokia.com/Community/Wiki/N9_Application_Color#Where_can_you_apply_the_highlight_colors.3F

    1 Reply Last reply
    0
    • T Offline
      T Offline
      task_struct
      wrote on last edited by
      #2

      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

      "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

      • Linu...
      1 Reply Last reply
      0
      • I Offline
        I Offline
        Iktwo
        wrote on last edited by
        #3

        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!

        1 Reply Last reply
        0
        • G Offline
          G Offline
          ggiovanni88
          wrote on last edited by
          #4

          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"
          }@

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved