@@ -4,6 +4,7 @@ import QtQuick
44
55import QtQuick.Controls
66import QtQuick.Layouts
7+ import QtQuick.Window
78import QtQml.Models
89
910import AppLayouts.Browser
@@ -868,7 +869,7 @@ Item {
868869 property bool enableMessageBackupPopupSeen
869870 property var recentEmojis
870871 property string skinColor // NB: must be a string for the twemoji lib to work; we don't want the `#` in the name
871- property int theme: Theme .Style .System
872+ property int theme: ThemeUtils .Style .System
872873 property int fontSize: {
873874 if (appMain .width < ThemeUtils .portraitBreakpoint .width ) {
874875 return ThemeUtils .FontSize .FontSizeS
@@ -883,16 +884,9 @@ Item {
883884 }
884885
885886 Component .onCompleted : {
886- Theme .changeTheme (appMainLocalSettings .theme )
887- Theme .changeFontSize (appMainLocalSettings .fontSize )
888- Theme .changePaddingFactor (appMainLocalSettings .paddingFactor )
889- }
890- }
891-
892- Connections {
893- target: Application .styleHints
894- function onColorSchemeChanged () {
895- Theme .changeTheme (appMainLocalSettings .theme ) // re-apply the theme when the System theme/colorscheme changes
887+ ThemeUtils .changeTheme (appMain .Window .window , appMainLocalSettings .theme )
888+ ThemeUtils .setFontSize (appMain .Window .window , appMainLocalSettings .fontSize )
889+ ThemeUtils .setPaddingFactor (appMain .Window .window , appMainLocalSettings .paddingFactor )
896890 }
897891 }
898892
@@ -2152,15 +2146,15 @@ Item {
21522146
21532147 onThemeChangeRequested : function (theme ) {
21542148 appMainLocalSettings .theme = theme
2155- Theme .changeTheme (theme)
2149+ ThemeUtils .changeTheme (appMain . Window . window , theme)
21562150 }
21572151 onFontSizeChangeRequested : function (fontSize ) {
21582152 appMainLocalSettings .fontSize = fontSize
2159- Theme . changeFontSize ( fontSize)
2153+ ThemeUtils . setFontSize ( appMain . Window . window , fontSize)
21602154 }
21612155 onPaddingFactorChangeRequested : function (paddingFactor ) {
21622156 appMainLocalSettings .paddingFactor = paddingFactor
2163- Theme . changePaddingFactor ( paddingFactor)
2157+ ThemeUtils . setPaddingFactor ( appMain . Window . window , paddingFactor)
21642158 }
21652159 // Communities related settings view:
21662160 onLeaveCommunityRequest: appMain .communitiesStore .leaveCommunity (communityId)
0 commit comments