Sergio Martins
c210a523e3
Focus the newly dropped dock widget
...
When we drag a dock widget into a another widget, we should focus it
Fixes issue #77
2020-09-26 17:44:30 +01:00
Sergio Martins
835f67a106
Mark DropArea::drop() as private
...
It's an implementation detail
2020-09-26 17:08:23 +01:00
Sergio Martins
a50f6ec602
Added DockWidgetBase::isFocused Q_PROPERTY
...
For GammaRay convenience. For QML too.
The getter and signal already existed.
For issue #73
2020-09-25 19:35:28 +01:00
Sergio Martins
4a49dbc6b4
Add a DockWidget::isFloatingChanged() signal
...
For issue #73
2020-09-25 19:25:58 +01:00
Sergio Martins
e4871eb340
Fix floating action not being triggered in some cases
...
When docking a dock widget into a floating widget, then both
are not "floating" anymore, as there's two of them in the layout
Fixes #79
2020-09-25 18:28:32 +01:00
Sergio Martins
0e696ff2dd
FloatingWindow: Also use margin when using aero-snap
...
It's always good to have contents margin. Initially the idea was
that we were adding margin just to make the client resize handler
work better. But no reason to have different visual aspect depending
on if you have aero-snap or not
Fixes applications needing to look the same on all platforms.
2020-09-25 11:23:03 +01:00
Sergio Martins
9f15773a9b
Fix dragging by tabbar if there's a line edit in the tab bar
...
User was able to drag and line edit wouldn't get focus.
This is a hot fix, not the most elegant way to do it.
2020-09-25 11:02:35 +01:00
Sergio Martins
a00984f95a
Fix potential crash at shutdown
...
QWidget DTOR can trigger a focus change, which triggers
DockRegistry::onFocusObjectChanged(), which would dereference the
dockwidget
2020-09-24 16:05:38 +01:00
Allen Winter
c7e9632f18
src/MainWindow.cpp - minor header order
2020-09-22 11:22:40 -04:00
Sergio Martins
7080712501
Rename the tab's title if its dock widget changes
2020-09-21 16:19:35 +01:00
Sergio Martins
03b574434c
Fix non-developer build
...
Fixes #76
2020-09-21 10:07:04 +01:00
Sergio Martins
6a46744073
Make Flag_AutoHideSupport public
...
Ready to be tested by the public
2020-09-21 00:19:20 +01:00
Sergio Martins
7e52c510b3
Fix rendering vertical sidebars on scaled monitors
2020-09-21 00:14:09 +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
5168940422
When enabling auto-hide, don't overlay it immediately
...
Instead, hide it. Will be overlayed when the user toggles it.
2020-09-20 23:16:40 +01:00
Sergio Martins
cfd2dafa53
Remove bogus debug
2020-09-20 23:15:01 +01:00
Sergio Martins
188b0a0edd
Don't style side-bar buttons of overlayed widgets
...
As mouse-over is already using the same color. Would be nice
to have some different style for the currently overlayed window.
2020-09-20 23:09:33 +01:00
Sergio Martins
206c418ebc
Make TitleBarWidget::buttonAreaWidth() generic
...
Nowadays we have much more buttons
2020-09-20 22:59:25 +01:00
Sergio Martins
b0acf8d1ae
Disable floating button when using auto-hide
...
TitleBar is a bit crowded otherwise. User can still pass
& ~Flag_TitleBarNoFloatButton if he really wants both buttons.
2020-09-20 22:54:51 +01:00
Sergio Martins
f279ea41e6
Add tooltips to title bar buttons
2020-09-20 22:43:10 +01:00
Sergio Martins
d2a929f35d
Minor whitespace fix
2020-09-20 22:26:51 +01:00
Sergio Martins
6f5258b5dd
Add auto-hide iconsz
2020-09-20 22:25:56 +01:00
Sergio Martins
4f223a9439
Change color of active/hovered SideBarButton
2020-09-20 20:59:54 +01:00
Sergio Martins
ea98eb3d44
Restyle the StyleBarButtons a bit
2020-09-20 20:30:40 +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
967a539e71
Simplify SideBarButton::sizeHint()
2020-09-20 19:08:52 +01:00
Sergio Martins
db615da0ee
Override from QToolButton to have our own SideBarButton
...
Has proper size when vertical.
Text isn't vertical yet though.
2020-09-20 19:06:47 +01:00
Sergio Martins
c4b420bd31
Add a fwd-header for SideBarWidget too
2020-09-20 18:09:54 +01:00
Sergio Martins
a6c4730c44
SideBar is now constructed by the framework widget factory
...
Means it can be overridden by the user
2020-09-20 18:08:23 +01:00
Sergio Martins
eb1f4c5a14
Auto-hide overlays when clicking elsewhere
...
That's what auto-hide is all about
2020-09-20 17:25:40 +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
55ddacf978
Partially revert previous commit
...
toggling overlay visibility won't remove it from the sidebar afterall.
User will need to explicitly press the auto-hide button
2020-09-20 13:56:52 +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
6e32f3f915
Added SideBar::mainWindow()
...
It's just a getter.
2020-09-20 13:18:34 +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
0365f3194d
Added Item::adjacentLayoutBorders()
2020-09-19 11:50:00 +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
a5d0a202a5
Add enum with sidebar location
2020-09-19 10:35:36 +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
c294c19be7
Fix Frame having a null DropArea
...
Fixes inMainWindow() signal not being emitted sometimes
2020-09-18 18:34:49 +01:00