Commit Graph

32 Commits

Author SHA1 Message Date
Allen Winter
2fbe4f872e Merge branch '1.5' 2022-01-20 08:15:23 -05:00
Allen Winter
93e60a743e update copyright year 2022-01-20 08:05:26 -05:00
Mauro Persano
29b1a434c4 Make lazy resize rubber bands optionally top-level
To workaround MFC bug
2021-12-14 11:32:45 +00:00
Allen Winter
7001aa58ce clang-format on code base 2021-07-12 17:05:37 -04:00
Sergio Martins
46210203f7 Rename ItemContainer to ItemBoxContainer 2021-01-08 22:02:02 +00:00
Allen Winter
a2f4c972a6 update copyright year 2021-01-02 09:27:50 -05:00
Sergio Martins
315bdc71e5 qtquick: Include the correct include
Not the widget one
2020-11-26 17:17:18 +00:00
Sergio Martins
128ae2d889 Fix separators not being deleted
Bug found with QtQuick but also reproducible with QtWidgets.
Added unit-test for both stacks.
2020-10-05 18:25:33 +01:00
Sergio Martins
4228c044ea Fix false-positive caught by Coverity
It's benign
2020-09-30 10:58:36 +01:00
Allen Winter
b4f49895c2 clarify: licensing is GPL2 or GPL3 or commercial licensed
follow the REUSE specs
2020-07-24 18:16:13 -04:00
Sergio Martins
380c3eee81 Fix separators not being movable in some cases
The 'minPos' isn't a special case, should follow the same logic as 'maxPos'.
Confused separator min pos with dock widget's min-size,
which is a special case for dock widgets.
2020-07-06 12:18:39 +01:00
Sergio Martins
0f71b30096 Allow to drag separators when they are past their max-pos
As long they are moving in Side1 direction. i.e: left/up, i.e:
reducing their distance to the max-pos.
2020-07-04 13:02:46 +01:00
Allen Winter
44bf882a2a various - include own header first 2020-06-23 11:38:41 -04:00
Sergio Martins
180fb96ecc quick: Implement separator support
you can now drag separators in the QML example
2020-06-01 22:22:33 +01:00
Sergio Martins
7cc302c977 Rename Config.h to MultiSplitterConfig.h
So it doesn't clash with KDDW's Config.h
2020-06-01 15:14:34 +01:00
Sergio Martins
ba49e1cbe2 Separator no longer inherits from QWidget
Only SeparatorWidget does
2020-05-24 20:29:49 +01:00
Sergio Martins
de0bcf9ce3 readability: Rename asWidget() to asQWidget() 2020-05-24 20:03:02 +01:00
Sergio Martins
7c9ee4f497 Move the mouse handling from Separator to SeparatorWidget
As it's QWidget specific
2020-05-24 17:58:04 +01:00
Sergio Martins
7f49f6e6a4 Move the separator's rubber band into SeparatorWidget
as it's specific to QWidget
2020-05-24 17:49:14 +01:00
Sergio Martins
e28f82dcad Make Item::hostWidget be a Layouting::Widget instead of QWidget
Just an abstraction preparing for QQuickItem support
2020-05-24 17:31:37 +01:00
Sergio Martins
9ad6eefa7a Add Layouting::Config
To host many of the scatered static member variables which
held some settings that rarely change
2020-05-23 18:40:20 +01:00
Sergio Martins
a87ab40aad Implement support for double-clicking a separator
Will resize the left and right widget, so they have the same size
2020-05-16 20:18:32 +01:00
Sergio Martins
10b47a8f9c Item: Allow to have items that don't have an host QWidget
So we can create dummy ones, for usage in suggestDropRect()
2020-05-16 12:34:31 +01:00
Sergio Martins
be1a2a3878 Fix build on Windows 2020-05-13 20:04:48 +01:00
Sergio Martins
96ee076e9a Add pimpl to Separator 2020-05-08 16:43:03 +01:00
Sergio Martins
d2dca56ce6 Implement lazy resize in the new engine
We're almost feature complete
2020-05-07 19:35:05 +01:00
Sergio Martins
61bedce278 Separators now are able to be moved by the user with mouse 2020-05-06 22:52:36 +01:00
Sergio Martins
e298667351 Remove dead code about static separators
Before we had separators on the left,top,bottom,right margins
with 0 width. Now we don't have this concept anymore
2020-05-04 14:28:59 +01:00
Sergio Martins
0595448bba Replace Anchor with Separator
We don't have the concept of Anchors anymore. Code is now simpler
2020-05-04 13:10:38 +01:00
Sergio Martins
97c1ca30fd Layouting engine rewrite
The layouting was becoming too complex to maintain and to introduce
new features. Was even buggy, the fuzzer was constantly finding
bugs, which took hours to workaround.

Problem with the old layout engine is that there was a catch 22, between
Items driving the separators, and separators driving the anchors.

The new layout is much simpler, both in implementation and conceptually.
There's simply a recursive hierarchy of Item elements. An Item can either
have a QWidget to show, or be a ItemContainer, which contains Item children,
and so forth. Each ItemContainer is either vertical or horizontal. That's enough
to represent the "nested multi-splitter" concept which KDDW uses.

After each item insertion/deletion/resize, the separators are regenerated. They
are essentially dumb now.

TODO:
- Separators are drawn, but are not interactive yet
- There's 5 tests failing
- LayoutSaver scalling functionality
2020-05-04 00:02:03 +01:00
Allen Winter
df692686e7 various - update copyright year 2020-01-07 11:36:56 -05:00
Sergio Martins
787f7802be Move the private code into a private/ folder
It's nice to have a similar include hierarchy at build time and install
time.

It also makes things more explicit
2019-10-20 19:24:54 +01:00