Commit Graph

47 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 5eab124677 context: Add screen property 2016-12-25 21:59:55 -05:00
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 2d0a957506 quality: Begin to fix luacheck warnings 2016-12-25 21:59:37 -05:00
Emmanuel Lepage Vallee 6244ed7c26 api: Update file to match new upstream Awesome APIs
Also has some bug fixes mixed in the patch.

The Radical placement API is now fully upstreamed.
2016-12-25 21:59:37 -05:00
Emmanuel Lepage Vallee e18f664de0 placement: Add more methods 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 cbc5e6919f placement: Re-introduce many placements features lost during the re-write
The menu can be attached to a widget or the mouse again, and more

This commit also fix some tasklist/taglist issues and introduce minor
features like item.shape.
2016-12-25 21:59:37 -05:00
Emmanuel Lepage Vallee 2af6ad83e2 item.layout.centerred: Fix regressions 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 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 1a7630e437 Add default_item_margins and default_margins 2014-10-17 23:52:26 -04: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 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 52fdd8a1f2 Correctly forward menu item geometry 2014-07-27 23:49:14 -04:00
Emmanuel Lepage Vallee 72e9fea65b Fix multiple minor bugs/regressions 2014-05-31 23:45:46 -04:00
Emmanuel Lepage Vallee 68f31d160a Fix some minor context menu issues 2014-04-16 00:26:31 -04:00
Emmanuel Lepage Vallee ef7e46f865 Improve dynamic menu speed 2014-03-26 16:18:59 -04:00
Emmanuel Lepage Vallee 14c420ac49 Fix keyboard handling 2014-03-23 00:14:25 -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 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 fabd52d1a6 Major refactoring, address issue #12 2014-02-22 23:59:03 -05:00
Emmanuel Lepage Vallee fd835fdbeb Fix issue #14 2014-02-19 22:16:59 -05:00
Emmanuel Lepage Vallee 1dea6095b0 Fix a bug when menu are larger than the screen edge 2014-02-18 22:19:38 -05:00
Emmanuel Lepage Vallee 5a79549e59 Add opacity option 2014-02-17 22:57:04 -05:00
Emmanuel Lepage Vallee cd88700613 Port rc.lua default tasklist buttons to the tasklist module 2014-02-17 01:11:35 -05:00
Emmanuel Lepage Vallee 5cebb6a961 Switch to the new button handling API (instead of awful.button) 2014-02-16 23:55:44 -05:00
Emmanuel Lepage Vallee c0c57eff16 Partially implement issue #8 2014-02-05 22:48:26 -05:00
Emmanuel Lepage Vallee ffcace786f Fix for sub-menus on the far-right of the screen 2014-02-02 00:35:50 -05:00
Emmanuel Lepage Vallee 63bb804a45 'Bar' menu cleanup, minor bug fixes 2014-01-05 17:35:23 -05:00
Emmanuel Lepage Vallee 55f1b2a0c1 Add :set_tooltip() method to all wibox.widgets 2014-01-04 16:51:50 -05:00
Emmanuel Lepage Vallee 4e54b38991 Add sub_menu_on option 2014-01-04 01:27:52 -05:00
Emmanuel LEpage Vallee 76d34dd93d Improve HiDPI support and fix 0 item submenus 2013-11-10 23:18:23 -05:00
Emmanuel Lepage Vallee 10fb812c23 Try to fix issue #3 (I sill cannot reproduce it) 2013-10-26 18:42:59 -04:00
Emmanuel Lepage Vallee 1bd4a54d54 Prevent menus from being off screen 2013-08-09 01:42:28 -04:00
Emmanuel Lepage Vallee 93d03651a9 Fix issue #1 2013-08-07 00:35:49 -04:00
Emmanuel Lepage Vallee e8027779dc Add bg/fg pattern support 2013-07-13 01:05:46 -04:00
Emmanuel Lepage Vallee 1a03ad281a Use Pango to render F-keys prefixes for menues (better on high-DPI screens) 2013-07-08 21:31:33 -04:00
Emmanuel Lepage Vallee 4484e671a7 Add full support for max_items in the vertical menu 2013-07-07 18:18:55 -04:00
Emmanuel Lepage Vallee 3403fb56f3 Improve menu loading speed with some caching 2013-07-04 01:51:01 -04:00
Emmanuel Lepage Vallee 42e12e297c Add 'add_widget' function to menus, allow to add arbitrary widgets as menu items 2013-07-04 01:20:46 -04:00
Emmanuel Lepage Vallee 9dc5137d92 Add menu 'auto_resize' option for vertical menus 2013-07-01 18:18:25 -04:00
Emmanuel Lepage Vallee 70c27a360c Make it possible to change item text and icon dynamically 2013-06-22 22:30:27 -04:00
Emmanuel Lepage Vallee beb15f6cda Implement specific item layout for horizontal menus 2013-05-26 20:49:51 -04:00
Emmanuel Lepage Vallee 4b8e11f6ac Add support for checkboxes 2013-05-16 15:18:55 -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