Lots of things will break, hopefully for the better (eventually)
This commit use new upstream APIs:
* Many cairo paths have been replaced with gears.shape and gears.matrix
This commit add some features:
* Improved border_color support, now available per state
* bg_image support, now available per state
* Mutualize the state setting, remove duplicated code
Regressions:
* The arrow menu background border is off by a pixel
* The layout position problem reported by @mindeunix is now worst.
The positioning algo is full of race conditions and cannot be fixed
without a full rewrite. This commit break more things than it solve
and the code is in the middle of a transition. This will be solved
by future commits addressing the code quality (after the refactoring).
The position of the drawable wasn't taken into account.
This does not fix the bug reported by Minde where the manu
position is correct the first time, but off the second, this is
due to something else.
**WARNING**: this break the API
menu.overlay -> menu.draw_overlay
The new "overlay" behave like underlay, but is on top
This commit also add underlay/overlay "align" option and document
the feature properly.
The "hack" force the full redraw of the menu. This is what 3.5 did
anyway, but of course is not correct. The new layout system allow
widgets to have a larger fit and it should cascade by itself. This
is not yet used by radical.
This commit also fix some mistake made during the initial port.
My whole config now load mostly correctly. Some 3.5 era bugs even
fixed themselves! It is still slower for some reasons and have many
errors left, but it "look" ok.
This is the first step toward removing the underlay/overlay from
all item.style and item.layout and use the common implementation.
This will simplify the code a lot.
This commit fix most issues introduced by the new widget system. It
is not production ready and will require multiple commits to fix
individual issues.
The new widget system is better suited for modules like Radical than
the previous one. Over time, this breakage will probably end up being
a good thing. However, for now, expect multiple errors.
The changes:
* The draw "wibox" argument is now a "context". "context.wibox" is
the equivalent. This will allow passing the Radical structure to
the draw method without storing it in the widgets.
* "fit" now have a new required "context" argument for the DPI, this
will allow removing the "default_height" variable Radical is using
to scale the UI on HIDPI systems. This will allow size policies to
be passed to the fit method
* "draw" has been splitted into "draw", "draw_before_children",
"draw_after_children" and "layout". This simplify the overlay
system and will allow cleaner code
* Drawing outside of the widget clip is no longer supported, this
break multiple Radical item.style. This will allow better
performance and less redraw once the new system issues have been
fixed
The old version is terrible... How much did I drink when I made
that... Well, it was when I was unexperienced with cairo, but...
Anyway, the new maths will eventually allow to use hinting
and Pango with good results. There is also less magic constants.
* Add hide() method to hide a menu and all sub menu (compared to set_visible)
* Add option to have sub_menu arrows
* Fix selected::changed not being emited in some cases
* Remove duplicated code from notification layout