[GUI] Add PreferencePack support
Preference Packs are collections of preferences that can be applied en mass to the user's current setup. Any preference that can be stored in user.cfg can be stored in a preference pack, and they are designed to be easy to distribute. Support is also added for saving a subset of current preferences into a new preference pack in order to facilitate easy creation of new "themes", etc.
This commit is contained in:
28
src/Gui/PreferencePacks/CMakeLists.txt
Normal file
28
src/Gui/PreferencePacks/CMakeLists.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
SET(PreferencePacks_Files
|
||||
"package.xml"
|
||||
)
|
||||
|
||||
SET(PreferencePacks_Directories
|
||||
"FreeCAD Classic Colors"
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET(PreferencePacks_data ALL
|
||||
SOURCES ${PreferencePacks_Files} ${PreferencePacks_Directories}
|
||||
)
|
||||
|
||||
FILE(COPY ${PreferencePacks_Files} ${PreferencePacks_Directories} DESTINATION "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Gui/PreferencePacks")
|
||||
|
||||
INSTALL(
|
||||
FILES
|
||||
${PreferencePacks_Files}
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_DATADIR}/Gui/PreferencePacks
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
DIRECTORY
|
||||
${PreferencePacks_Directories}
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_DATADIR}/Gui/PreferencePacks
|
||||
)
|
||||
@@ -0,0 +1,134 @@
|
||||
<?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="674321151"/>
|
||||
<FCUInt Name="defaultSpaceColor" Value="4280090879"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Draft">
|
||||
<FCInt Name="gridTransparency" Value="0"/>
|
||||
<FCUInt Name="constructioncolor" Value="746455039"/>
|
||||
<FCUInt Name="gridColor" Value="842157055"/>
|
||||
<FCUInt Name="snapcolor" Value="4294967295"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Path">
|
||||
<FCUInt Name="DefaultNormalPathColor" Value="11141375"/>
|
||||
<FCUInt Name="DefaultRapidPathColor" Value="2852126975"/>
|
||||
<FCUInt Name="DefaultPathMarkerColor" Value="1442775295"/>
|
||||
<FCUInt Name="DefaultExtentsColor" Value="3823363071"/>
|
||||
<FCUInt Name="DefaultProbePathColor" Value="4294903295"/>
|
||||
<FCUInt Name="DefaultHighlightPathColor" Value="4286382335"/>
|
||||
<FCUInt Name="DefaultBBoxSelectionColor" Value="3372220415"/>
|
||||
<FCUInt Name="DefaultBBoxNormalColor" Value="4294967295"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Start">
|
||||
<FCUInt Name="BackgroundColor1" Value="1331197183"/>
|
||||
<FCUInt Name="BackgroundTextColor" Value="4294703103"/>
|
||||
<FCUInt Name="PageColor" Value="4294967295"/>
|
||||
<FCUInt Name="PageTextColor" Value="255"/>
|
||||
<FCUInt Name="BoxColor" Value="3722305023"/>
|
||||
<FCUInt Name="LinkColor" Value="65535"/>
|
||||
<FCUInt Name="BackgroundColor2" Value="2141107711"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TechDraw">
|
||||
<FCParamGroup Name="Decorations">
|
||||
<FCUInt Name="SectionColor" Value="255"/>
|
||||
<FCUInt Name="CenterColor" Value="255"/>
|
||||
<FCUInt Name="VertexColor" Value="255"/>
|
||||
<FCUInt Name="HighlightColor" Value="255"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Colors">
|
||||
<FCBool Name="ClearFace" Value="1"/>
|
||||
<FCUInt Name="Hatch" Value="255"/>
|
||||
<FCUInt Name="Background" Value="3553874943"/>
|
||||
<FCUInt Name="PreSelectColor" Value="4294902015"/>
|
||||
<FCUInt Name="HiddenColor" Value="255"/>
|
||||
<FCUInt Name="SelectColor" Value="16711935"/>
|
||||
<FCUInt Name="NormalColor" Value="255"/>
|
||||
<FCUInt Name="CutSurfaceColor" Value="3553874943"/>
|
||||
<FCUInt Name="GeomHatch" Value="255"/>
|
||||
<FCUInt Name="FaceColor" Value="4294967295"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="OutputWindow">
|
||||
<FCUInt Name="colorText" Value="255"/>
|
||||
<FCUInt Name="colorLogging" Value="65535"/>
|
||||
<FCUInt Name="colorWarning" Value="4289331455"/>
|
||||
<FCUInt Name="colorError" Value="4278190335"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Editor">
|
||||
<FCUInt Name="Text" Value="0"/>
|
||||
<FCUInt Name="Bookmark" Value="16776960"/>
|
||||
<FCUInt Name="Breakpoint" Value="4278190080"/>
|
||||
<FCUInt Name="Keyword" Value="65280"/>
|
||||
<FCUInt Name="Comment" Value="11141120"/>
|
||||
<FCUInt Name="Block comment" Value="2694882304"/>
|
||||
<FCUInt Name="Number" Value="65280"/>
|
||||
<FCUInt Name="String" Value="4278190080"/>
|
||||
<FCUInt Name="Character" Value="4278190080"/>
|
||||
<FCUInt Name="Class name" Value="4289331200"/>
|
||||
<FCUInt Name="Define name" Value="4289331200"/>
|
||||
<FCUInt Name="Operator" Value="2694882304"/>
|
||||
<FCUInt Name="Python output" Value="2863300352"/>
|
||||
<FCUInt Name="Python error" Value="4278190080"/>
|
||||
<FCUInt Name="Current line highlight" Value="3772833792"/>
|
||||
</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="56575"/>
|
||||
<FCUInt Name="ExternalColor" Value="3425924095"/>
|
||||
<FCUInt Name="InvalidSketchColor" Value="4285333759"/>
|
||||
<FCUInt Name="FullyConstrainedColor" Value="16711935"/>
|
||||
<FCUInt Name="InternalAlignedGeoColor" Value="2998042623"/>
|
||||
<FCUInt Name="FullyConstraintElementColor" Value="2161156351"/>
|
||||
<FCUInt Name="FullyConstraintConstructionElementColor" Value="2410282495"/>
|
||||
<FCUInt Name="FullyConstraintInternalAlignmentColor" Value="3739142399"/>
|
||||
<FCUInt Name="FullyConstraintConstructionPointColor" Value="4287987967"/>
|
||||
<FCUInt Name="ConstrainedIcoColor" Value="4280680703"/>
|
||||
<FCUInt Name="NonDrivingConstrDimColor" Value="2555903"/>
|
||||
<FCUInt Name="ConstrainedDimColor" Value="4280680703"/>
|
||||
<FCUInt Name="ExprBasedConstrDimColor" Value="4286523135"/>
|
||||
<FCUInt Name="DeactivatedConstrDimColor" Value="2139062271"/>
|
||||
<FCUInt Name="CursorTextColor" Value="65535"/>
|
||||
<FCUInt Name="CursorCrosshairColor" Value="4294967295"/>
|
||||
<FCUInt Name="CreateLineColor" Value="3435973887"/>
|
||||
<FCBool Name="Simple" Value="0"/>
|
||||
<FCBool Name="Gradient" Value="1"/>
|
||||
<FCBool Name="UseBackgroundColorMid" Value="0"/>
|
||||
<FCBool Name="RandomColor" Value="0"/>
|
||||
<FCUInt Name="BacklightColor" Value="4294967295"/>
|
||||
<FCUInt Name="BackgroundColor" Value="336897023"/>
|
||||
<FCUInt Name="BackgroundColor2" Value="859006463"/>
|
||||
<FCUInt Name="BackgroundColor3" Value="2543299327"/>
|
||||
<FCUInt Name="BackgroundColor4" Value="1869583359"/>
|
||||
<FCUInt Name="HighlightColor" Value="3789624575"/>
|
||||
<FCUInt Name="SelectionColor" Value="481107199"/>
|
||||
<FCUInt Name="DefaultShapeColor" Value="3435973887"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="TreeView">
|
||||
<FCUInt Name="TreeEditColor" Value="4294902015"/>
|
||||
<FCUInt Name="TreeActiveColor" Value="3873898495"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="MainWindow">
|
||||
<FCBool Name="TiledBackground" Value="0"/>
|
||||
<FCText Name="StyleSheet"></FCText>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
|
||||
</FCParameters>
|
||||
19
src/Gui/PreferencePacks/package.xml
Normal file
19
src/Gui/PreferencePacks/package.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<package format="1">
|
||||
<name>Built-In Preference Packs</name>
|
||||
<description>Preference Packs included with the FreeCAD distribution</description>
|
||||
<version>1.0.0</version>
|
||||
<maintainer email="email@freecadweb.org">No Maintainer</maintainer>
|
||||
<license file="../../LICENSE">LGPL2</license>
|
||||
<url type="repository">https://github.com/FreeCAD/FreeCAD</url>
|
||||
|
||||
<content>
|
||||
<preferencepack>
|
||||
<name>FreeCAD Classic Colors</name>
|
||||
<description>FreeCAD default colors for core app and included Mods.</description>
|
||||
<version>1.0.0</version>
|
||||
<type>appearance</type>
|
||||
</preferencepack>
|
||||
</content>
|
||||
|
||||
</package>
|
||||
Reference in New Issue
Block a user