Created
March 1, 2014 18:06
-
-
Save andrewsomething/9294239 to your computer and use it in GitHub Desktop.
An example of the problem coloring a header...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import Ubuntu.Components 0.1 | |
import Ubuntu.Components.ListItems 0.1 as ListItem | |
MainView { | |
id: mainView | |
width: units.gu(40) | |
height: units.gu(60) | |
Rectangle { | |
id: headerBackground | |
height: header.height | |
width: header.width | |
anchors.fill: header | |
color: "#288369" | |
} | |
Tabs { | |
id: tabs | |
Tab { | |
title: i18n.tr("Pretty Hack") | |
page: Page { | |
Label { | |
anchors.centerIn: parent | |
text: "Sure looks nice here,\nbut check out the other tab." | |
} | |
} | |
} | |
Tab { | |
title: i18n.tr("Ugly Hack") | |
page: Page { | |
ListView { | |
id: list | |
spacing: units.gu(1) | |
anchors.fill: parent | |
model: model | |
delegate: ListItem.Standard { | |
text: model.info | |
} | |
} | |
ListModel { | |
id: model | |
ListElement { | |
info: "First item" | |
} | |
ListElement { | |
info: "Second item" | |
} | |
ListElement { | |
info: "Third item" | |
} | |
ListElement { | |
info: "Fourth item" | |
} | |
ListElement { | |
info: "Fifth item" | |
} | |
ListElement { | |
info: "Sixth item" | |
} | |
ListElement { | |
info: "Seventh item" | |
} | |
ListElement { | |
info: "Eight item" | |
} | |
ListElement { | |
info: "Nineth item" | |
} | |
} | |
} | |
} | |
Component.onCompleted: { | |
tabBar.__styleInstance.headerTextSelectedColor = "white"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment