Commit Graph

22 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee f239ee9a24 Rewrite the view layer
Radical is a model-view framework. There is a common API to
set data, then view modules to display it. Those modules have
been rewritten on top of new APIs.

Not all features are yet re-integrated, most are. Future commits
will address the various regressions and missing features. This
time, the code should be maintainable. The whole separation of
concerns analysis has been re-done. Allowing code de-duplication
and generalization.

The API remain the same, only `set_menu` has changed a little to
allow merging the 2 sub-menu code paths.
2016-12-25 21:59:37 -05:00
Emmanuel Lepage Vallee 5271ffd35c Begin the big changes for 3.6
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).
2016-12-25 21:59:23 -05:00
Emmanuel Lepage Vallee cf9bb87b36 Port to the new Awesome widget system
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
2016-12-25 21:59:23 -05:00
Emmanuel Lepage Vallee c2cf7ba3fa Add option 2015-01-01 02:08:40 -05:00
Emmanuel Lepage Vallee 4683fa672d Add a 'rounded' style for bar menus 2014-12-23 14:55:54 -05:00
Emmanuel Lepage Vallee 31e5c3dd5c Fix issue #29 2014-11-23 00:32:13 -05:00
Emmanuel Lepage Vallee 03090fa2ec Add a bunch of skining options 2014-11-14 23:46:06 -05:00
Emmanuel Lepage Vallee 9d8bcc3882 Clean the arrow layout code
It was my first cairo code ever, I got better ;)
2014-10-11 03:11:20 -04:00
Emmanuel Lepage Vallee 46481f0a8a Add better tooling to track menu dimensions 2014-10-05 18:01:54 -04:00
Emmanuel Lepage Vallee 1662a013dc Bug fixes 2014-07-27 19:20:04 -04:00
Emmanuel Lepage Vallee 72e9fea65b Fix multiple minor bugs/regressions 2014-05-31 23:45:46 -04:00
Emmanuel Lepage Vallee e475964238 Fix a recent arrow style regression 2014-05-01 16:25:46 -04:00
Emmanuel Lepage Vallee e33300f4ee Fix a 'x' positioning regression 2014-04-28 23:31:22 -04:00
Emmanuel Lepage Vallee 5efc2d89e0 Fix arrow menu, improve tag/task menu 2014-03-26 23:21:42 -04:00
Emmanuel Lepage Vallee ef7e46f865 Improve dynamic menu speed 2014-03-26 16:18:59 -04:00
Emmanuel Lepage Vallee b10169e613 Fix f746a8b3 2014-03-24 00:04:19 -04:00
Emmanuel Lepage Vallee f746a8b347 Make async menu faster
This may cause some visual artefacts, but is about 5 time
faster than the old way.
2014-03-23 19:00:56 -04:00
Emmanuel Lepage Vallee 0376cfaf31 Add new 'item_layout' concept to fight code duplication between layouts 2014-02-02 16:53:09 -05:00
Emmanuel Lepage Vallee 63bb804a45 'Bar' menu cleanup, minor bug fixes 2014-01-05 17:35:23 -05:00
Emmanuel Lepage Vallee 9a4430ab4c Add embeded menus (menus in menus) support 2013-07-21 04:15:56 -04:00
Emmanuel Lepage Vallee e8027779dc Add bg/fg pattern support 2013-07-13 01:05:46 -04:00
Emmanuel Lepage Vallee 88d7ad2ff1 First commit
This is Radical, a new menu implementation for AwesomeWM. It make it easy to abstract look and behavior or various types of menu with object oriented abstractions. While slower, this make it easier to maintain and extend.
2013-05-11 15:02:47 -04:00