Commit Graph

3235 Commits

Author SHA1 Message Date
wmayer
32ab2cc74c Gui: [skip ci] avoid using const reference as member for several action classes to avoid memory corruption 2021-03-20 16:13:56 +01:00
Abdullah Tahiri
eaf65569a8 Gui: Extend DlgCheckableMessageBox to use specific preference path and parameter 2021-03-20 15:59:15 +01:00
turn211
bb78bd9fd1 [Stylesheet] ProDark: major bugfix for add-ons
https://forum.freecadweb.org/viewtopic.php?f=34&t=55134&start=100
2021-03-19 06:31:27 -04:00
Chrismettal
2bef8dbb40 [Stylesheet] increase behave-dark contrast on input boxes (#4619)
PR #4619
2021-03-14 14:38:12 -04:00
donovaly
0d43fd4d0f [Gui] fix HiDPI rounding bug
As reported in https://forum.freecadweb.org/viewtopic.php?f=10&t=56425&start=20#p485809
this PR fixes the problem reported here: https://forum.freecadweb.org/viewtopic.php?f=10&t=56425&start=20#p485759
2021-03-10 15:25:04 +01:00
Benjamin Nauck
fd6d471a24 Gui: Auto update NaviCube when changing preferences 2021-03-09 17:27:48 +01:00
Benjamin Nauck
79e72a87e1 Gui: Add setting for changing size of navigation cube
It's already possible to change size of the navigation cube through the
parameters. This just adds a GUI option in the preferences window.
2021-03-09 17:14:04 +01:00
wmayer
fd9959ce41 Gui: [skip ci] show or hide splash image depending on screen size 2021-03-08 19:03:59 +01:00
turn211
a45a911d12 Gui: Update usability enhancements to ProDark theme
forum thread: https://forum.freecadweb.org/viewtopic.php?f=34&t=55134
2021-03-08 14:24:39 +01:00
wmayer
29b7301793 Gui: [skip ci] do not allow image size in About dialog to occupy more than 25% of the screen size 2021-03-08 12:55:45 +01:00
Chris Hennes
c39764e395 [GUI] Migrate Application to std::bind 2021-03-07 08:47:01 +01:00
Chris Hennes
dc96a08201 [GUI] Remove deprecated code from Application
Strip out anything that was only active for Qt <5.9 or Python <3.6.
2021-03-07 08:47:01 +01:00
Benjamin Nauck
d69bbaa51b [Gui] Use std::shared_ptr instead of boost::shared_ptr
There's no need to use boost version when stl has support for shared_ptr
2021-03-06 19:32:03 +01:00
Benjamin Nauck
1f3627c938 [Gui] Switch from boost::tuple to std::tuple
It's better to use the standard lib when possible
2021-03-06 19:31:06 +01:00
wmayer
4090999cf3 Gui: in document observer classes replace boost::bind with std::bind 2021-03-05 14:59:26 +01:00
wmayer
2433b36f70 Gui: harmonize API of Gui document observer classes with App document observer classes 2021-03-05 14:53:44 +01:00
Chris Hennes
ed01a60cf0 [GUI] Tweak wording and translatability of Credits 2021-03-03 17:18:56 +01:00
Chris Hennes
5ad480aeec [GUI] Refactor About to list credits from a file
The Credits tab is now generated from a CONTRIBUTORS file. The file is
expected to list one contributor per line, with individuals first,
followed by a line with the word "Firms" on it, followed by firms (again
one per line). The formatting is currently a simple <ul> for each set of
names. No sorting, etc. is performed.
2021-03-03 11:03:43 +01:00
Chris Hennes
aeb4f4fb84 [GUI] Add window decorations to About 2021-03-03 10:56:11 +01:00
Chris Hennes
3c5523cb6b Switch to removeTab() to support older Qt versions 2021-03-02 18:49:13 +01:00
Chris Hennes
2038dedeb4 [GUI] Implement license tab that obeys stylesheet
The original License tab used a hard-coded HTML element created in Qt
Designer, which adds style tags to all HTML elements. This commit
replaces that tab with a dynamically-created tab which loads an included
LICENSE.html file at runtime. That file contains no style information,
so obeys the style information provided by the current stylesheet. If
that resource file is not available at runtime, the old license tab is
retained and displayed.
2021-03-02 18:49:13 +01:00
luz paz
e417fd9436 Crowdin: remove trailing whitespace [skip ci] 2021-03-02 17:29:21 +01:00
wmayer
2fe153118c Gui: [skip ci] for the author label use the same font configuration as with the rich text as otherwise the text appears very tiny 2021-03-02 17:23:41 +01:00
Chris Hennes
0bc39982df [GUI] Make UrlLabel in About styleable
The UrlLabel in the About FreeCAD box was not styleable because its
rich-text contents overrode any styling applied to it. This commit
converts it to a plain text label that can then be styled in a
stylesheet using the Gui--UrlLabel selector. If no stylesheet is
applied, the UrlLabel styles itself using the old-school blue text with
an underline, but any applied stylesheet completely overrides this
default.

This does not affect the "clickability" of a UrlLabel widget, which is
handled independently of the label's content (including its textual
hyperlink, which was and still is ignored).
2021-03-02 16:45:03 +01:00
wmayer
dfba396b4f Gui: support to customize the font size of bounding boxes 2021-03-02 16:29:57 +01:00
David Osterberg
c1b3fba031 Beautify xml step 1: These changes do not affect the uic output 2021-03-02 16:29:11 +01:00
Chris Hennes
d93567ce27 Add library versions to LibraryVersions.h 2021-02-28 20:45:34 -06:00
wmayer
88a2dc1c70 Gui: [skip ci] allow to unbind() an ExpressionBinding and automatically unbind it if the observed object has been deleted
For more details see: https://forum.freecadweb.org/viewtopic.php?f=8&t=56097
2021-02-28 12:37:50 +01:00
wmayer
7530e48935 Gui: [skip ci] fix memory leak in SelectionFilter 2021-02-27 18:17:52 +01:00
wmayer
dd4dd204d0 App/Gui: fix memory leaks:
+ add function to cleanup units and quantities in debug build
+ fix reference leak in PropertyVector::getPyPathValue()
+ fix reference leak in PropertyPlacement::getPyPathValue()
+ in InterpreterSingleton::init() use a static std::vector<wchar_t*> instead of a C array
  to free memory at program end
+ in MainWindow::closeEvent() explicitly delete all task watchers
+ in ReportOutputObserver constructor pass parent to QObject
+ in PropertyEditor destructor explicitly delete QItemEditorFactory
2021-02-27 10:56:19 +01:00
Yorik van Havre
fa85db61f9 Merged crowdin translations 2021-02-25 13:27:48 +01:00
wmayer
88d49cd982 Gui: [skip ci] improve exception handling:
* handle all exceptions in Application::onLastWindowClosed because this method can be (indirectly)  called from ~BaseView and would otherwise trigger std::terminate()
* handle exceptions in PropertyEditor::closeTransaction() because when recomputing a document while closing it leaves the editor in a bad state
2021-02-25 12:23:13 +01:00
wmayer
f36ba4c56e Crowdin: Gui: move whitespace out of translation string [skip ci] 2021-02-25 10:38:52 +01:00
luz paz
2f9ad32813 Crowdin: fix trailing whitespace [skip ci]
ref: https://crowdin.com/translate/freecad/549/en-en?filter=basic&value=0#6577470
2021-02-25 10:31:59 +01:00
luz paz
a522f4a240 Crowdin: Gui: fix user-facing typo in Document.cpp [skip ci]
ref: https://crowdin.com/translate/freecad/549/en-en?filter=basic&value=0#6584664
2021-02-25 10:31:33 +01:00
wmayer
aa1eb6ea76 Gui: [skip ci] make Save logic of text document more intuitive 2021-02-25 10:17:51 +01:00
Yorik van Havre
5c12afb5b5 Merged crowdin translations 2021-02-24 18:07:59 +01:00
wmayer
30ccf14117 Gui: [skip ci] fixes #0004104: Void property value defaults to 1 2021-02-23 17:32:02 +01:00
luz paz
646103113e Crowdin: Gui: fix DlgSettings3DView.ui tooltip [skip ci]
Remove trailing whitespace  
ref: https://crowdin.com/translate/freecad/549/en-en?filter=basic&value=0#6577482
2021-02-23 17:01:54 +01:00
wmayer
a9bf90cd17 Gui: [skip ci] Fix coverity warning
Coverity warnings fixed:

CID 305123 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach the expression this->linked inside this statement: if (role == Qt::TextColorRole && linked)
2021-02-21 16:53:23 +01:00
wmayer
b7bf4d40b6 Gui: [skip ci] Fix coverity warning
Coverity warnings fixed:

CID 316550 (#1 of 1): Uninitialized scalar variable (UNINIT)
13. uninit_use_in_call: Using uninitialized value sel. Field sel.pResolvedObject is uninitialized when calling push_back
2021-02-21 16:00:01 +01:00
wmayer
786955e022 Gui: [skip ci] fix issue found with -fsanitize-address-use-after-scope 2021-02-21 13:53:23 +01:00
wmayer
c996988a9d Gui: [skip ci] fixes #0004569: Part Design Workbench - New Bodies selection issues 2021-02-20 02:06:27 +01:00
vosk
08c2179a4f [GUI] - Fix leaking QObject 2021-02-19 16:52:25 +01:00
vosk
21e5fb66c4 [APP] - Fix leaking QGraphicsScene in QuarterWidget 2021-02-19 16:44:16 +01:00
Yorik van Havre
d873ace412 Updated splashscreen 2021-02-19 16:41:23 +01:00
Benjamin Nauck
8fb44c3aa6 Gui: Minor cleanup
Cleans up code which was touched in previous commit.

* Don't call popup() twice when not needed
* use nullptr instead of 0 for pointers
2021-02-19 16:22:41 +01:00
Benjamin Nauck
eb400fe249 Spreadsheet: Don't autocomplete when writing strings
After pull request https://github.com/FreeCAD/FreeCAD/pull/4215 it
doesn't make much sense helping the user to write expressions without
leading '=', as that content will be parsed as a string.

This change adjusts the behaviour in SpreadsheetGui's LineEdit to avoid
popping up the ExpressionCompleter when no leading equal sign is used.
2021-02-19 16:22:41 +01:00
Chris Hennes
5e170ae332 [GUI] Modify behavior of VectorListEditor
VectorListEditor allows row-by-row creation of a list of three-component
vector values. Values are manipulated using spinboxes. The previous behavior
was that the spinboxes only affected the existing rows: when creating a row
the contents of the spinboxes were ignored. This commit modifies that behavior
so that a new row gets the contents of the spinboxes. In addition, in the original
code the "Accept" button was enabled even when there was no row to edit, making
it unclear whether a user needed to click the add row button or the accept
button. Clicking the accept button did nothing if there was no existing row,
and if compiled in debug mode, an assertion was raised.
2021-02-19 14:23:19 +01:00
wmayer
2aca60be85 Gui: [skip ci] fix crash on macOS in editor of vector list property 2021-02-18 21:43:53 +01:00