Commit Graph

92 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 1c34c56d0b base: Remove setup_drawable callback
As this was the last step in the base constructor, it could be
done in each menu type without the callback and extra code.

The only reason this existed was to allow menu "sub classes"
that override this function. However, since this was rewritten,
it was no longer used, so for the sake of simplicity, I remove
this feature.
2016-12-25 21:59:50 -05:00
Emmanuel Lepage Vallee 84f19c51a1 scroll: Fix scroll-up 2016-12-25 21:59:50 -05:00
Emmanuel Lepage Vallee 825ff024ef More bug fixes
This is a step forward to stabilize Radical again. Most of impl/ and widgets/
code is still a mess, but the other modules slowly start to be maintainable
again. The road is still long before the Radical code is good enough to go
into Awesome. It will get there, eventually.
2016-12-25 21:59:50 -05:00
Emmanuel Lepage Vallee 2d0a957506 quality: Begin to fix luacheck warnings 2016-12-25 21:59:37 -05:00
Emmanuel Lepage Vallee 7506a8f49d base: Fix scroll, filter and embedded menus 2016-12-25 21:59:37 -05:00
Emmanuel Lepage Vallee ffd1e8003a base: Fix item filtering 2016-12-25 21:59:37 -05:00
Emmanuel Lepage Vallee b3fa0b9a23 placement: Fix more regressions from the re-write 2016-12-25 21:59:37 -05:00
Emmanuel Lepage Vallee b167117958 bar: Support border color
Apparently this never worked as documented
2016-12-25 21:59:37 -05:00
Emmanuel Lepage Vallee 9ea34d4003 cleanup: Mutualize some code and fix embed menus 2016-12-25 21:59:37 -05:00
Emmanuel Lepage Vallee f48ede52f9 cleanup: Port scrolling to Awesome 3.6 visible widget API
It still doesn't work, but at least there is no logic duplication
with Awesome anymore.
2016-12-25 21:59:37 -05:00
Emmanuel Lepage Vallee a1abd2f57a cleanup: Remove overlay/underlay hacks, re-implement as widgets container
There is a new widget called `infoshapes`. It support all the features
from the underlay system, but is a lot less intrusive. This allow to
make some code simpler.

This is another step in getting rid of all the hacks.
2016-12-25 21:59:37 -05:00
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 3167affe99 overlay: Re-write for the new widget system
**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.
2016-12-25 21:59:23 -05:00
Emmanuel Lepage Vallee 1229da75c7 Add a new global get_preferred_size() for all widgets
Replace the fit(9999,9999) used before. This will hopefully be
temporary until upstream adopt such a method
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 da08a267cf Add rounded + shadow item style 2015-01-10 23:59:51 -05:00
Emmanuel Lepage Vallee c2cf7ba3fa Add option 2015-01-01 02:08:40 -05:00
Emmanuel Lepage Vallee 2f9af8d5dd Add color groups 2014-12-31 00:30:52 -05:00
Emmanuel Lepage Vallee 1257ac228e Add a color namespace helper method
This will allow implementations to use their own colors without
redefining them by hand
2014-12-30 17:28:01 -05:00
Emmanuel Lepage Vallee 80bdbcca68 Add 'add_items' and 'add_widgets' methods 2014-12-28 22:23:59 -05:00
Emmanuel Lepage Vallee 75e6357b23 Various improvements 2014-12-25 01:10:55 -05:00
Emmanuel Lepage Vallee 03090fa2ec Add a bunch of skining options 2014-11-14 23:46:06 -05:00
Emmanuel Lepage Vallee 1a7630e437 Add default_item_margins and default_margins 2014-10-17 23:52:26 -04:00
Emmanuel Lepage Vallee f215d24f35 Add better tools to track the widget height 2014-10-05 18:01:36 -04:00
Emmanuel Lepage Vallee f3fb27f464 Fix minor bugs
* 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
2014-08-08 02:02:40 -04:00
Emmanuel Lepage Vallee f4e5f84c58 Add an 'hide()' method for menus 2014-08-02 18:04:47 -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 8da00cbd65 Add new notification item layout, improve extensions 2014-04-08 23:38:31 -04:00
Emmanuel Lepage Vallee f7bf7279c3 Add mod1 (alt) support for key hooks 2014-04-03 23:25:35 -04:00
Emmanuel Lepage Vallee 700714eb1e Fix a bee04c14bc regression 2014-03-26 00:21:42 -04:00
Emmanuel Lepage Vallee 14c420ac49 Fix keyboard handling 2014-03-23 00:14:25 -04:00
Emmanuel Lepage Vallee bee04c14bc Fix issue #11, break API, may cause regressions 2014-03-22 17:35:43 -04:00
Emmanuel Lepage Vallee 059572956e Change the way position is computed
The old way was a hack arounf an Awesome 3.5.0 limitation.
The newer should be more reliable.

Please report any regressions.
2014-03-22 00:11:08 -04:00
Emmanuel Lepage Vallee d8e220a7bb Fix bugs with sub menu, embed menu and scrolling 2014-03-21 23:20:50 -04:00
Emmanuel Lepage Vallee 2c9bd9107f Fil multiple minor issues related to fg and underlay colors 2014-03-13 01:14:52 -04:00
Emmanuel Lepage Vallee 5d21035698 Add some filter options 2014-03-12 22:56:56 -04:00
Emmanuel Lepage Vallee 231eef25bc Add global underlay support 2014-03-12 00:31:50 -04:00
Emmanuel Lepage Vallee ad20d9e2be Properly handle menu prefix and suffix widgets
This was previously hardcoded

100 commits!
2014-03-11 20:50:00 -04:00
Emmanuel Lepage Vallee 5255cca803 Change object syntax to user get_ and set_ prefix instead of get_map/set_map mappers (issue #15) 2014-03-05 00:12:48 -05:00
Emmanuel Lepage Vallee 95ed8b26c4 More style/colors oriented refactoring 2014-03-02 16:28:30 -05:00
Emmanuel Lepage Vallee fabd52d1a6 Major refactoring, address issue #12 2014-02-22 23:59:03 -05:00
Emmanuel Lepage Vallee b6ba3ad383 Replace old state handling implementation by something 'better'
While **much** more complex and slower for regular menus, it has advantages:

 * Better performance scaling when state count grow
 * Prevent most accidental unsupported state colors
 * Prevent a big if elseif elseif... switch copy pasted in all item_styles
 * Make it easier to register new states

As for the 'bloated' created by this commit, it will be moved when I will
fix issue #12
2014-02-21 22:22:20 -05:00
Emmanuel Lepage Vallee 9148c48dd1 Fix issue #7 2014-02-20 22:29:40 -05:00
Emmanuel Lepage Vallee 7046b40f83 Add icon_transformation option (take this from Blind playbook)
It can use Blind common.drawing tools to implement some magic.

I may merge this into Radical and kill Blind as everything else
is pretty much deprecated at this point. Blind was never more
than a hack.
2014-02-19 22:09:28 -05:00
Emmanuel Lepage Vallee 5a79549e59 Add opacity option 2014-02-17 22:57:04 -05:00
Emmanuel Lepage Vallee 9205d9f27a Add partial dynamic overlay support
This will require a better event API to be useful, including issue #10
2014-02-12 23:10:07 -05:00
Emmanuel Lepage Vallee 76623695e6 Fix an issue with :remove() and fix taglist signals 2014-02-11 21:38:05 -05:00
Emmanuel Lepage Vallee cbb39935db Add support for mouse over colors 2014-02-09 00:54:59 -05:00