refactor(sandbox): rely on global `Theme` instead of theme prop

This commit is contained in:
Pascal Precht 2021-05-20 11:35:25 +02:00 committed by Pascal Precht
parent 893cd0fdb1
commit 136cd55560
5 changed files with 2 additions and 11 deletions

View File

@ -9,7 +9,6 @@ GridLayout {
columns: 6
columnSpacing: 5
rowSpacing: 5
property ThemePalette theme
StatusIconTabButton {
icon.name: "chat"

View File

@ -11,7 +11,6 @@ GridLayout {
columns: 6
columnSpacing: 5
rowSpacing: 5
property ThemePalette theme
Button {
id: btn

View File

@ -8,10 +8,9 @@ GridLayout {
columns: 6
columnSpacing: 5
rowSpacing: 5
property ThemePalette theme
StatusLoadingIndicator {
color: parent.theme.directColor4
color: Theme.palette.directColor4
}
StatusLetterIdenticon {

View File

@ -175,7 +175,6 @@ StatusWindow {
id: controlsComponent
Controls {
anchors.centerIn: parent
theme: Theme.palette
}
}
@ -183,7 +182,6 @@ StatusWindow {
id: layoutComponent
Layout {
anchors.centerIn: parent
theme: Theme.palette
}
}
@ -191,7 +189,6 @@ StatusWindow {
id: othersComponent
Others {
anchors.centerIn: parent
theme: Theme.palette
}
}

View File

@ -4,10 +4,7 @@ import QtQuick 2.13
QtObject {
id: appTheme
// Replace it with:
// property QtObject palette: StatusLightTheme {}
// for reloading
property ThemePalette palette: StatusLightTheme {}
property QtObject palette: StatusLightTheme {}
function setTheme(theme) {
palette = theme