Sergio Martins
0f2edfdb4e
Fix hidding the pin/auto-hide icon when side-by-side in floating
...
An else {} branch was missing.
Also just simplify the code, and call supportsAutoHideButton()
which wasn't being used.
Also removed some bogus updateAutoHideButton() calls from
the CTOR, needs to use singleShot() since the method is virtual,
the derived class isn't constructed yet
2021-04-28 22:06:42 +01:00
Sergio Martins
d289134b15
Add a unit-test for disabling RelativeFloatingWindowGeometry
...
Fixes #175
2021-04-28 21:27:47 +01:00
Sergio Martins
7475c7cc71
Remove unneeded include
2021-04-28 21:15:08 +01:00
Sergio Martins
7958eeeded
Fully qualify LayoutSaver_p.h includes
...
Now that it's installed
2021-04-28 21:13:44 +01:00
Sergio Martins
f29f773555
Add a LayoutSaver_p.h fwd header
2021-04-28 21:10:23 +01:00
Sergio Martins
a113205881
Install LayoutSaver_p.h
...
Moved it into private/ too, not sure why it was in src/
For issue #175
2021-04-28 21:08:41 +01:00
Sergio Martins
7830ccb017
Move LayoutSaver::Private to the header
2021-04-28 21:00:26 +01:00
Sergio Martins
6a205a5406
Move some Layout::Private method definitions out of the class
...
In preparation to move the class to an header
2021-04-28 20:55:16 +01:00
Sergio Martins
d91a42930d
Expose LayoutSaver::Private
2021-04-28 18:01:37 +01:00
Sergio Martins
6f3df707f4
Split RestoreOption_RelativeToMainWindow into more granular options
...
Mostly so we can have RestoreOption_RelativeToMainWindow but
without restoring floating windows
Said options are internal (for now?), we'll need more feedback before
turning them public (since once public forever public)
For issue #175
We'll add some private API so users can change the flags in the next
commit
2021-04-28 17:43:24 +01:00
Sergio Martins
f388b11d0d
Added MainWindowBase::frameCountChanged()
...
So you can know when the layout added or removed dock widgets
Fixes #190
2021-04-28 16:28:04 +01:00
Sergio Martins
66d12fef82
fix build
2021-04-27 23:56:58 +01:00
Sergio Martins
83c744041e
Merge branch '1.3'
2021-04-27 23:52:17 +01:00
Sergio Martins
dcac39a35f
Don't restore window's maximized state when using RestoreOption_RelativeToMainWindow
...
We don't restore main window's geometry either
Fixes issue #184
2021-04-27 23:50:40 +01:00
Sergio Martins
c4d3ba71b2
Fix crash due to MainWindow not clearing m_overlayedDockWidget
...
When we close the overlayed widget we need to clear this variable
Added 1 real fix and a prophylactic check too.
2021-04-27 23:49:26 +01:00
Sergio Martins
74c74593e2
Don't restore window's maximized state when using RestoreOption_RelativeToMainWindow
...
We don't restore main window's geometry either
Fixes issue #184
2021-04-26 19:19:06 +01:00
Sergio Martins
62591bc360
quick: Use logical dpi factor of 1 for now
...
Only physical dpi scaling suported currently
2021-04-25 21:24:56 +01:00
Sergio Martins
1fca162fb2
quick|example: Enable hpdi scaling
2021-04-25 10:47:07 +01:00
Sergio Martins
82967435ea
Added QtQuickHelpers::logicalDpiFactor()
2021-04-25 10:37:47 +01:00
Sergio Martins
7738354be1
Minor coding style fix
2021-04-25 10:26:09 +01:00
Sergio Martins
0d2166770e
quick: Add a QtQuickHelpers class into the context
...
Will have some useful stuff there. Don't have a better place to put them.
2021-04-25 10:24:07 +01:00
Sergio Martins
9d7de9ea4d
Fix sizing of widgets that skip LayoutSaver's restore
...
LayoutWidget::onResize() was bailing out early, but the actual
restore hadn't even started
2021-04-23 19:39:07 +01:00
Sergio Martins
5aa3ba25cc
cmake: Add a Gammaray friendly preset
...
ASAN doesn't like Gammaray injection
2021-04-23 19:01:10 +01:00
Sergio Martins
b330f902fd
tests: Move class into the header
...
File is getting too big
2021-04-23 18:03:49 +01:00
Sergio Martins
aa76dfba02
LayoutSaver: Support the user's factory func doing remapping
...
While restoring a layout, we expect all widgets to exist already,
but we allow the user to create them delayed, by providing
us a factory function.
What we're supporting in this commit is the ability of the user's
factory function returning a dock widget with an ID different
than the one that was requested. We then save that mapping so the
rest of the layout restore works with the new ID.
2021-04-23 14:55:01 +01:00
Sergio Martins
b3c2d87a9b
Remove unused MULTISPLITTER_LAYOUT_MAGIC_MARKER
2021-04-23 14:35:29 +01:00
Sergio Martins
cc1347adf8
qtquick: Don't use native windows drop shadow with round corners
...
When using the Windows native drop shadow, the client area needs
to be rectangular, otherwise a white line appears at the top
2021-04-23 11:47:37 +01:00
Sergio Martins
df0a80b320
qtquick: Config::InternalFlag_UseTransparentFloatingWindow
...
Don't use a transparent floating window by default.
This matches QtWidgets behaviour.
It's only use would be to get round corners, but doesn't work well
with Window's drop shadow
2021-04-23 11:39:57 +01:00
Sergio Martins
26f7557834
cmake: Disable CCACHE when running the clazy preset
2021-04-23 09:50:51 +01:00
Sergio Martins
e6c2f29532
cmake: Specify which clazy checks to use
...
Trivial now with cmake presets
2021-04-22 15:44:16 +01:00
Sergio Martins
37cc16fe17
Fix a -Wsign-conversion warning
...
error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
2021-04-21 20:35:56 +01:00
Sergio Martins
c7ac88836a
Fix some clazy errors
...
Mostly about using qualified names for methods called from QML
2021-04-21 20:25:45 +01:00
Sergio Martins
536e048f1c
Fix build with Qt 5.9
...
The needed overload was introduced in Qt 5.10 only
2021-04-21 19:08:30 +01:00
Sergio Martins
4671848428
vscode: Also add C_Cpp.autocompleteAddParentheses to the other workspaces
2021-04-20 23:03:36 +01:00
Sergio Martins
4449785e2c
vscode: Enable C_Cpp.autocompleteAddParentheses
2021-04-20 23:02:35 +01:00
Sergio Martins
39deb9ee83
tests: Minor refactoring, reduce copy-paste
2021-04-20 23:02:07 +01:00
Sergio Martins
2266f4a75c
Fix FloatingWindow max size when there's tabbed dock widget
...
We don't support this case yet
2021-04-20 22:56:26 +01:00
Sergio Martins
06b680f603
Also update FloatingWindow's max size when children change constraints
...
A dock widget can change its max size later in life, so we need
to react to that
2021-04-20 22:52:08 +01:00
Sergio Martins
ec6be7d1a5
Fix potential crash
2021-04-20 22:51:43 +01:00
Sergio Martins
37040bfc9e
Also update FloatingWindow max-size when adding nested dock widgets
...
We only support FLoatingWindow max-size when there's 1 frame.
When adding more, we need to remove the max size
2021-04-20 22:34:36 +01:00
Sergio Martins
1f4f7ec0e5
FloatingWindow now honours max size of the docked widget
...
Only if there's a single dock widget though.
Tabbed cases are more complicated as QStackedLayout doesn't
propagate size constraints
2021-04-20 21:00:33 +01:00
Sergio Martins
a31571ab2c
Bound FloatingWindow::maxSizeHint()
...
Can't be bigger than Qt's hardcoded limit
Fixes a warning emitted by Qt
2021-04-20 20:57:14 +01:00
Sergio Martins
714ef2adb8
cmake: Fix a preset name
...
We don't have dev-qtquick6.
Should probably be added.
2021-04-20 20:22:24 +01:00
Sergio Martins
e447bbf03b
vscode: Don't specify tasks
...
The cmake extension takes care of this
2021-04-20 20:18:32 +01:00
Sergio Martins
3846b638fb
cmake: Add build presets too
...
This is new in cmake 3.20 and makes the vscode experience much better
2021-04-20 20:16:44 +01:00
Sergio Martins
6ae8a203d9
qtquick: Fix build
2021-04-20 19:43:26 +01:00
Sergio Martins
1dbd491738
Minor: Move a comment to another place
2021-04-20 19:16:14 +01:00
Sergio Martins
e8693edb33
Minor refactoring: Factor out the FloatingWindow max size code
...
Created FloatingWindow::maxSizeHint()
2021-04-20 19:13:32 +01:00
Sergio Martins
5cbad00cb5
Minor coding style: bail out early
2021-04-20 18:47:34 +01:00
Sergio Martins
c6e4deb0ca
Merge branch '1.3'
2021-04-19 09:47:43 +01:00