Sergio Martins
de716cc359
Use opaque icons when there's no translucency support
...
Also corners are not round.
2019-07-20 19:03:40 +01:00
Sergio Martins
4ac8103a84
Remove some code duplication
2019-07-20 18:41:03 +01:00
Sergio Martins
f81296a839
Add a fallback mouse grabber for wayland
...
Wayland doesn't support mouse grabbing.
Commented out for now, as wayland has other problems, such as
QWidget::move() not working
2019-07-20 18:37:55 +01:00
Sergio Martins
d71acc7312
Add some debug code to test changing window position on Wayland
2019-07-20 18:21:17 +01:00
Sergio Martins
fbcd41937a
Add an event filter for debugging mouse
2019-07-20 17:35:24 +01:00
Sergio Martins
fd5b2ad2f1
Use AA_UseHighDpiPixmaps in the example
...
it's a best practice
2019-07-20 17:25:25 +01:00
Sergio Martins
108cd96afe
Save floating geometry before hidding
...
So it shows at the correct position when shown
2019-07-20 17:19:20 +01:00
Sergio Martins
9e1807116d
Don't crash if DockWidget doesn't have a widget
2019-07-20 17:19:20 +01:00
Sergio Martins
5d36a95a67
Merge pull request #9 from jcelerier/master
...
Add a visual example in the README
2019-07-20 15:33:34 +01:00
Mike Krus
1824eb6892
Clean up cmake files
...
Use modern syntax in most places.
2019-07-19 22:45:22 +01:00
Sergio Martins
8427cd7f5f
tests: Don't spam so many qpa warnings
...
We don't care about these warnings so don't print them
2019-07-19 18:16:47 +01:00
Jean-Michaël Celerier
2416da808e
Add a visual example in the README
2019-07-19 18:22:17 +02:00
Sergio Martins
06c32a23fb
Set a parent to FloatingWindow
...
Solves some weird z-order issues on Linux.
Also, makes the windows always visible when the main window is visible.
Not sure what to do when there's two MainWindows though, just parent to the
first one for now
2019-07-19 15:55:04 +01:00
Sergio Martins
5c97e9168a
Fix build without developer build
...
LayoutSaver is also using those methods, it's not just the tests
2019-07-19 13:48:42 +01:00
Sergio Martins
cbef097bec
Improve MultiSplitterLayout::clear()
...
To be used by LayoutSaver before restoring
2019-07-19 12:18:46 +01:00
Sergio Martins
963e566cda
Ensure test doesn't leave windows open
2019-07-19 11:57:47 +01:00
Sergio Martins
63b016a1ad
Remove a c-style cast
2019-07-18 23:12:34 +01:00
Sergio Martins
9628a6f66c
Add Anchor::clear()
2019-07-18 23:12:21 +01:00
Sergio Martins
48ae1b5feb
Add some simplifications
2019-07-18 22:30:17 +01:00
Sergio Martins
c430d40b0b
Uncomment test that passes now
2019-07-18 22:04:48 +01:00
Sergio Martins
f5c005d412
LayoutSaver: Prevent Anchors from resizing items while constructing
...
the layout is still incomplete so don't resize anything. Instead, serialize
the geometry too, and set that when restoring.
2019-07-18 21:12:56 +01:00
Sergio Martins
21e54d0827
LayoutSaver: Make some methods private
2019-07-18 20:52:35 +01:00
Sergio Martins
5a63f23c6c
Improve comment
2019-07-18 19:03:56 +01:00
Sergio Martins
380ae099ab
LayoutSaver: Also serialize/deserialize Anchor::followee
2019-07-18 18:59:05 +01:00
Sergio Martins
ec2b00afa9
Merge pull request #7 from Montel/remove_double_deletion
...
Fix double deletion when we click on restore layout
2019-07-18 18:46:07 +01:00
Sergio Martins
e5086ded9b
Merge pull request #8 from Montel/remove_double
...
Remove double ;
2019-07-18 09:29:57 +01:00
Laurent Montel
0f6a9fe270
Remove double ;
2019-07-18 10:20:27 +02:00
Laurent Montel
ad6fccc7fa
Fix double deletion when we click on restore layout
2019-07-18 09:59:48 +02:00
Sergio Martins
2bbe3fbad4
Decouple from MultiSplitterWidget.cpp a bit
2019-07-17 23:19:31 +01:00
Sergio Martins
6e632e45ea
Remove dead code
2019-07-17 23:07:16 +01:00
Sergio Martins
43eb94a9cc
Remove some references to the multi splitter widget
...
It's size is always the same as contentSize
2019-07-17 23:06:36 +01:00
Sergio Martins
f6259430a7
Variable renaming for readability
2019-07-17 23:02:39 +01:00
Sergio Martins
ae5dc7d03e
Rely less on parentWidget(), we know its type
2019-07-17 22:59:34 +01:00
Sergio Martins
0f2e34f147
Validate inputs before unrefing placeholders
2019-07-17 22:46:39 +01:00
Sergio Martins
521a065508
debug: Print the frame instead of just the address
2019-07-17 22:43:28 +01:00
Sergio Martins
9b5a0dc5be
Make it easier to uncomment this code in the future
...
Introduce m_inCtor
2019-07-17 22:41:12 +01:00
Sergio Martins
af94a5da6d
Added a needed debug to compare output between two shas
2019-07-17 22:11:18 +01:00
Sergio Martins
24dfb34a6f
Less DropArea qobject_casts
2019-07-17 22:05:12 +01:00
Sergio Martins
98e47856f3
tests: Simply getting the drop area
...
No need for casts
2019-07-17 21:32:45 +01:00
Sergio Martins
8b0c3e6953
Simplify Frame::isInMainWindow()
2019-07-17 21:24:41 +01:00
Sergio Martins
3a4a46c291
Simplify Item::isInMainWindow()
2019-07-17 21:23:48 +01:00
Sergio Martins
887806efbe
Move isInMainWindow to base class
2019-07-17 21:23:48 +01:00
Sergio Martins
f98ca37651
Add more margin to title when there's no icon
2019-07-17 18:58:59 +01:00
Sergio Martins
eb5c7b357d
Merge pull request #6 from Montel/add_icon_tabwidget
...
Add icon on tabwidget
2019-07-17 18:55:42 +01:00
Sergio Martins
16e99dac8b
Fix rectForDrop() when one of the sides didn't have more space
...
The layout guarantees that there's enough space for the widget
and for the new anchor, but doesn't say in which side the new
anchor should steal space from, so bound the rect when we finish
calculating it
Finally we can uncomment the warning in Anchor::setPosition() to
detect out of bounds cases, tests pass now with no warning
2019-07-17 17:59:20 +01:00
Sergio Martins
0630da9687
Minor rename
2019-07-17 16:48:43 +01:00
Laurent Montel
bc574449e3
Add icon on tabwidget
2019-07-17 17:25:25 +02:00
Sergio Martins
e3f49653c3
Fix typo in rectForDrop(), found by unit-test
2019-07-17 15:47:47 +01:00
Sergio Martins
4d07364d85
Add more margin to the icon
2019-07-17 15:13:23 +01:00
Sergio Martins
6d82834aee
Always paint the Frame when it's docked, looks nicer
...
We can eventually make this stylable too
2019-07-17 15:05:52 +01:00