Sergio Martins
863691c313
Remove some private API from DockWidgetBase.h
...
Moved it into the pimpl
2021-02-06 16:32:13 +00:00
Sergio Martins
38443048b8
Merge branch '1.2'
2021-02-05 16:42:07 +00:00
Sergio Martins
621c3dbeca
Also clear the overlay internals when floating an overlay
...
Fixes a crash.
Relates to #162
2021-02-05 16:32:41 +00:00
Sergio Martins
ee759a5459
Don't trigger "Delete on Close" when sending to the sidebar
2021-01-28 22:40:41 +00:00
Sergio Martins
8a9d9f9fce
Merge branch '1.2'
2021-01-27 22:55:36 +00:00
Sergio Martins
db06c496cf
Remove dependencies to LayoutSaver_p.h
...
Only the impl needs to include it
2021-01-27 22:51:41 +00:00
Sergio Martins
44587cb947
Don't require LayoutSaver_p.h to be installed
...
It's impl detail that doesn't need to be installed
2021-01-18 20:37:22 +00:00
Sergio Martins
dbf357ce66
Fix restoring window maximized state
...
Fixes #81
2021-01-16 22:37:30 +00:00
Sergio Martins
1840d50fc0
Move LayoutBorderLocation out of Item
...
It only affect the box layout
2021-01-08 22:24:53 +00:00
Allen Winter
875544a449
Merge branch '1.2'
2021-01-02 09:32:20 -05:00
Allen Winter
a2f4c972a6
update copyright year
2021-01-02 09:27:50 -05:00
Sergio Martins
5582f37a18
Introduce InitialOption struct
...
addDockWidget() received a AddingOption enumerator. But that
enum isn't enough, as we also want to be able to specify an initial
QSize.
So, instead of adding yet another parameter to addDockWidget(), we
create a struct to old those "initial settings".
Implies a minor source break, but trivial to fix in user code,
just rename the enumerator.
Honouring preferredSize will be a followup.
Needed for issue #95
2020-12-27 20:22:02 +00:00
Sergio Martins
d0c15b5da2
Add missing include
2020-12-19 14:59:04 +00:00
Sergio Martins
ccbd15c922
Merge branch '1.2'
2020-12-19 14:12:10 +00:00
Sergio Martins
7b9673e4e2
Shrink the overlay popup when we shrink the main window
...
Should be enough for issue #118
2020-12-19 14:10:01 +00:00
Sergio Martins
7fbcbbacdf
Preserve overlay size when resizing main window
...
For issue #118
2020-12-19 14:09:27 +00:00
Allen Winter
9ee6b91f61
Merge branch '1.2'
2020-12-18 13:04:02 -05:00
Sergio Martins
e5809c06c7
Enable resizing the overlayed dock widgets
...
Fixed WidgetResizeHandler to not allow it to resize the overlay
bigger than its parent
For issue #116
The size isn't remembered though. Next time you open the overlay
it will have the previous size.
2020-12-18 17:15:54 +00:00
Sergio Martins
0f468033fb
Commit the code needed for resizing overlays/popups
...
Still not happy with it, so the actual part that enables it
is commented out
Also for issue #118
2020-12-18 15:35:43 +00:00
Sergio Martins
3b1ac9a2d0
Merge branch '1.2'
2020-12-17 20:38:49 +00:00
Sergio Martins
62f50f9458
Minor coding style
2020-12-17 19:47:19 +00:00
Sergio Martins
5e64463a8c
Remove some Item_p.h/multisplitter includes
...
that's private API for the layouts, don't want them exposed higher
in the stack
2020-12-17 13:48:50 +00:00
Sergio Martins
b6925c928a
Clear sidebars before restoring them
...
If restoring a state without a sidebar, the existing sidebars
should hide
Fixes issue #116
2020-12-17 10:51:16 +00:00
Sergio Martins
75368d334a
Don't restore the popup/overlay state
...
popups are perishable
2020-12-17 10:15:39 +00:00
Sergio Martins
666673a251
Added a comment
2020-12-16 18:46:56 +00:00
Sergio Martins
34cb2ae5f0
Restore the SideBars when restoring a layout
...
For issue #116
2020-12-16 18:27:29 +00:00
Sergio Martins
aa9f50d0f4
Serialize the SideBar to JSON too
...
Part 1 of 2 for issue #116
2020-12-16 17:58:05 +00:00
Sergio Martins
cb9d77cd18
Fix more -Woverloaded-virtual
2020-11-26 15:17:33 +00:00
Sergio Martins
d848d3e39a
MainWindow: Receive either QWidget or QQuickItem as parent
...
No need to receive the more complex adapters
2020-10-03 22:09:56 +01:00
Sergio Martins
2b234f313c
quick: Remove some QWidget specific code from MainWindowBase
2020-10-03 18:10:23 +01:00
Sergio Martins
c035df7e85
Improve the heuristics for auto-hide prefered side bar
...
Now it counts the number of borders it's touching to decide.
Then checks aspect ratio too.
Can still be improved, but it's a start. Will gather feedback
before changing it further.
2020-10-01 17:16:41 +01:00
Sergio Martins
9bf060af9a
SideBar: Support sending to West/East too
...
Algorithm can be made smarter, but this is good for now
2020-09-20 23:53:26 +01:00
Sergio Martins
ac7d06d4fe
When closing overlay, remove it from side bar too
...
Added test.
2020-09-20 23:46:37 +01:00
Sergio Martins
75e9137e3a
Increase a bit the side of the overlays
2020-09-20 23:18:46 +01:00
Sergio Martins
cdb8f85620
Fix overlay positions when on left/right
...
Was off by a few pixels, looks good now
2020-09-20 19:37:53 +01:00
Sergio Martins
f459dcb8b3
length of overlayed dockwidgets now accounts for open sidebars
...
For example, if we're showing a bottom overlay, but the left
sidebar is visible, then the bottom overlay can't be so wide
2020-09-20 19:20:35 +01:00
Sergio Martins
b303af738c
Improve position for north/south overlays
2020-09-20 16:56:57 +01:00
Sergio Martins
af5e11a265
Update the overlay's geometry when we resize the main window
2020-09-20 16:38:03 +01:00
Sergio Martins
8d7627069c
Factor out some code into updateOverlayGeometry()
...
So it's reusable
2020-09-20 16:30:43 +01:00
Sergio Martins
9e94c0d67d
The auto-hide button now works as expected
...
1st click it show the overlay and adds to sidebar
2nd click it hides the overlay, removes from sidebar and restores the dockwidget
2020-09-20 14:13:39 +01:00
Sergio Martins
005e0552b6
Delete SideBarButton when dock widget is removed from sidebar
2020-09-20 13:53:49 +01:00
Sergio Martins
54b28c42e2
Added DockWidgetBase::isOverlayed()
2020-09-20 13:48:17 +01:00
Sergio Martins
2659ddb76b
refactor: Decouple moveToSideBar from overlaying
...
overlaying just shows/hides the overlay, and not requires
the dock widget was added to the sidebar before
2020-09-20 13:44:04 +01:00
Sergio Martins
c85873c6ce
Added MainWindowBase::sideBarForDockWidget(dw)
...
Just a getter.
2020-09-20 13:24:18 +01:00
Sergio Martins
b8891a5727
Start implementing overlaying on top of main window
2020-09-20 12:56:31 +01:00
Sergio Martins
fcb6f5a6af
Use the top sidebar too
2020-09-19 12:16:51 +01:00
Sergio Martins
76e2ec6429
Add East, West and North sidebars too
...
Instead of just south.
Only south is used for now though.
2020-09-19 11:00:42 +01:00
Sergio Martins
e1085fb770
Add experimental support for minimization to side-bar
...
Auto-hide not working yet. Just minimization.
Internal for now. Will be public once finished.
2020-09-18 18:35:41 +01:00
Sergio Martins
1cfceb4d07
MainWindow: Move the drop area to the base class
...
QtQuick impl will also use it
2020-08-03 19:39:01 +01:00
Sergio Martins
9275432aea
Remove a couple of unneeded includes
2020-07-26 21:42:29 +01:00