refactor(sandbox): rely on global `Theme` instead of theme prop
This commit is contained in:
parent
893cd0fdb1
commit
136cd55560
|
@ -9,7 +9,6 @@ GridLayout {
|
|||
columns: 6
|
||||
columnSpacing: 5
|
||||
rowSpacing: 5
|
||||
property ThemePalette theme
|
||||
|
||||
StatusIconTabButton {
|
||||
icon.name: "chat"
|
||||
|
|
|
@ -11,7 +11,6 @@ GridLayout {
|
|||
columns: 6
|
||||
columnSpacing: 5
|
||||
rowSpacing: 5
|
||||
property ThemePalette theme
|
||||
|
||||
Button {
|
||||
id: btn
|
||||
|
|
|
@ -8,10 +8,9 @@ GridLayout {
|
|||
columns: 6
|
||||
columnSpacing: 5
|
||||
rowSpacing: 5
|
||||
property ThemePalette theme
|
||||
|
||||
StatusLoadingIndicator {
|
||||
color: parent.theme.directColor4
|
||||
color: Theme.palette.directColor4
|
||||
}
|
||||
|
||||
StatusLetterIdenticon {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue