Merge branch 'develop' into main
Includes: - Fix startup theme selector and migration for single-theme setup - UI: dock task panel right, remove non-Kindred themes
This commit is contained in:
17
README.md
17
README.md
@@ -137,6 +137,23 @@ The theme is automatically applied when using Kindred Create.
|
||||
|
||||
Prebuilt packages for Linux are available on the [releases page](https://github.com/anthropics/create-0070/releases).
|
||||
|
||||
#### Debian/Ubuntu (.deb)
|
||||
|
||||
Download the `.deb` package from the releases page and install with:
|
||||
|
||||
```bash
|
||||
sudo dpkg -i kindred-create_*.deb
|
||||
sudo apt-get install -f # Install any missing dependencies
|
||||
```
|
||||
|
||||
Or install directly with apt:
|
||||
|
||||
```bash
|
||||
sudo apt install ./kindred-create_*.deb
|
||||
```
|
||||
|
||||
After installation, launch Kindred Create from your application menu or run `kindred-create` from the terminal.
|
||||
|
||||
### Building from Source
|
||||
|
||||
Kindred Create uses the same build system as FreeCAD. Build instructions for each platform:
|
||||
|
||||
@@ -782,7 +782,7 @@ bool MainWindow::updateComboView(bool show)
|
||||
->GetGroup("DockWindows")
|
||||
->GetGroup("ComboView");
|
||||
bool enable = group->GetBool("Enabled", true);
|
||||
_updateDockWidget("Std_ComboView", enable, show, Qt::LeftDockWidgetArea, [](QWidget* widget) {
|
||||
_updateDockWidget("Std_ComboView", enable, show, Qt::RightDockWidgetArea, [](QWidget* widget) {
|
||||
auto pcComboView = qobject_cast<ComboView*>(widget);
|
||||
if (widget) {
|
||||
return widget;
|
||||
|
||||
@@ -4,10 +4,6 @@ SET(PreferencePacks_Files
|
||||
|
||||
SET(PreferencePacks_Directories
|
||||
"KindredCreate"
|
||||
"FreeCAD Classic"
|
||||
"Dark behave"
|
||||
"FreeCAD Light"
|
||||
"FreeCAD Dark"
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET(PreferencePacks_data ALL
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<FCParameters>
|
||||
<FCParamGroup Name="Root">
|
||||
<FCParamGroup Name="BaseApp">
|
||||
<FCParamGroup Name="Preferences">
|
||||
<FCParamGroup Name="Mod">
|
||||
<FCParamGroup Name="Arch">
|
||||
<FCUInt Name="WallColor" Value="3604403967"/>
|
||||
<FCUInt Name="StructureColor" Value="2527705855"/>
|
||||
<FCUInt Name="RebarColor" Value="3111475967"/>
|
||||
<FCUInt Name="WindowColor" Value="556614399"/>
|
||||
<FCUInt Name="WindowGlassColor" Value="1572326399"/>
|
||||
<FCUInt Name="PanelColor" Value="3416289279"/>
|
||||
<FCUInt Name="ColorHelpers" Value="1347440895"/>
|
||||
<FCUInt Name="defaultSpaceColor" Value="4280090879"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Draft">
|
||||
<FCInt Name="gridTransparency" Value="0"/>
|
||||
<FCUInt Name="constructioncolor" Value="746455039"/>
|
||||
<FCUInt Name="gridColor" Value="4294967295"/>
|
||||
<FCUInt Name="snapcolor" Value="4289331455"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Spreadsheet">
|
||||
<FCText Name="AliasedCellBackgroundColor">#9b4de6</FCText>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="OutputWindow">
|
||||
<FCUInt Name="colorText" Value="3570717951"/>
|
||||
<FCUInt Name="colorLogging" Value="1437270015"/>
|
||||
<FCUInt Name="colorWarning" Value="4252787455"/>
|
||||
<FCUInt Name="colorError" Value="4278190335"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Editor">
|
||||
<FCUInt Name="Text" Value="3570717696"/>
|
||||
<FCUInt Name="Bookmark" Value="16776960"/>
|
||||
<FCUInt Name="Breakpoint" Value="4278190080"/>
|
||||
<FCUInt Name="Keyword" Value="1453118976"/>
|
||||
<FCUInt Name="Comment" Value="1788433664"/>
|
||||
<FCUInt Name="Block comment" Value="3465639936"/>
|
||||
<FCUInt Name="Number" Value="3050219520"/>
|
||||
<FCUInt Name="String" Value="3465639936"/>
|
||||
<FCUInt Name="Character" Value="4278190080"/>
|
||||
<FCUInt Name="Class name" Value="1321840640"/>
|
||||
<FCUInt Name="Define name" Value="3705448960"/>
|
||||
<FCUInt Name="Operator" Value="3570717696"/>
|
||||
<FCUInt Name="Python output" Value="2863300352"/>
|
||||
<FCUInt Name="Python error" Value="4252787200"/>
|
||||
<FCUInt Name="Current line highlight" Value="524114944"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="View">
|
||||
<FCUInt Name="SketchEdgeColor" Value="4294967295"/>
|
||||
<FCUInt Name="SketchVertexColor" Value="4294967295"/>
|
||||
<FCUInt Name="EditedEdgeColor" Value="4294967295"/>
|
||||
<FCUInt Name="EditedVertexColor" Value="4280680703"/>
|
||||
<FCUInt Name="ConstructionColor" Value="746455039"/>
|
||||
<FCUInt Name="ExternalColor" Value="3425924095"/>
|
||||
<FCUInt Name="InvalidSketchColor" Value="4285333759"/>
|
||||
<FCUInt Name="FullyConstrainedColor" Value="16711935"/>
|
||||
<FCUInt Name="InternalAlignedGeoColor" Value="2998042623"/>
|
||||
<FCUInt Name="FullyConstraintElementColor" Value="11173887"/>
|
||||
<FCUInt Name="FullyConstraintConstructionElementColor" Value="2410282495"/>
|
||||
<FCUInt Name="FullyConstraintInternalAlignmentColor" Value="3739142399"/>
|
||||
<FCUInt Name="FullyConstraintConstructionPointColor" Value="4287987967"/>
|
||||
<FCUInt Name="ConstrainedIcoColor" Value="4280680703"/>
|
||||
<FCUInt Name="NonDrivingConstrDimColor" Value="11206655"/>
|
||||
<FCUInt Name="ConstrainedDimColor" Value="4278255615"/>
|
||||
<FCUInt Name="ExprBasedConstrDimColor" Value="4286523135"/>
|
||||
<FCUInt Name="DeactivatedConstrDimColor" Value="2139062271"/>
|
||||
<FCUInt Name="CursorTextColor" Value="1437270015"/>
|
||||
<FCUInt Name="CursorCrosshairColor" Value="4294967295"/>
|
||||
<FCUInt Name="CreateLineColor" Value="3435973887"/>
|
||||
<FCBool Name="Simple" Value="0"/>
|
||||
<FCBool Name="Gradient" Value="1"/>
|
||||
<FCBool Name="RadialGradient" Value="1"/>
|
||||
<FCBool Name="UseBackgroundColorMid" Value="1"/>
|
||||
<FCUInt Name="BacklightColor" Value="4294967295"/>
|
||||
<FCUInt Name="BackgroundColor" Value="1010580735"/>
|
||||
<FCUInt Name="BackgroundColor2" Value="2088533247"/>
|
||||
<FCUInt Name="BackgroundColor3" Value="1010580735"/>
|
||||
<FCUInt Name="BackgroundColor4" Value="2088533247"/>
|
||||
<FCUInt Name="HighlightColor" Value="327679"/>
|
||||
<FCUInt Name="SelectionColor" Value="16711935"/>
|
||||
<FCUInt Name="DefaultShapeColor" Value="3435980543"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TreeView">
|
||||
<FCUInt Name="TreeEditColor" Value="1434171135"/>
|
||||
<FCUInt Name="TreeActiveColor" Value="3465640191"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="MainWindow">
|
||||
<FCBool Name="TiledBackground" Value="0"/>
|
||||
<FCText Name="StyleSheet">Behave-dark.qss</FCText>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParameters>
|
||||
@@ -1,181 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<FCParameters>
|
||||
<FCParamGroup Name="Root">
|
||||
<FCParamGroup Name="BaseApp">
|
||||
<FCParamGroup Name="Preferences">
|
||||
<FCParamGroup Name="Editor">
|
||||
<FCUInt Name="Block comment" Value="2694882304"/>
|
||||
<FCUInt Name="Bookmark" Value="16776960"/>
|
||||
<FCUInt Name="Breakpoint" Value="4278190080"/>
|
||||
<FCUInt Name="Character" Value="4278190080"/>
|
||||
<FCUInt Name="Class name" Value="4289331200"/>
|
||||
<FCUInt Name="Comment" Value="11141120"/>
|
||||
<FCUInt Name="Current line highlight" Value="3772833792"/>
|
||||
<FCUInt Name="Define name" Value="4289331200"/>
|
||||
<FCUInt Name="Keyword" Value="65280"/>
|
||||
<FCUInt Name="Number" Value="65280"/>
|
||||
<FCUInt Name="Operator" Value="2694882304"/>
|
||||
<FCUInt Name="Python error" Value="4278190080"/>
|
||||
<FCUInt Name="Python output" Value="2863300352"/>
|
||||
<FCUInt Name="String" Value="4278190080"/>
|
||||
<FCUInt Name="Text" Value="809320704"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="MainWindow">
|
||||
<FCText Name="OverlayActiveStyleSheet">Light Theme + Dark Background.qss</FCText>
|
||||
<FCText Name="StyleSheet"/>
|
||||
<FCText Name="Theme">FreeCAD Classic</FCText>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Mod">
|
||||
<FCParamGroup Name="Arch">
|
||||
<FCUInt Name="ColorHelpers" Value="674321151"/>
|
||||
<FCUInt Name="defaultSpaceColor" Value="4280090879"/>
|
||||
<FCUInt Name="PanelColor" Value="3416289279"/>
|
||||
<FCUInt Name="RebarColor" Value="3111475967"/>
|
||||
<FCUInt Name="StructureColor" Value="2527705855"/>
|
||||
<FCUInt Name="WallColor" Value="3604403967"/>
|
||||
<FCUInt Name="WindowGlassColor" Value="1572326399"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="CAM">
|
||||
<FCUInt Name="DefaultBBoxNormalColor" Value="4294967295"/>
|
||||
<FCUInt Name="DefaultBBoxSelectionColor" Value="3372220415"/>
|
||||
<FCUInt Name="DefaultHighlightPathColor" Value="4286382335"/>
|
||||
<FCUInt Name="DefaultNormalPathColor" Value="11141375"/>
|
||||
<FCUInt Name="DefaultPathMarkerColor" Value="1442775295"/>
|
||||
<FCUInt Name="DefaultProbePathColor" Value="4294903295"/>
|
||||
<FCUInt Name="DefaultRapidPathColor" Value="2852126975"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Draft">
|
||||
<FCInt Name="gridTransparency" Value="0"/>
|
||||
<FCUInt Name="color" Value="3435980288"/>
|
||||
<FCUInt Name="constructioncolor" Value="746455039"/>
|
||||
<FCUInt Name="DefaultAnnoLineColor" Value="255"/>
|
||||
<FCUInt Name="DefaultTextColor" Value="255"/>
|
||||
<FCUInt Name="gridColor" Value="842157055"/>
|
||||
<FCUInt Name="snapcolor" Value="4289331455"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Measure">
|
||||
<FCParamGroup Name="Appearance">
|
||||
<FCUInt Name="DefaultLineColor" Value="4294967295"/>
|
||||
<FCUInt Name="DefaultTextBackgroundColor" Value="255"/>
|
||||
<FCUInt Name="DefaultTextColor" Value="4294967295"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Mesh">
|
||||
<FCUInt Name="BackfaceColor" Value="3435973887"/>
|
||||
<FCUInt Name="LineColor" Value="255"/>
|
||||
<FCUInt Name="MeshColor" Value="3435973887"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Sketcher">
|
||||
<FCParamGroup Name="General">
|
||||
<FCUInt Name="GridDivLineColor" Value="2998055679"/>
|
||||
<FCUInt Name="GridLineColor" Value="2998055679"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Spreadsheet">
|
||||
<FCText Name="AliasedCellBackgroundColor">#feff9e</FCText>
|
||||
<FCText Name="NegativeNumberColor">#000000</FCText>
|
||||
<FCText Name="PositiveNumberColor">#000000</FCText>
|
||||
<FCText Name="TextColor">#000000</FCText>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Start">
|
||||
<FCUInt Name="FileThumbnailBackgroundColor" Value="3554532863"/>
|
||||
<FCUInt Name="FileThumbnailBorderColor" Value="1654713087"/>
|
||||
<FCUInt Name="FileThumbnailSelectionColor" Value="648178175"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TechDraw">
|
||||
<FCParamGroup Name="Colors">
|
||||
<FCBool Name="LightOnDark" Value="0"/>
|
||||
<FCBool Name="Monochrome" Value="0"/>
|
||||
<FCUInt Name="Background" Value="3553874943"/>
|
||||
<FCUInt Name="CutSurfaceColor" Value="3553874943"/>
|
||||
<FCUInt Name="FaceColor" Value="4294967295"/>
|
||||
<FCUInt Name="GeomHatch" Value="255"/>
|
||||
<FCUInt Name="gridColor" Value="255"/>
|
||||
<FCUInt Name="Hatch" Value="255"/>
|
||||
<FCUInt Name="HiddenColor" Value="255"/>
|
||||
<FCUInt Name="LightTextColor" Value="4294967295"/>
|
||||
<FCUInt Name="NormalColor" Value="255"/>
|
||||
<FCUInt Name="PageColor" Value="4294967295"/>
|
||||
<FCUInt Name="PreSelectColor" Value="4294902015"/>
|
||||
<FCUInt Name="SelectColor" Value="16711935"/>
|
||||
<FCUInt Name="TemplateUnderlineColor" Value="65535"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Decorations">
|
||||
<FCUInt Name="CenterColor" Value="255"/>
|
||||
<FCUInt Name="HighlightColor" Value="255"/>
|
||||
<FCUInt Name="SectionColor" Value="255"/>
|
||||
<FCUInt Name="VertexColor" Value="255"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Dimensions">
|
||||
<FCUInt Name="Color" Value="255"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Markups">
|
||||
<FCUInt Name="Color" Value="255"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="NaviCube">
|
||||
<FCUInt Name="BaseColor" Value="3806916480"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="OutputWindow">
|
||||
<FCUInt Name="colorError" Value="4278190335"/>
|
||||
<FCUInt Name="colorLogging" Value="65535"/>
|
||||
<FCUInt Name="colorText" Value="809320959"/>
|
||||
<FCUInt Name="colorWarning" Value="4289331455"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Themes">
|
||||
<FCUInt Name="ThemeAccentColor1" Value="1434171135"/>
|
||||
<FCUInt Name="ThemeAccentColor2" Value="1434171135"/>
|
||||
<FCUInt Name="ThemeAccentColor3" Value="1434171135"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TreeView">
|
||||
<FCUInt Name="TreeActiveColor" Value="1016200447"/>
|
||||
<FCUInt Name="TreeEditColor" Value="1588208639"/>
|
||||
<FCInt Name="FontSize" Value="0"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="View">
|
||||
<FCBool Name="Gradient" Value="1"/>
|
||||
<FCBool Name="RadialGradient" Value="0"/>
|
||||
<FCBool Name="Simple" Value="0"/>
|
||||
<FCBool Name="UseBackgroundColorMid" Value="0"/>
|
||||
<FCUInt Name="AnnotationTextColor" Value="4294967295"/>
|
||||
<FCUInt Name="AxisLetterColor" Value="255"/>
|
||||
<FCUInt Name="BackgroundColor" Value="336897023"/>
|
||||
<FCUInt Name="BackgroundColor2" Value="859006463"/>
|
||||
<FCUInt Name="BackgroundColor3" Value="2543299327"/>
|
||||
<FCUInt Name="BackgroundColor4" Value="1869583359"/>
|
||||
<FCUInt Name="BoundingBoxColor" Value="4294967295"/>
|
||||
<FCUInt Name="CbLabelColor" Value="4294967295"/>
|
||||
<FCUInt Name="ConstrainedDimColor" Value="4280680703"/>
|
||||
<FCUInt Name="ConstrainedIcoColor" Value="4280680703"/>
|
||||
<FCUInt Name="ConstructionColor" Value="746455039"/>
|
||||
<FCUInt Name="CreateLineColor" Value="2139062271"/>
|
||||
<FCUInt Name="CursorCrosshairColor" Value="4294967295"/>
|
||||
<FCUInt Name="CursorTextColor" Value="65535"/>
|
||||
<FCUInt Name="DeactivatedConstrDimColor" Value="2139062271"/>
|
||||
<FCUInt Name="DefaultAmbientColor" Value="1431655935"/>
|
||||
<FCUInt Name="DefaultEmissiveColor" Value="255"/>
|
||||
<FCUInt Name="DefaultShapeColor" Value="3435980543"/>
|
||||
<FCUInt Name="DefaultShapeLineColor" Value="421075455"/>
|
||||
<FCUInt Name="DefaultShapeVertexColor" Value="421075455"/>
|
||||
<FCUInt Name="DefaultSpecularColor" Value="2290649343"/>
|
||||
<FCUInt Name="EditedEdgeColor" Value="4294967295"/>
|
||||
<FCUInt Name="ExprBasedConstrDimColor" Value="4286523135"/>
|
||||
<FCUInt Name="ExternalColor" Value="3425924095"/>
|
||||
<FCUInt Name="FullyConstrainedColor" Value="16711935"/>
|
||||
<FCUInt Name="FullyConstraintConstructionElementColor" Value="2410282495"/>
|
||||
<FCUInt Name="FullyConstraintElementColor" Value="2161156351"/>
|
||||
<FCUInt Name="FullyConstraintInternalAlignmentColor" Value="3739142399"/>
|
||||
<FCUInt Name="HighlightColor" Value="3789624575"/>
|
||||
<FCUInt Name="InternalAlignedGeoColor" Value="2998042623"/>
|
||||
<FCUInt Name="InvalidSketchColor" Value="4285333759"/>
|
||||
<FCUInt Name="NonDrivingConstrDimColor" Value="2555903"/>
|
||||
<FCUInt Name="RotationCenterColor" Value="4278190131"/>
|
||||
<FCUInt Name="SelectionColor" Value="481107199"/>
|
||||
<FCUInt Name="SketchEdgeColor" Value="4294967295"/>
|
||||
<FCUInt Name="SketchVertexColor" Value="4294967295"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParameters>
|
||||
@@ -1,8 +0,0 @@
|
||||
# Classic theme must delete any set value for the editor text so that it is calculated dynamically when needed
|
||||
import FreeCAD
|
||||
|
||||
editorPrefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Editor")
|
||||
editorPrefs.RemInt("Text")
|
||||
|
||||
appPrefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/MainWindow")
|
||||
appPrefs.RemString("QtStyle")
|
||||
@@ -1,151 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<FCParameters>
|
||||
<FCParamGroup Name="Root">
|
||||
<FCParamGroup Name="BaseApp">
|
||||
<FCParamGroup Name="Preferences">
|
||||
<FCParamGroup Name="NaviCube">
|
||||
<FCUInt Name="Color" Value="3503345919"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Editor">
|
||||
<FCUInt Name="Block comment" Value="3465639936"/>
|
||||
<FCUInt Name="Bookmark" Value="16776960"/>
|
||||
<FCUInt Name="Breakpoint" Value="4278190080"/>
|
||||
<FCUInt Name="Character" Value="4278190080"/>
|
||||
<FCUInt Name="Class name" Value="1321840640"/>
|
||||
<FCUInt Name="Comment" Value="1788433664"/>
|
||||
<FCUInt Name="Current line highlight" Value="524114944"/>
|
||||
<FCUInt Name="Define name" Value="3705448960"/>
|
||||
<FCUInt Name="Keyword" Value="1453118976"/>
|
||||
<FCUInt Name="Number" Value="3050219520"/>
|
||||
<FCUInt Name="Operator" Value="3570717696"/>
|
||||
<FCUInt Name="Python error" Value="4252787200"/>
|
||||
<FCUInt Name="Python output" Value="2863300352"/>
|
||||
<FCUInt Name="String" Value="3465639936"/>
|
||||
<FCUInt Name="Text" Value="3570717696"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="MainWindow">
|
||||
<FCText Name="OverlayActiveStyleSheet">Freecad Overlay.qss</FCText>
|
||||
<FCText Name="QtStyle">FreeCAD</FCText>
|
||||
<FCText Name="StyleSheet">FreeCAD.qss</FCText>
|
||||
<FCText Name="Theme">FreeCAD Dark</FCText>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Mod">
|
||||
<FCParamGroup Name="Arch">
|
||||
<FCUInt Name="ColorHelpers" Value="1347440895"/>
|
||||
<FCUInt Name="defaultSpaceColor" Value="4280090879"/>
|
||||
<FCUInt Name="PanelColor" Value="3416289279"/>
|
||||
<FCUInt Name="RebarColor" Value="3111475967"/>
|
||||
<FCUInt Name="StructureColor" Value="2527705855"/>
|
||||
<FCUInt Name="WallColor" Value="3604403967"/>
|
||||
<FCUInt Name="WindowColor" Value="556614399"/>
|
||||
<FCUInt Name="WindowGlassColor" Value="1572326399"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="CAM">
|
||||
<FCUInt Name="DefaultBBoxNormalColor" Value="4059297279"/>
|
||||
<FCUInt Name="DefaultBBoxSelectionColor" Value="582537215"/>
|
||||
<FCUInt Name="DefaultHighlightPathColor" Value="4252898303"/>
|
||||
<FCUInt Name="DefaultNormalPathColor" Value="1086347263"/>
|
||||
<FCUInt Name="DefaultPathMarkerColor" Value="1958221567"/>
|
||||
<FCUInt Name="DefaultProbePathColor" Value="4240710143"/>
|
||||
<FCUInt Name="DefaultRapidPathColor" Value="4199699199"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Draft">
|
||||
<FCInt Name="gridTransparency" Value="0"/>
|
||||
<FCUInt Name="constructioncolor" Value="746455039"/>
|
||||
<FCUInt Name="gridColor" Value="1230002175"/>
|
||||
<FCUInt Name="snapcolor" Value="4289331455"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Measure">
|
||||
<FCParamGroup Name="Appearance">
|
||||
<FCUInt Name="DefaultLineColor" Value="4177132287"/>
|
||||
<FCUInt Name="DefaultTextBackgroundColor" Value="556083711"/>
|
||||
<FCUInt Name="DefaultTextColor" Value="4177132287"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Sketcher">
|
||||
<FCParamGroup Name="General">
|
||||
<FCUInt Name="GridDivLineColor" Value="1230002175"/>
|
||||
<FCUInt Name="GridLineColor" Value="1230002175"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Spreadsheet">
|
||||
<FCText Name="AliasedCellBackgroundColor">#1864ab</FCText>
|
||||
<FCText Name="NegativeNumberColor">#f8f9fa</FCText>
|
||||
<FCText Name="PositiveNumberColor">#f8f9fa</FCText>
|
||||
<FCText Name="TextColor">#f8f9fa</FCText>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TechDraw">
|
||||
<FCParamGroup Name="Colors">
|
||||
<FCUInt Name="Background" Value="556083711"/>
|
||||
<FCUInt Name="CutSurfaceColor" Value="3470056191"/>
|
||||
<FCUInt Name="FaceColor" Value="4059297279"/>
|
||||
<FCUInt Name="GeomHatch" Value="255"/>
|
||||
<FCUInt Name="Hatch" Value="255"/>
|
||||
<FCUInt Name="HiddenColor" Value="255"/>
|
||||
<FCUInt Name="NormalColor" Value="255"/>
|
||||
<FCUInt Name="PreSelectColor" Value="4240710143"/>
|
||||
<FCUInt Name="SelectColor" Value="1958221567"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Decorations">
|
||||
<FCUInt Name="CenterColor" Value="255"/>
|
||||
<FCUInt Name="HighlightColor" Value="255"/>
|
||||
<FCUInt Name="SectionColor" Value="255"/>
|
||||
<FCUInt Name="VertexColor" Value="255"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="OutputWindow">
|
||||
<FCUInt Name="colorError" Value="4252787200"/>
|
||||
<FCUInt Name="colorLogging" Value="1437270015"/>
|
||||
<FCUInt Name="colorText" Value="3570717951"/>
|
||||
<FCUInt Name="colorWarning" Value="4287913983"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Themes">
|
||||
<FCUInt Name="ThemeAccentColor1" Value="1252392959"/>
|
||||
<FCUInt Name="ThemeAccentColor2" Value="3027763199"/>
|
||||
<FCUInt Name="ThemeAccentColor3" Value="1434171135"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TreeView">
|
||||
<FCInt Name="FontSize" Value="11"/>
|
||||
<FCInt Name="ItemBackgroundPadding" Value="11"/>
|
||||
<FCUInt Name="TreeActiveColor" Value="899696639"/>
|
||||
<FCUInt Name="TreeEditColor" Value="1434171135"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="View">
|
||||
<FCBool Name="Gradient" Value="0"/>
|
||||
<FCBool Name="RadialGradient" Value="0"/>
|
||||
<FCBool Name="Simple" Value="1"/>
|
||||
<FCBool Name="UseBackgroundColorMid" Value="0"/>
|
||||
<FCUInt Name="AnnotationTextColor" Value="2914369023"/>
|
||||
<FCUInt Name="BackgroundColor" Value="522133503"/>
|
||||
<FCUInt Name="BoundingBoxColor" Value="4059297279"/>
|
||||
<FCUInt Name="CbLabelColor" Value="2914369023"/>
|
||||
<FCUInt Name="ConstrainedDimColor" Value="4199699199"/>
|
||||
<FCUInt Name="ConstrainedIcoColor" Value="4199699199"/>
|
||||
<FCUInt Name="ConstructionColor" Value="865792255"/>
|
||||
<FCUInt Name="CreateLineColor" Value="4059297279"/>
|
||||
<FCUInt Name="CursorCrosshairColor" Value="4059297279"/>
|
||||
<FCUInt Name="CursorTextColor" Value="2914369023"/>
|
||||
<FCUInt Name="DeactivatedConstrDimColor" Value="2257491711"/>
|
||||
<FCUInt Name="DefaultShapeColor" Value="1920565503"/>
|
||||
<FCUInt Name="EditedEdgeColor" Value="4059297279"/>
|
||||
<FCUInt Name="EditedVertexColor" Value="4199699199"/>
|
||||
<FCUInt Name="ExprBasedConstrDimColor" Value="4252898559"/>
|
||||
<FCUInt Name="ExternalColor" Value="3428706559"/>
|
||||
<FCUInt Name="FullyConstrainedColor" Value="1958221567"/>
|
||||
<FCUInt Name="FullyConstraintConstructionElementColor" Value="2462511359"/>
|
||||
<FCUInt Name="FullyConstraintConstructionPointColor" Value="4205291519"/>
|
||||
<FCUInt Name="FullyConstraintElementColor" Value="11173887"/>
|
||||
<FCUInt Name="FullyConstraintInternalAlignmentColor" Value="2462511359"/>
|
||||
<FCUInt Name="HighlightColor" Value="611232767"/>
|
||||
<FCUInt Name="InternalAlignedGeoColor" Value="865792255"/>
|
||||
<FCUInt Name="InvalidSketchColor" Value="4252898559"/>
|
||||
<FCUInt Name="NonDrivingConstrDimColor" Value="865792255"/>
|
||||
<FCUInt Name="SelectionColor" Value="899696639"/>
|
||||
<FCUInt Name="SketchEdgeColor" Value="4059297279"/>
|
||||
<FCUInt Name="SketchVertexColor" Value="4059297279"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParameters>
|
||||
@@ -1,171 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<FCParameters>
|
||||
<FCParamGroup Name="Root">
|
||||
<FCParamGroup Name="BaseApp">
|
||||
<FCParamGroup Name="Preferences">
|
||||
<FCParamGroup Name="Editor">
|
||||
<FCUInt Name="Block comment" Value="730480128"/>
|
||||
<FCUInt Name="Bookmark" Value="192054528"/>
|
||||
<FCUInt Name="Breakpoint" Value="3374983680"/>
|
||||
<FCUInt Name="Character" Value="3374983680"/>
|
||||
<FCUInt Name="Class name" Value="2251201536"/>
|
||||
<FCUInt Name="Comment" Value="730480128"/>
|
||||
<FCUInt Name="Current line highlight" Value="3505127168"/>
|
||||
<FCUInt Name="Define name" Value="2251201536"/>
|
||||
<FCUInt Name="Keyword" Value="911197952"/>
|
||||
<FCUInt Name="Number" Value="1230001920"/>
|
||||
<FCUInt Name="Operator" Value="1230001920"/>
|
||||
<FCUInt Name="Python error" Value="2787003648"/>
|
||||
<FCUInt Name="Python output" Value="3645378304"/>
|
||||
<FCUInt Name="String" Value="730480128"/>
|
||||
<FCUInt Name="Text" Value="556083456"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="MainWindow">
|
||||
<FCText Name="OverlayActiveStyleSheet">Freecad Overlay.qss</FCText>
|
||||
<FCText Name="QtStyle">FreeCAD</FCText>
|
||||
<FCText Name="StyleSheet">FreeCAD.qss</FCText>
|
||||
<FCText Name="Theme">FreeCAD Light</FCText>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Mod">
|
||||
<FCParamGroup Name="Arch">
|
||||
<FCUInt Name="ColorHelpers" Value="1230002175"/>
|
||||
<FCUInt Name="defaultSpaceColor" Value="3761320447"/>
|
||||
<FCUInt Name="PanelColor" Value="4120838399"/>
|
||||
<FCUInt Name="RebarColor" Value="4252898559"/>
|
||||
<FCUInt Name="StructureColor" Value="2257491711"/>
|
||||
<FCUInt Name="WallColor" Value="2914369023"/>
|
||||
<FCUInt Name="WindowColor" Value="876232959"/>
|
||||
<FCUInt Name="WindowGlassColor" Value="363511807"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="CAM">
|
||||
<FCUInt Name="DefaultBBoxNormalColor" Value="1230002175"/>
|
||||
<FCUInt Name="DefaultBBoxSelectionColor" Value="210082303"/>
|
||||
<FCUInt Name="DefaultHighlightPathColor" Value="4252898303"/>
|
||||
<FCUInt Name="DefaultNormalPathColor" Value="798901503"/>
|
||||
<FCUInt Name="DefaultPathMarkerColor" Value="798901503"/>
|
||||
<FCUInt Name="DefaultProbePathColor" Value="4205839871"/>
|
||||
<FCUInt Name="DefaultRapidPathColor" Value="3761320447"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Draft">
|
||||
<FCInt Name="gridTransparency" Value="0"/>
|
||||
<FCUInt Name="color" Value="1920565248"/>
|
||||
<FCUInt Name="constructioncolor" Value="746455039"/>
|
||||
<FCUInt Name="DefaultAnnoLineColor" Value="556083711"/>
|
||||
<FCUInt Name="gridColor" Value="2914369023"/>
|
||||
<FCUInt Name="snapcolor" Value="4289331455"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Measure">
|
||||
<FCParamGroup Name="Appearance">
|
||||
<FCUInt Name="DefaultLineColor" Value="556083711"/>
|
||||
<FCUInt Name="DefaultTextBackgroundColor" Value="4177132287"/>
|
||||
<FCUInt Name="DefaultTextColor" Value="556083711"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Mesh">
|
||||
<FCUInt Name="BackfaceColor" Value="2914369023"/>
|
||||
<FCUInt Name="LineColor" Value="255"/>
|
||||
<FCUInt Name="MeshColor" Value="2914369023"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Sketcher">
|
||||
<FCParamGroup Name="General">
|
||||
<FCUInt Name="GridDivLineColor" Value="3082800383"/>
|
||||
<FCUInt Name="GridLineColor" Value="3082800383"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Spreadsheet">
|
||||
<FCText Name="AliasedCellBackgroundColor">#bac8ff</FCText>
|
||||
<FCText Name="NegativeNumberColor">#212529</FCText>
|
||||
<FCText Name="PositiveNumberColor">#212529</FCText>
|
||||
<FCText Name="TextColor">#212529</FCText>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TechDraw">
|
||||
<FCParamGroup Name="Colors">
|
||||
<FCUInt Name="Background" Value="3553874943"/>
|
||||
<FCUInt Name="CutSurfaceColor" Value="3470056191"/>
|
||||
<FCUInt Name="FaceColor" Value="4059297279"/>
|
||||
<FCUInt Name="gridColor" Value="556083711"/>
|
||||
<FCUInt Name="HiddenColor" Value="556083711"/>
|
||||
<FCUInt Name="LightTextColor" Value="1230002175"/>
|
||||
<FCUInt Name="NormalColor" Value="556083711"/>
|
||||
<FCUInt Name="PageColor" Value="4059297279"/>
|
||||
<FCUInt Name="PreSelectColor" Value="4120838399"/>
|
||||
<FCUInt Name="SelectColor" Value="1722290175"/>
|
||||
<FCUInt Name="TemplateUnderlineColor" Value="995875839"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Decorations">
|
||||
<FCUInt Name="CenterColor" Value="556083711"/>
|
||||
<FCUInt Name="HighlightColor" Value="556083711"/>
|
||||
<FCUInt Name="SectionColor" Value="556083711"/>
|
||||
<FCUInt Name="VertexColor" Value="556083711"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Dimensions">
|
||||
<FCUInt Name="Color" Value="556083711"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Markups">
|
||||
<FCUInt Name="Color" Value="556083711"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="NaviCube">
|
||||
<FCUInt Name="BaseColor" Value="4076008191"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="OutputWindow">
|
||||
<FCUInt Name="colorError" Value="4278190335"/>
|
||||
<FCUInt Name="colorLogging" Value="1437270015"/>
|
||||
<FCUInt Name="colorText" Value="556083711"/>
|
||||
<FCUInt Name="colorWarning" Value="4252787455"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Themes">
|
||||
<FCUInt Name="ThemeAccentColor1" Value="1252392959"/>
|
||||
<FCUInt Name="ThemeAccentColor2" Value="3027763199"/>
|
||||
<FCUInt Name="ThemeAccentColor3" Value="1434171135"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TreeView">
|
||||
<FCUInt Name="TreeActiveColor" Value="1538528255"/>
|
||||
<FCUInt Name="TreeEditColor" Value="563609599"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="View">
|
||||
<FCBool Name="Gradient" Value="0"/>
|
||||
<FCBool Name="RadialGradient" Value="0"/>
|
||||
<FCBool Name="Simple" Value="1"/>
|
||||
<FCBool Name="UseBackgroundColorMid" Value="0"/>
|
||||
<FCUInt Name="AnnotationTextColor" Value="876232959"/>
|
||||
<FCUInt Name="BackgroundColor" Value="4160223231"/>
|
||||
<FCUInt Name="BoundingBoxColor" Value="1230002175"/>
|
||||
<FCUInt Name="CbLabelColor" Value="556083711"/>
|
||||
<FCUInt Name="ConstrainedDimColor" Value="3761320447"/>
|
||||
<FCUInt Name="ConstrainedIcoColor" Value="3761320447"/>
|
||||
<FCUInt Name="ConstructionColor" Value="995875839"/>
|
||||
<FCUInt Name="CreateLineColor" Value="556083711"/>
|
||||
<FCUInt Name="CursorCrosshairColor" Value="556083711"/>
|
||||
<FCUInt Name="CursorTextColor" Value="556083711"/>
|
||||
<FCUInt Name="DeactivatedConstrDimColor" Value="2257491711"/>
|
||||
<FCUInt Name="DefaultShapeColor" Value="2914369023"/>
|
||||
<FCUInt Name="DefaultShapeLineColor" Value="421075455"/>
|
||||
<FCUInt Name="DefaultShapeVertexColor" Value="421075455"/>
|
||||
<FCUInt Name="EditedEdgeColor" Value="1230002175"/>
|
||||
<FCUInt Name="EditedVertexColor" Value="556083711"/>
|
||||
<FCUInt Name="ExprBasedConstrDimColor" Value="3761320447"/>
|
||||
<FCUInt Name="ExternalColor" Value="2923350527"/>
|
||||
<FCUInt Name="FullyConstrainedColor" Value="798901503"/>
|
||||
<FCUInt Name="FullyConstraintConstructionElementColor" Value="2443706367"/>
|
||||
<FCUInt Name="FullyConstraintConstructionPointColor" Value="730480383"/>
|
||||
<FCUInt Name="FullyConstraintElementColor" Value="798901503"/>
|
||||
<FCUInt Name="FullyConstraintInternalAlignmentColor" Value="2443706367"/>
|
||||
<FCUInt Name="HeadlightColor" Value="4059297279"/>
|
||||
<FCUInt Name="HiddenLineBackground" Value="4294967040"/>
|
||||
<FCUInt Name="HiddenLineFaceColor" Value="4294967040"/>
|
||||
<FCUInt Name="HighlightColor" Value="7995647"/>
|
||||
<FCUInt Name="InternalAlignedGeoColor" Value="995875839"/>
|
||||
<FCUInt Name="InvalidSketchColor" Value="4252898559"/>
|
||||
<FCUInt Name="NonDrivingConstrDimColor" Value="2257491711"/>
|
||||
<FCUInt Name="SelectionColor" Value="995875839"/>
|
||||
<FCUInt Name="ShadowGroundColor" Value="2105376000"/>
|
||||
<FCUInt Name="ShadowLightColor" Value="4043177728"/>
|
||||
<FCUInt Name="SketchEdgeColor" Value="556083711"/>
|
||||
<FCUInt Name="SketchVertexColor" Value="556083711"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParameters>
|
||||
@@ -18,33 +18,6 @@
|
||||
<tag>catppuccin</tag>
|
||||
<tag>mocha</tag>
|
||||
</preferencepack>
|
||||
<preferencepack>
|
||||
<name>FreeCAD Classic</name>
|
||||
<type>Theme</type>
|
||||
<description>Removes stylesheets, and applies the classic purple/gray background. Resets all colors to default</description>
|
||||
<version>1.0.0</version>
|
||||
<tag>built-in</tag>
|
||||
<tag>background</tag>
|
||||
<tag>no stylesheet</tag>
|
||||
<tag>classic theme</tag>
|
||||
</preferencepack>
|
||||
<preferencepack>
|
||||
<name>FreeCAD Light</name>
|
||||
<type>Theme</type>
|
||||
<description>Applies a basic light theme.</description>
|
||||
<version>1.0.0</version>
|
||||
<tag>built-in</tag>
|
||||
<tag>background</tag>
|
||||
<tag>light</tag>
|
||||
</preferencepack>
|
||||
<preferencepack>
|
||||
<name>FreeCAD Dark</name>
|
||||
<type>Theme</type>
|
||||
<description>Applies a basic dark theme.</description>
|
||||
<version>1.0.0</version>
|
||||
<tag>built-in</tag>
|
||||
<tag>background</tag>
|
||||
<tag>dark</tag>
|
||||
</preferencepack>
|
||||
|
||||
</content>
|
||||
</package>
|
||||
|
||||
@@ -338,11 +338,8 @@ void StartupPostProcess::migrateOldTheme(const std::string& style)
|
||||
{
|
||||
auto prefPackManager = Application::Instance->prefPackManager();
|
||||
|
||||
if (style == "FreeCAD Light.qss") {
|
||||
prefPackManager->apply("FreeCAD Light");
|
||||
}
|
||||
else if (style == "FreeCAD Dark.qss") {
|
||||
prefPackManager->apply("FreeCAD Dark");
|
||||
if (style == "FreeCAD Light.qss" || style == "FreeCAD Dark.qss") {
|
||||
prefPackManager->apply("KindredCreate");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ SET(Stylesheets_Files
|
||||
)
|
||||
|
||||
SET(Parameters_Files
|
||||
"parameters/FreeCAD Dark.yaml"
|
||||
"parameters/FreeCAD Light.yaml"
|
||||
)
|
||||
|
||||
SET(Overlay_Stylesheets_Files
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
3DViewBackgroundRefColor: "@BackgroundColor"
|
||||
ButtonBackgroundHooverColor: "@ButtonTopBackgroundColor"
|
||||
ButtonBorderColor: "@GeneralBorderColor"
|
||||
ButtonBorderHooverColor: "@GeneralBorderColor"
|
||||
ButtonBottomBackgroundColor: "@PrimaryColorLighten2"
|
||||
ButtonTopBackgroundColor: "@PrimaryColorLighten3"
|
||||
CheckedButtonBottomBackgroundColor: "darken(@ButtonBottomBackgroundColor, 5)"
|
||||
CheckedButtonTopBackgroundColor: "darken(@ButtonTopBackgroundColor, 5)"
|
||||
DefaultButtonBottomBackgroundColor: "blend(@ButtonBottomBackgroundColor, @AccentColor, 10)"
|
||||
DefaultButtonTopBackgroundColor: "blend(@ButtonTopBackgroundColor, @AccentColor, 10)"
|
||||
DefaultButtonBorderColor: "blend(@ButtonBorderColor, @AccentColor, 20)"
|
||||
CheckBoxBackgroundColor: "@TextEditFieldBackgroundColor"
|
||||
CheckBoxBorderColor: "@GeneralBorderColor"
|
||||
DialogBackgroundColor: "@PrimaryColorLighten3"
|
||||
GeneralAlternateBackgroundColor: "@PrimaryColorLighten2"
|
||||
GeneralBackgroundColor: "@PrimaryColor"
|
||||
GeneralBackgroundHoverColor: "@PrimaryColorLighten4"
|
||||
GeneralBorderColor: "@PrimaryColorDarken5"
|
||||
GeneralBorderHoverColor: "@PrimaryColorLighten6"
|
||||
GeneralDisabledBackgroundColor: "@PrimaryColorDarken3"
|
||||
GeneralGridLinesColor: "@PrimaryColorLighten3"
|
||||
GeneralHeaderBackgroundColor: "@PrimaryColor"
|
||||
GroupboxBackgroundColor: "@PrimaryColorLighten4"
|
||||
GroupboxBorderColor: "lighten(@GroupboxBackgroundColor,20)"
|
||||
IconsLocationFolderName: "images_classic"
|
||||
InputFieldBorderRadius: "3px"
|
||||
MenuBackgroundColor: "@PrimaryColorDarken4"
|
||||
PrimaryColor: "#191919"
|
||||
PrimaryColorDarken1: "darken(@PrimaryColor,5)"
|
||||
PrimaryColorDarken2: "darken(@PrimaryColor,8)"
|
||||
PrimaryColorDarken3: "darken(@PrimaryColor,15)"
|
||||
PrimaryColorDarken4: "darken(@PrimaryColor,20)"
|
||||
PrimaryColorDarken5: "darken(@PrimaryColor,200)"
|
||||
PrimaryColorDarken6: "darken(@PrimaryColor,5890)"
|
||||
PrimaryColorLighten1: "lighten(@PrimaryColor,20)"
|
||||
PrimaryColorLighten2: "lighten(@PrimaryColor,40)"
|
||||
PrimaryColorLighten3: "lighten(@PrimaryColor,80)"
|
||||
PrimaryColorLighten4: "lighten(@PrimaryColor,100)"
|
||||
PrimaryColorLighten5: "lighten(@PrimaryColor,300)"
|
||||
PrimaryColorLighten6: "lighten(@PrimaryColor,5890)"
|
||||
RadioButtonBackgroundColor: "@CheckBoxBackgroundColor"
|
||||
RadioButtonBorderColor: "@GeneralBorderColor"
|
||||
ScrollbarBackgroundColor: "@GeneralDisabledBackgroundColor"
|
||||
SketcherConflictingConstraintsColor: "#fc6c6c"
|
||||
SketcherEmptySketchColor: "#ffffff"
|
||||
SketcherFullyConstrainedColor: "#8cff5b"
|
||||
SketcherMalformedConstraintsColor: "#fc6c6c"
|
||||
SketcherPartiallyRedundantConstraintsColor: "#77cbff"
|
||||
SketcherRedundantConstraintsColor: "#ffa256"
|
||||
SketcherSolverFailedColor: "#ff9090"
|
||||
SketcherUnderConstrainedColor: "#ffffff"
|
||||
StylesheetIconsColor: "white"
|
||||
TabbarBackgroundColor: "@PrimaryColorDarken5"
|
||||
InActiveTabBackgroundColor: "@PrimaryColorDarken2"
|
||||
ActiveTabBackgroundColor: "@3DViewBackgroundRefColor"
|
||||
TextDisabledColor: "darken(@TextForegroundColor,40)"
|
||||
TextEditFieldBackgroundColor: "@PrimaryColor"
|
||||
TextForegroundColor: "#ffffff"
|
||||
TextSelectBackgroundColor: "darken(@AccentColor,100)"
|
||||
TextUrlColor: "#0095ff"
|
||||
ToolbarButtonsPadding: "2px"
|
||||
AccentColor: "@ThemeAccentColor1"
|
||||
AccentBackgroundColor: "blend(@GeneralBackgroundColor,@AccentColor,60)"
|
||||
AccentHoverColor: "blend(@GeneralBackgroundHoverColor,@AccentColor,30)"
|
||||
@@ -1,64 +0,0 @@
|
||||
3DViewBackgroundRefColor: "@BackgroundColor"
|
||||
ButtonBackgroundHooverColor: "@ButtonTopBackgroundColor"
|
||||
ButtonBorderColor: "@GeneralBorderColor"
|
||||
ButtonBorderHooverColor: "@GeneralBorderColor"
|
||||
ButtonBottomBackgroundColor: "@PrimaryColorDarken1"
|
||||
ButtonTopBackgroundColor: "@PrimaryColorLighten3"
|
||||
CheckedButtonBottomBackgroundColor: "darken(@ButtonBottomBackgroundColor, 5)"
|
||||
CheckedButtonTopBackgroundColor: "darken(@ButtonTopBackgroundColor, 5)"
|
||||
DefaultButtonBottomBackgroundColor: "blend(@ButtonBottomBackgroundColor, @AccentColor, 5)"
|
||||
DefaultButtonTopBackgroundColor: "blend(@ButtonTopBackgroundColor, @AccentColor, 5)"
|
||||
DefaultButtonBorderColor: "blend(@ButtonBorderColor, @AccentColor, 40)"
|
||||
CheckBoxBackgroundColor: "@TextEditFieldBackgroundColor"
|
||||
CheckBoxBorderColor: "@GeneralBorderColor"
|
||||
DialogBackgroundColor: "@PrimaryColorLighten3"
|
||||
GeneralAlternateBackgroundColor: "@PrimaryColor"
|
||||
GeneralBackgroundColor: "@PrimaryColor"
|
||||
GeneralBackgroundHoverColor: "@PrimaryColorLighten5"
|
||||
GeneralBorderColor: "@PrimaryColorDarken4"
|
||||
GeneralBorderHoverColor: "@PrimaryColorDarken5"
|
||||
GeneralDisabledBackgroundColor: "@PrimaryColorDarken3"
|
||||
GeneralGridLinesColor: "@PrimaryColorDarken4"
|
||||
GeneralHeaderBackgroundColor: "@PrimaryColorDarken2"
|
||||
GroupboxBackgroundColor: "@PrimaryColorLighten2"
|
||||
GroupboxBorderColor: "darken(@GroupboxBackgroundColor,20)"
|
||||
IconsLocationFolderName: "images_classic"
|
||||
InputFieldBorderRadius: "3px"
|
||||
MenuBackgroundColor: "@PrimaryColorLighten1"
|
||||
PrimaryColor: "#F0F0F0"
|
||||
PrimaryColorDarken1: "darken(@PrimaryColor,4)"
|
||||
PrimaryColorDarken2: "darken(@PrimaryColor,8)"
|
||||
PrimaryColorDarken3: "darken(@PrimaryColor,10)"
|
||||
PrimaryColorDarken4: "darken(@PrimaryColor,20)"
|
||||
PrimaryColorDarken5: "darken(@PrimaryColor,200)"
|
||||
PrimaryColorDarken6: "darken(@PrimaryColor,5890)"
|
||||
PrimaryColorLighten1: "lighten(@PrimaryColor,2)"
|
||||
PrimaryColorLighten2: "lighten(@PrimaryColor,3)"
|
||||
PrimaryColorLighten3: "lighten(@PrimaryColor,4)"
|
||||
PrimaryColorLighten4: "lighten(@PrimaryColor,5)"
|
||||
PrimaryColorLighten5: "lighten(@PrimaryColor,6)"
|
||||
PrimaryColorLighten6: "lighten(@PrimaryColor,7)"
|
||||
RadioButtonBackgroundColor: "@CheckBoxBackgroundColor"
|
||||
RadioButtonBorderColor: "@GeneralBorderColor"
|
||||
ScrollbarBackgroundColor: "@GeneralDisabledBackgroundColor"
|
||||
SketcherConflictingConstraintsColor: "#9d0000"
|
||||
SketcherEmptySketchColor: "#000000"
|
||||
SketcherFullyConstrainedColor: "#278100"
|
||||
SketcherMalformedConstraintsColor: "#9d0000"
|
||||
SketcherPartiallyRedundantConstraintsColor: "#005991"
|
||||
SketcherRedundantConstraintsColor: "#ab4d00"
|
||||
SketcherSolverFailedColor: "#9d0000"
|
||||
SketcherUnderConstrainedColor: "#000000"
|
||||
StylesheetIconsColor: "black"
|
||||
TabbarBackgroundColor: "@PrimaryColorDarken4"
|
||||
InActiveTabBackgroundColor: "@PrimaryColorDarken2"
|
||||
ActiveTabBackgroundColor: "@3DViewBackgroundRefColor"
|
||||
TextDisabledColor: "darken(@TabbarBackgroundColor,80)"
|
||||
TextEditFieldBackgroundColor: "@PrimaryColorLighten3"
|
||||
TextForegroundColor: "#000000"
|
||||
TextSelectBackgroundColor: "@AccentHoverColor"
|
||||
TextUrlColor: "#0061a7"
|
||||
AccentColor: "@ThemeAccentColor1"
|
||||
AccentBackgroundColor: "blend(@GeneralBackgroundColor,@AccentColor,60)"
|
||||
AccentHoverColor: "blend(@GeneralBackgroundHoverColor,@AccentColor,30)"
|
||||
ToolbarButtonsPadding: "2px"
|
||||
@@ -21,143 +21,34 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QString>
|
||||
#include <QStyleHints>
|
||||
#include <QToolButton>
|
||||
|
||||
|
||||
#include "ThemeSelectorWidget.h"
|
||||
#include <gsl/pointers>
|
||||
#include <App/Application.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/PreferencePackManager.h>
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
#ifdef FC_OS_MACOSX
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
#endif
|
||||
|
||||
using namespace StartGui;
|
||||
|
||||
|
||||
static bool isSystemInDarkMode()
|
||||
{
|
||||
// Auto-detect system setting and default to light mode
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
// https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5
|
||||
const auto scheme = QGuiApplication::styleHints()->colorScheme();
|
||||
return scheme == Qt::ColorScheme::Dark;
|
||||
#elif QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
|
||||
// https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5
|
||||
const QPalette defaultPalette;
|
||||
const auto text = defaultPalette.color(QPalette::WindowText);
|
||||
const auto window = defaultPalette.color(QPalette::Window);
|
||||
return text.lightness() > window.lightness();
|
||||
#else
|
||||
# ifdef FC_OS_MACOSX
|
||||
auto key = CFSTR("AppleInterfaceStyle");
|
||||
if (auto value = CFPreferencesCopyAppValue(key, kCFPreferencesAnyApplication)) {
|
||||
// If the value is "Dark", Dark Mode is enabled
|
||||
if (CFGetTypeID(value) == CFStringGetTypeID()) {
|
||||
if (CFStringCompare((CFStringRef)value, CFSTR("Dark"), kCFCompareCaseInsensitive)
|
||||
== kCFCompareEqualTo) {
|
||||
CFRelease(value);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
CFRelease(value);
|
||||
}
|
||||
# endif // FC_OS_MACOSX
|
||||
#endif // QT_VERSION >= 6.4+
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static bool shouldHideClassicTheme()
|
||||
{
|
||||
// Classic on macOS and windows 11 with qt6(.4+?) doesn't work when system
|
||||
// is in dark mode and to make matter worse, on macOS there's a setting that
|
||||
// changes mode depending on time of day.
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0) || defined(FC_OS_MACOSX) || defined(FC_OS_WIN32)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
ThemeSelectorWidget::ThemeSelectorWidget(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, _titleLabel {nullptr}
|
||||
, _descriptionLabel {nullptr}
|
||||
, _buttons {nullptr, nullptr, nullptr}
|
||||
, _themeButton {nullptr}
|
||||
{
|
||||
setObjectName(QLatin1String("ThemeSelectorWidget"));
|
||||
if (shouldHideClassicTheme()) {
|
||||
preselectThemeFromSystemSettings();
|
||||
}
|
||||
applyKindredCreateTheme();
|
||||
setupUi();
|
||||
qApp->installEventFilter(this);
|
||||
}
|
||||
|
||||
|
||||
void ThemeSelectorWidget::setupButtons(QBoxLayout* layout)
|
||||
void ThemeSelectorWidget::applyKindredCreateTheme()
|
||||
{
|
||||
if (!layout) {
|
||||
return;
|
||||
}
|
||||
std::map<Theme, QString> themeMap {
|
||||
{Theme::Classic, tr("FreeCAD Classic")},
|
||||
{Theme::Dark, tr("FreeCAD Dark")},
|
||||
{Theme::Light, tr("FreeCAD Light")}
|
||||
};
|
||||
std::map<Theme, QIcon> iconMap {
|
||||
{Theme::Classic, QIcon(QLatin1String(":/thumbnails/Theme_thumbnail_classic.png"))},
|
||||
{Theme::Light, QIcon(QLatin1String(":/thumbnails/Theme_thumbnail_light.png"))},
|
||||
{Theme::Dark, QIcon(QLatin1String(":/thumbnails/Theme_thumbnail_dark.png"))}
|
||||
};
|
||||
auto hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/MainWindow"
|
||||
);
|
||||
auto styleSheetName = QString::fromStdString(hGrp->GetASCII("StyleSheet"));
|
||||
for (const auto& theme : themeMap) {
|
||||
auto button = gsl::owner<QToolButton*>(new QToolButton());
|
||||
|
||||
if (theme.first == Theme::Classic && shouldHideClassicTheme()) {
|
||||
button->setVisible(false);
|
||||
}
|
||||
|
||||
button->setCheckable(true);
|
||||
button->setAutoExclusive(true);
|
||||
button->setToolButtonStyle(Qt::ToolButtonStyle::ToolButtonTextUnderIcon);
|
||||
button->setText(theme.second);
|
||||
button->setIcon(iconMap[theme.first]);
|
||||
button->setIconSize(iconMap[theme.first].actualSize(QSize(256, 256)));
|
||||
if (theme.first == Theme::Classic && styleSheetName.isEmpty()) {
|
||||
button->setChecked(true);
|
||||
}
|
||||
else if (theme.first == Theme::Light
|
||||
&& styleSheetName.contains(
|
||||
QLatin1String("FreeCAD Light"),
|
||||
Qt::CaseSensitivity::CaseInsensitive
|
||||
)) {
|
||||
button->setChecked(true);
|
||||
}
|
||||
else if (theme.first == Theme::Dark
|
||||
&& styleSheetName.contains(
|
||||
QLatin1String("FreeCAD Dark"),
|
||||
Qt::CaseSensitivity::CaseInsensitive
|
||||
)) {
|
||||
button->setChecked(true);
|
||||
}
|
||||
connect(button, &QToolButton::clicked, this, [this, theme] { themeChanged(theme.first); });
|
||||
layout->addWidget(button);
|
||||
_buttons[static_cast<int>(theme.first)] = button;
|
||||
}
|
||||
auto prefPackManager = Gui::Application::Instance->prefPackManager();
|
||||
prefPackManager->apply("KindredCreate");
|
||||
}
|
||||
|
||||
void ThemeSelectorWidget::setupUi()
|
||||
@@ -169,69 +60,16 @@ void ThemeSelectorWidget::setupUi()
|
||||
outerLayout->addWidget(_titleLabel);
|
||||
outerLayout->addLayout(buttonLayout);
|
||||
outerLayout->addWidget(_descriptionLabel);
|
||||
setupButtons(buttonLayout);
|
||||
|
||||
_themeButton = gsl::owner<QToolButton*>(new QToolButton());
|
||||
_themeButton->setCheckable(true);
|
||||
_themeButton->setChecked(true);
|
||||
_themeButton->setToolButtonStyle(Qt::ToolButtonStyle::ToolButtonTextUnderIcon);
|
||||
_themeButton->setIcon(QIcon(QLatin1String(":/thumbnails/Theme_thumbnail_dark.png")));
|
||||
_themeButton->setIconSize(_themeButton->icon().actualSize(QSize(256, 256)));
|
||||
buttonLayout->addWidget(_themeButton);
|
||||
|
||||
retranslateUi();
|
||||
connect(_descriptionLabel, &QLabel::linkActivated, this, &ThemeSelectorWidget::onLinkActivated);
|
||||
}
|
||||
|
||||
void ThemeSelectorWidget::onLinkActivated(const QString& link)
|
||||
{
|
||||
auto const addonManagerLink = QStringLiteral("freecad:Std_AddonMgr");
|
||||
|
||||
if (link != addonManagerLink) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Set the user preferences to include only preference packs.
|
||||
// This is a quick and dirty way to open Addon Manager with only themes.
|
||||
auto pref = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/Addons"
|
||||
);
|
||||
pref->SetInt("PackageTypeSelection", 3); // 3 stands for Preference Packs
|
||||
pref->SetInt("StatusSelection", 0); // 0 stands for any installation status
|
||||
|
||||
Gui::Application::Instance->commandManager().runCommandByName("Std_AddonMgr");
|
||||
}
|
||||
|
||||
void ThemeSelectorWidget::preselectThemeFromSystemSettings()
|
||||
{
|
||||
auto nullStyle("<N/A>");
|
||||
auto hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/MainWindow"
|
||||
);
|
||||
auto styleSheetName = QString::fromStdString(hGrp->GetASCII("StyleSheet", nullStyle));
|
||||
if (styleSheetName == QString::fromStdString(nullStyle)) {
|
||||
auto theme = isSystemInDarkMode() ? Theme::Dark : Theme::Light;
|
||||
themeChanged(theme);
|
||||
}
|
||||
}
|
||||
|
||||
void ThemeSelectorWidget::themeChanged(Theme newTheme)
|
||||
{
|
||||
// Run the appropriate preference pack:
|
||||
auto prefPackManager = Gui::Application::Instance->prefPackManager();
|
||||
switch (newTheme) {
|
||||
case Theme::Classic:
|
||||
prefPackManager->apply("FreeCAD Classic");
|
||||
break;
|
||||
case Theme::Dark:
|
||||
prefPackManager->apply("FreeCAD Dark");
|
||||
break;
|
||||
case Theme::Light:
|
||||
prefPackManager->apply("FreeCAD Light");
|
||||
break;
|
||||
}
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/Themes"
|
||||
);
|
||||
const unsigned long nonExistentColor = -1434171135;
|
||||
const unsigned long defaultAccentColor = 1434171135;
|
||||
unsigned long longAccentColor1 = hGrp->GetUnsigned("ThemeAccentColor1", nonExistentColor);
|
||||
if (longAccentColor1 == nonExistentColor) {
|
||||
hGrp->SetUnsigned("ThemeAccentColor1", defaultAccentColor);
|
||||
hGrp->SetUnsigned("ThemeAccentColor2", defaultAccentColor);
|
||||
hGrp->SetUnsigned("ThemeAccentColor3", defaultAccentColor);
|
||||
}
|
||||
}
|
||||
|
||||
bool ThemeSelectorWidget::eventFilter(QObject* object, QEvent* event)
|
||||
@@ -245,16 +83,8 @@ bool ThemeSelectorWidget::eventFilter(QObject* object, QEvent* event)
|
||||
void ThemeSelectorWidget::retranslateUi()
|
||||
{
|
||||
_titleLabel->setText(QLatin1String("<h2>") + tr("Theme") + QLatin1String("</h2>"));
|
||||
if (Gui::Application::Instance->commandManager().getCommandByName("Std_AddonMgr")) {
|
||||
_descriptionLabel->setText(
|
||||
tr("Looking for more themes? You can obtain them using "
|
||||
"<a href=\"freecad:Std_AddonMgr\">Addon Manager</a>.")
|
||||
);
|
||||
}
|
||||
else {
|
||||
_descriptionLabel->hide();
|
||||
}
|
||||
_buttons[static_cast<int>(Theme::Dark)]->setText(tr("FreeCAD Dark", "Visual theme name"));
|
||||
_buttons[static_cast<int>(Theme::Light)]->setText(tr("FreeCAD Light", "Visual theme name"));
|
||||
_buttons[static_cast<int>(Theme::Classic)]->setText(tr("FreeCAD Classic", "Visual theme name"));
|
||||
_descriptionLabel->setText(
|
||||
tr("Kindred Create uses the Catppuccin Mocha theme.")
|
||||
);
|
||||
_themeButton->setText(tr("Kindred Create", "Visual theme name"));
|
||||
}
|
||||
|
||||
@@ -25,23 +25,14 @@
|
||||
#define FREECAD_START_THEMESELECTORWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <array>
|
||||
|
||||
class QBoxLayout;
|
||||
class QLabel;
|
||||
class QToolButton;
|
||||
|
||||
namespace StartGui
|
||||
{
|
||||
|
||||
enum class Theme
|
||||
{
|
||||
Classic,
|
||||
Light,
|
||||
Dark
|
||||
};
|
||||
|
||||
/// A widget to allow selection of the UI theme (color scheme).
|
||||
/// A widget that displays the active Kindred Create theme.
|
||||
class ThemeSelectorWidget: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -49,19 +40,14 @@ public:
|
||||
explicit ThemeSelectorWidget(QWidget* parent = nullptr);
|
||||
bool eventFilter(QObject* object, QEvent* event) override;
|
||||
|
||||
protected:
|
||||
void themeChanged(Theme newTheme);
|
||||
|
||||
private:
|
||||
void retranslateUi();
|
||||
void setupUi();
|
||||
void setupButtons(QBoxLayout* layout);
|
||||
void onLinkActivated(const QString& link);
|
||||
void preselectThemeFromSystemSettings();
|
||||
void applyKindredCreateTheme();
|
||||
|
||||
QLabel* _titleLabel;
|
||||
QLabel* _descriptionLabel;
|
||||
std::array<QToolButton*, 3> _buttons;
|
||||
QToolButton* _themeButton;
|
||||
};
|
||||
|
||||
} // namespace StartGui
|
||||
|
||||
Reference in New Issue
Block a user