mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
mobile/UI: initialize Kirigami theme to use our colors
With this we should finally get the correct button colors even when switching color theme. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4dc1b4ef4a
commit
d9661a7be8
4 changed files with 25 additions and 1 deletions
|
@ -58,7 +58,12 @@ Kirigami.Page {
|
|||
bottomPadding: 0
|
||||
background: Rectangle { color: subsurfaceTheme.backgroundColor }
|
||||
width: rootItem.colWidth
|
||||
|
||||
// we want to use our own colors for Kirigami, so let's define our colorset
|
||||
Kirigami.Theme.inherit: false
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.Button
|
||||
Kirigami.Theme.backgroundColor: subsurfaceTheme.backgroundColor
|
||||
Kirigami.Theme.textColor: subsurfaceTheme.textColor
|
||||
|
||||
property QtObject removeDiveFromTripAction: Kirigami.Action {
|
||||
text: qsTr ("Remove this dive from trip")
|
||||
|
|
|
@ -14,7 +14,12 @@ Kirigami.ScrollablePage {
|
|||
verticalScrollBarPolicy: Qt.ScrollBarAlwaysOff
|
||||
property int dlHorizontalPadding: Kirigami.Units.gridUnit / 2 - Kirigami.Units.smallSpacing + 1
|
||||
property QtObject diveListModel: null
|
||||
Kirigami.Theme.backgroundColor: subsurfaceTheme.backgroundColor // used for background of left and right action button
|
||||
// we want to use our own colors for Kirigami, so let's define our colorset
|
||||
Kirigami.Theme.inherit: false
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.Button
|
||||
Kirigami.Theme.backgroundColor: subsurfaceTheme.backgroundColor
|
||||
Kirigami.Theme.textColor: subsurfaceTheme.textColor
|
||||
|
||||
supportsRefreshing: true
|
||||
onRefreshingChanged: {
|
||||
if (refreshing) {
|
||||
|
|
|
@ -16,6 +16,13 @@ Kirigami.Page {
|
|||
state: "view"
|
||||
padding: Kirigami.Units.largeSpacing
|
||||
background: Rectangle { color: subsurfaceTheme.backgroundColor }
|
||||
|
||||
// we want to use our own colors for Kirigami, so let's define our colorset
|
||||
Kirigami.Theme.inherit: false
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.Button
|
||||
Kirigami.Theme.backgroundColor: subsurfaceTheme.backgroundColor
|
||||
Kirigami.Theme.textColor: subsurfaceTheme.textColor
|
||||
|
||||
actions.main: saveAction
|
||||
actions.right: cancelAction
|
||||
onVisibleChanged: {
|
||||
|
|
|
@ -22,6 +22,13 @@ Kirigami.ApplicationWindow {
|
|||
font: Qt.application.font
|
||||
background: Rectangle { color: subsurfaceTheme.backgroundColor }
|
||||
|
||||
// we want to use our own colors for Kirigami, so let's define our colorset
|
||||
Kirigami.Theme.inherit: false
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.Button
|
||||
Kirigami.Theme.backgroundColor: subsurfaceTheme.backgroundColor
|
||||
Kirigami.Theme.textColor: subsurfaceTheme.textColor
|
||||
|
||||
// next setup the tab bar on top
|
||||
pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Breadcrumb
|
||||
pageStack.globalToolBar.showNavigationButtons: (Kirigami.ApplicationHeaderStyle.ShowBackButton | Kirigami.ApplicationHeaderStyle.ShowForwardButton)
|
||||
pageStack.globalToolBar.minimumHeight: 0
|
||||
|
|
Loading…
Reference in a new issue