Commit Graph

38 Commits

Author SHA1 Message Date
Kacper Donat
702aa21f6c Gui: Migrate to new styles
Since some time we have new stylesheets based on style parameters. For
compatibility reasons however old stylesheets were left in the project -
this commit removes them by reapplying the theme if old stylesheet is
detected.
2026-01-04 10:33:40 -09:00
Kacper Donat
0120299a80 Gui: Respect both content size and minimum width for buttons
This is a hacky fix for https://github.com/FreeCAD/FreeCAD/issues/23607

Basically after widget is shown or polished we enforce it's minimum size to at
least cover the minimum size hint - something that QSS ignores if min-width is
specified.
2025-12-15 10:17:34 -06:00
Kacper Donat
bb234b3b44 Gui: Fix stylesheet loading order
For some platforms due to event loop and timer triggering being not
deterministic stylesheets could be loaded before style parameters were
fully loaded. This caused warnings about style parameters to appear
potentially confusing users.

This commit changes the stylesheet loading to happen much earlier in the
process so the stylesheet is applied before theme preselection has
chance to happen.
2025-11-19 13:00:14 -06:00
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Chris Hennes
7949f8a172 Gui: Migration UI take 2 2025-09-17 10:43:16 -05:00
Chris Hennes
d9e6ee8fa1 Gui: Improve version migration UX 2025-09-17 10:43:16 -05:00
Markus Reitböck
a72a0d6405 Gui: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:03 +02:00
Chris Hennes
c1805413e0 Gui: Refactor to not use std::ranges
Older Ubuntu doesn't like the mechanism used to split on commas
2025-08-27 11:51:22 -05:00
Chris Hennes
ade698e52d Gui: Detect new versions and offer to migrate
At the very end of the startup process, check to see if we are using a
versioned directory from a previous version, or we are not versioned at
all but are using the system's default storage location (that is, not a
custom config path set on the command line, etc.). If so, offer to
migrate the old configration folders into new ones for the current
version.
2025-08-27 11:51:22 -05:00
Max Wilfinger
6692dacc0a Gui: Update UI strings for consistency
Closes: #22135
2025-08-04 20:14:45 +02:00
Alfredo Monclus
127b1c8432 Gui: add 'System' style to leave QtStyle unset 2025-05-16 07:52:32 -06:00
Alfredo Monclus
07c234078b Gui: Set QStyle to Fusion if not set 2025-05-15 21:20:48 -06:00
Jacob Oursland
77fdca1347 Gui: use 'C.UTF-8' for locale as Qt requires UTF-8. 2025-05-06 16:06:10 -05:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
mosfet80
24fa7c0166 Clean StartupProcess.cpp (#19642)
Co-authored-by: Benjamin Nauck <benjamin@nauck.se>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-02-24 10:21:26 -06:00
Benjamin Bræstrup Sayoc
8d2d0a47f4 Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
tritao
4c93a14fea Gui: Reorganize the dialog files into a top Dialogs folder. 2025-01-24 16:28:02 -06:00
Benjamin Nauck
1e91ad56bc Move where icons in menus attribute is set
Without this, icons are not visible on macOS
2024-12-20 11:55:21 -05:00
Ladislav Michl
72bc8ae627 Gui: set Qt attributes in setupApplication() 2024-11-12 07:59:47 +01:00
Ladislav Michl
3f870deb51 Gui: refactor hiddenMainWindow usage 2024-11-12 07:53:38 +01:00
Frank Martinez
47ecb6b401 Revert 9b409da due to a regression in some platforms 2024-09-30 18:06:50 +02:00
Frank Martinez
0f2da45cbd Splash Screen minimal show time. Issue #16264 2024-09-23 16:06:59 -05:00
Kacper Donat
33cd969280 Gui: Use FreeCAD Theme only for FreeCAD stuff 2024-09-14 17:38:47 +02:00
Benjamin Bræstrup Sayoc
33ab8fa2e8 [Gui] QtStyle preference consistency
Previously, the some of the code searched for the QtStyle in the wrong location
2024-09-06 10:34:04 +02:00
Chris Hennes
30863382de Merge pull request #15588 from cjmayo/ThemeSearchPaths
Remove icon ThemeSearchPaths option on Linux
2024-08-05 10:41:41 -05:00
Chris Hennes
828e85963e Merge pull request #15451 from Ondsel-Development/fix-single-instance-windows
Core: Fix single instance windows
2024-07-29 10:42:47 -05:00
Chris Mayo
53e613fe46 Copy current icon theme name to the fallback on startup 2024-07-25 19:21:25 +01:00
Chris Mayo
969e5c2f3c Remove icon ThemeSearchPaths option on Linux
ThemeSearchPaths option was originally introduced in:
f640562b98 ("Option to opt-out from using a Linux desktop icon theme.", 2020-01-26)

It was set on by default in:
f45a4de3ee ("Gui: Use FreeCAD supplied icons on Linux by default", 2024-06-26)

The key effect of the option is to select the FreeCAD-default icon theme.
The code also unnecessarily resets QIcon::themeSearchPaths,
":\icons" is always included in the default search paths [1],
when when using QAdwaitaDecorations causes window frame control icons
not to be displayed:

  (qt.qpa.qadwaitadecorations) Failed to find an svg icon for  "window-close-symbolic.svg"
  (qt.qpa.qadwaitadecorations) Failed to find an svg icon for  "window-minimize-symbolic.svg"
  (qt.qpa.qadwaitadecorations) Failed to find an svg icon for  "window-maximize-symbolic.svg"
  (qt.qpa.qadwaitadecorations) Failed to find an svg icon for  "window-restore-symbolic.svg"

A different default icon theme can still be chosen with the Name option.

[1] https://doc.qt.io/qt-6/qicon.html#themeSearchPaths
2024-07-23 19:26:14 +01:00
Pieter Hijma
5a029ccf0f Core: Improve communication single-instance 2024-07-22 17:39:32 +02:00
Kacper Donat
a76226d70f Gui: Use FreeCAD supplied icons on Linux by default
Fixes: #14968
2024-07-15 21:16:24 +02:00
Kacper Donat
3e4195410e Gui: Add QtStyle user parameter
This allows theme developers to set proper Qt style.
2024-06-06 22:26:21 -05:00
Chris Hennes
65f3965717 Merge pull request #14082 from Ondsel-Development/issue_13522_fix_read_lock
Core: Add read lock to fix for possible race conditions reading/writing config files
2024-05-27 10:41:23 -05:00
Johannes Wüller
33e91421b5 Fix backwards-compatible Qt6 warnings 2024-05-13 11:39:24 -05:00
wmayer
281230c520 Core: Fix possible race conditions when reading or writing config file 2024-05-06 13:24:17 +02:00
wmayer
384902c26c Gui: Fix broken toolbars layout due to MaterialWorkbench
The explicit activation of the MaterialWorkbench breaks the toolbars layout for every start. When fixing it manually it will be broken
again after the next start.

Because the core doesn't depend on the Material module it's a no-go to add an explicit runtime dependency to the corresponding workbench.

Since the Part module depends on the Materials module and the PartGui on MatGui the correct way is to let Part an PartGui load their
dependencies.
2024-04-05 10:08:06 +02:00
David Carter
ba20441935 Material: Material appearance
Uses new material system for appearance

Each feature object now has a property called ShapeMaterial that
describes its physical properties. If it has a shape, it has a
material.

The ShapeColor attribute is replaced by a ShapeAppearance attribute.
This is a material list that describes all appearance properties, not
just diffuse color. As a list in can be used for all elements of a
shape, such as edges and faces.

A new widget is provided to allow the user to select materials in a
consistent fashion. It can also launch the material editor with its
more advanced capabilities.
2024-04-04 07:39:58 -05:00
Max Wilfinger
bdebed7d17 display current active document in main window title 2024-03-18 17:36:20 +01:00
wmayer
f085a602bd Gui: refactor Application::runApplication 2024-02-26 11:21:38 -06:00