[Gui] QtStyle preference consistency

Previously, the some of the code searched for the QtStyle in the wrong location
This commit is contained in:
Benjamin Bræstrup Sayoc
2024-09-04 15:31:20 +02:00
parent c1c2311407
commit 33ab8fa2e8
4 changed files with 4 additions and 8 deletions

View File

@@ -4,5 +4,5 @@ import FreeCAD
editorPrefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Editor")
editorPrefs.RemInt("Text")
appPrefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/General")
appPrefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/MainWindow")
appPrefs.RemString("QtStyle")

View File

@@ -4,9 +4,6 @@
<FCParamGroup Name="Root">
<FCParamGroup Name="BaseApp">
<FCParamGroup Name="Preferences">
<FCParamGroup Name="General">
<FCText Name="QtStyle">Fusion</FCText>
</FCParamGroup>
<FCParamGroup Name="Themes">
<FCUInt Name="ThemeAccentColor1" Value="1252392959"/>
<FCUInt Name="ThemeAccentColor2" Value="3027763199"/>
@@ -179,6 +176,7 @@
<FCInt Name="FontSize" Value="11"/>
</FCParamGroup>
<FCParamGroup Name="MainWindow">
<FCText Name="QtStyle">Fusion</FCText>
<FCBool Name="TiledBackground" Value="0"/>
<FCText Name="Theme">FreeCAD Dark</FCText>
<FCText Name="StyleSheet">FreeCAD Dark.qss</FCText>

View File

@@ -3,9 +3,6 @@
<FCParamGroup Name="Root">
<FCParamGroup Name="BaseApp">
<FCParamGroup Name="Preferences">
<FCParamGroup Name="General">
<FCText Name="QtStyle">Fusion</FCText>
</FCParamGroup>
<FCParamGroup Name="Themes">
<FCUInt Name="ThemeAccentColor1" Value="1252392959"/>
<FCUInt Name="ThemeAccentColor2" Value="3027763199"/>
@@ -209,6 +206,7 @@
<FCUInt Name="BaseColor" Value="3505127423"/>
</FCParamGroup>
<FCParamGroup Name="MainWindow">
<FCText Name="QtStyle">Fusion</FCText>
<FCText Name="Theme">FreeCAD Light</FCText>
<FCText Name="StyleSheet">FreeCAD Light.qss</FCText>
<FCText Name="OverlayActiveStyleSheet">Light Theme + Light Background.qss</FCText>

View File

@@ -304,7 +304,7 @@ void StartupPostProcess::setCursorFlashing()
void StartupPostProcess::setQtStyle()
{
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("General");
ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("MainWindow");
auto qtStyle = hGrp->GetASCII("QtStyle");
QApplication::setStyle(QString::fromStdString(qtStyle));
}