Commit Graph

239 Commits

Author SHA1 Message Date
Chris Hennes
93a9b87c59 Gui: Make narrowing conversion float->int explicit 2025-06-22 17:11:22 -05:00
Chris Hennes
cb34546d4c Gui: Mark widget as [[maybe_unused]] 2025-06-22 17:06:51 -05:00
Max Wilfinger
45ee397b43 Gui: Add toggle overlay icons 2025-06-20 22:36:40 +02:00
wmayer
b006a37010 Gui: Add Action::setBlockedChecked
Remove the second parameter of Action::setChecked and
provide Action::setBlockedChecked instead.
2025-05-30 14:21:53 +02:00
Chris Hennes
0b0f3aaa1e Gui: Make variable more local
Eliminate a compiler warning about an unused variable by making the
variable more local to the point-of-use.
2025-05-12 18:16:56 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Kacper Donat
ef357aa07a Gui: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
captain0xff
887cbd0e1a remove some code setting pixel density ratio for pixmaps
update
2025-04-03 19:55:27 +05:30
Chris Hennes
9a77120e82 Merge pull request #20142 from bofdahof/ranges
Apply C++20 std::ranges (mainly to std::find)
2025-03-17 03:08:27 -05:00
bofdahof
cb5caf6765 Gui: apply std::ranges 2025-03-16 17:15:14 -05:00
Luz Paz
6564a7b107 Fix various typos 2025-03-14 12:37:12 -04:00
Andrea
cca14cf164 Remove old qt code
new round of removal following the report of @benj5378  .

.
2025-03-05 09:46:35 +01:00
Benjamin Bræstrup Sayoc
8d2d0a47f4 Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
tritao
02ab2deac7 Gui: Reorganize the navigation files into a top Navigation folder. 2025-02-05 20:21:00 -06:00
Benjamin Nauck
6f535f19fb Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
tritao
4c93a14fea Gui: Reorganize the dialog files into a top Dialogs folder. 2025-01-24 16:28:02 -06:00
Syres916
8b09934161 [Gui] Allow power users to set their own max toggle transparency 2025-01-20 11:43:18 -05:00
Snow Faerie
8ac3800666 Fix and add menu accelerators (#15532)
* Fix and add menu accelerators: menus common to all workbenches

I use menu accelerators fairly often, so I find it very frustrating when
they are missing, or worse, they don't work due to the same letter being
assigned to several commands.

This patch adds accelerators to lots of menu entries missing them and
fixes broken accelerators.

Wherever possible, standard accelerator keys are used:
https://doc.qt.io/qt-5/accelerators.html

This commit covers accelerator fixes that are common to all workbenches.
Accelerator fixes for specific workbenches will be done in separate
commits.

* Add missing accelerators: Spreadsheet workbench
2024-12-13 10:39:30 -06:00
Chris Hennes
889c5ea516 Merge pull request #15528 from ppphp/move_some_inventor
refactor: move some nodes to Inventor folder
2024-11-22 12:20:50 -05:00
Hannu Koivisto
f155d2e272 Fix crash when using box selection with Arch Survey
doSelect() loops over document's object vector.  It can happen that, within
the loop, Gui::Selection().addSelection() gets called and that ends up
calling App::Document::addObject() which pushes an object to the vector that
the loop is traversing.  If the vector is full, its storage is reallocated
and this means that later iterations of the loop are using invalid iterators.
Thus, one ends up with a bogus obj pointer and there will be a crash within
getGroupOfObject().  The problem was observed when using Arch Survey.
2024-08-26 17:33:55 +02:00
Chris Hennes
ea9f0c7a67 GUI: Update MacOS detection macros
For GUI-specific things use Q_OS_MACOS, and for other things use
Q_OS_APPLE.
2024-08-12 11:34:39 -04:00
liukaiwen
776ed8f2c1 refactor: move some nodes to Inventor folder 2024-07-20 01:07:04 +08:00
Chris Hennes
f8deaaaf86 Merge pull request #15190 from hlorus/measure_dependency_violation
MeasureGui: Fix measure dependency violation
2024-07-13 19:56:23 -05:00
Roy-043
b08074e15b Gui: fix icon name conflict related to Std_ViewScreenShot
The image Std_ViewScreenShot.svg was not used in the GUI. The command Std_ViewScreenShot used a different icon. This caused a name conflict in the Wiki.
2024-07-13 19:32:14 -05:00
Max Wilfinger
8ff5a1f688 Fix source string typos mentioned on Crowdin (#15261) 2024-07-08 17:18:31 -05:00
hlorus
ab1d86235d [MeasureGui] Move measure cmd and task into measure module
...to avoid core depending on modules
2024-07-04 14:56:49 +02:00
Chris Hennes
d0528fb155 Merge pull request #13810 from hlorus/replace_measuredistance
Integrate Std_MeasureDistance into unified measurement facility
2024-06-17 10:55:40 -05:00
FEA-eng
2ebb20c698 Preselection preference text improvement (#14579)
* Update CommandView.cpp

* Update DlgSettingsSelection.ui
2024-06-17 10:40:03 -05:00
MisterMaker
7a80632a4e Default stylesheets revision + clean-up (#13772)
* Added the new QSS file with images

Added the new QSS file with images

* fixed some disabled colors to be the same everywhere.

* update

* big update fixed the scrollbars and lots more.

* small tweaks

* small fixes

* fixed groupbox in qsint

* Added light classic

This light theme is basicallyt exactly no-stylesheet.

* fixed the tabs

* fixed background reportview

* updated overlay stylesheets

* Added preference settings from Opentheme @obelisk79

* tabbar tweaks

* forgot the gradients on dark

* Overlay stylesheets clean-up +move icon to folder.

* removing old stylesheets

removing old stylesheets

* it was icons not icon, fixed it.

* updated cmake and package.xml

* to many spaces

* removing old theme's

* updated default overlay qss

* removed my settings files

* updated cfg files

* Bunch of fixes

I compiled it and didn't see any issues anymore. Could be some discussions about the new startpage thumbnails.

* fixed up double arrows and the correct logo!

* updated the work file for the icons

* Sets no-stylesheet overlay to a stylesheet.

* type in cmakelist

* type in filename

* oeps did set the dark theme

* Update OverlayManager.cpp

I removed a bit to much reverting this line

* fixed text color issue in Qsint on the light theme and dark background

* Update Light Theme + Dark Background.qss

Fine tuning the treeview it now works good for ligth theme and dark brackgrounds.

* removed prodark added back Behave dark overlay

@Syres916 I deleted the overlay qss behave dark by accident.
But you might want to check this PR out since it changes a lot.

I deleted Pro-dark since it was not updated and is outdated and it looks also a lot like the default dark.

* Update Light Theme + Light Background.qss

Fixes

* small fixes

small fixes

* remove ProDark

* Update CMakeLists.txt

* changed the thumbnails

Also removed teh dimensions in the filename since that got annoying real fast :)

* Updated other overlay stylesheets

* missing extension

* cleanup and some fixes to the overlay.

* Update Dark Theme + Light Background.qss

udpated the dark theme overaly with light background for all you maniacs who use this.

* Title bar fix for windows

This makes it so that it uses black title bar in windows if you have dark mode

* updated white background and some colors

* I think I fix merge issue now.

* Some cleanup on the thumbnails

* Create CMakePresets.json

* idk

* trying to fix conflicts

* removing old themes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Some fixes for Qsint sketcher toolbars icons

* fixed merge issue with maingui

* trying to fix merge conflicts

* and removing again.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-13 22:13:05 -05:00
hlorus
9125631e4f Remove Std_MeasureDistance 2024-06-11 17:57:01 +02:00
wmayer
1d78063df8 Fix accessibility of some group commands
Several group commands are active but require an active document to work. This PR overrides the method isActive() to
disable the commands if no active document exists.

The affected commands are:
* Std_ViewGroup
* Std_LinkActions
* PartDesign_CompDatums
* PartDesign_CompSketches
2024-05-23 10:14:46 +02:00
Chris Hennes
0e0fce5678 Merge pull request #13906 from Rexbas/align-camera
Align camera to faces and edges
2024-05-20 11:28:24 -05:00
hlorus
6d406a940c PartGui: Remove remaining measure "clear all" and "toggle delta" commands 2024-05-20 10:56:43 -05:00
Bas Ruigrok
c985c3ddee Gui: Add alignToSelection() icon and add to toolbar
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
2024-05-13 19:04:06 +02:00
Bas Ruigrok
52b6f4f5ad Gui: Add alignToSelection() method and command 2024-05-13 19:04:06 +02:00
hlorus
4f66ef8cb0 [Gui] Add command and task for unified measurement facility 2024-04-29 09:27:22 -04: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
PaddleStroke
bb87b572c5 Core: Std_ToggleTransparency: Fixes #11353 2024-04-01 11:23:49 -05:00
Max Wilfinger
78249a8ed8 add missing view top option + arrangement 2024-03-30 11:50:17 +01:00
wmayer
7f2bb822d8 Fixes #12865: CommandView Cursor Icons use hardcoded XPM
For the cursor use the device pixel ratio to avoid to look pixelated on HiDPI screens
2024-03-28 07:26:12 +01:00
Max Wilfinger
560509bfe1 Create a toolbar command group for default views.
Optional toolbar for all individual views is available.
2024-03-12 16:03:59 +01:00
André Caldas
89dbab9b0e Avoids using getNameInDocument() to test if DocumentObject is attached to a Document.
This patch substitutes by isAttachedToDocument() (almost) everywhere where
getNameInDocument() is used for this purpose.

The very few places not touched by this patch demand a (just a little) less trivial change.
When we change the returning type of getNameInDocument() to std::string,
those places will be easily found, because they shall generate a compiler error
(converting std::string to bool).

Rationale:
The fact that getNameInDocument() return nullptr to indicate
that the object is not attached to a document is responsible for lots of bugs
where the developer does not check for "nullptr".

The idea is to eliminate all those uses of getNameInDocument() and, in the near future,
make getNameInDocument() return always a valid std::string.
2023-12-11 17:37:58 +01:00
PaddleStroke
a296c10491 Std_Transparency : Toggle transparency of objects. (#10805)
* Std_Transparency : Toggle transparency of objects.
* Remove "Std_ToggleTransparency" from toolbar

---------

Co-authored-by: Paddle <PaddleStroke@users.noreply.github.com>
2023-11-06 12:41:27 -06:00
bgbsww
0fd7736256 Change overlay window arrow keys to use Ctrl instead of Shift 2023-11-06 11:23:59 -06:00
Roy-043
b2a75316e2 Gui: Make "Dock window overlay" GUI texts more consistent (#11121)
* Gui: Make "Dock window overlay" GUI texts more consistent
* overlays -> overlay windows
2023-10-23 10:57:45 -05:00
Roy-043
c069fd240e Gui: MenuText for Std_SelBack and Std_SelForward in sentence case 2023-10-20 20:11:36 +02:00
Zheng, Lei
ba6b2a4375 Gui: add support for transparent overlay docking widget 2023-10-11 09:58:53 +02:00
wmayer
c4f355ad8d Part: move CmdSelectFilter and friends from core to Part module 2023-10-03 19:26:28 +02:00
wmayer
dca598f4e5 Gui: do not create the commands StdCmdSelBack and StdCmdSelForward twice 2023-09-26 11:07:51 +02:00
Paddle
c9d6e9f0b5 Improve tooltips and remove the html from the translate. 2023-09-21 07:31:15 +02:00