Commit Graph

212 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee ec14353e16 placement: Fix more regressions from the re-write 2016-03-15 03:55:20 -04:00
Emmanuel Lepage Vallee bcd6c7c2cd 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-03-14 17:52:28 -04:00
Emmanuel Lepage Vallee c1285321a1 infoshapes: Fix borders 2016-03-06 03:31:07 -05:00
Emmanuel Lepage Vallee 7cf8935ca8 bar: Support border color
Apparently this never worked as documented
2016-03-06 03:30:30 -05:00
Emmanuel Lepage Vallee 83847a36a0 dock: Fix a race condition
The size wasn't always right
2016-03-05 04:52:35 -05:00
Emmanuel Lepage Vallee 79bd539830 cleanup: Remove duplicated logic 2016-03-05 03:23:59 -05:00
Emmanuel Lepage Vallee 93fdf17096 filter: Rewrite the filter widget 2016-03-05 02:54:17 -05:00
Emmanuel Lepage Vallee 3bca97464a cleanup: Mutualize some code and fix embed menus 2016-03-05 02:14:24 -05:00
Emmanuel Lepage Vallee 8a249192b5 item.layout.centerred: Fix regressions 2016-03-04 03:21:48 -05:00
Emmanuel Lepage Vallee d6d642551d box: Fit position 2016-03-02 04:19:44 -05:00
Emmanuel Lepage Vallee 0ddb074efd context: Fix some regressions 2016-03-02 03:49:18 -05:00
Emmanuel Lepage Vallee 1f5d7f4278 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-02-28 05:00:44 -05:00
Emmanuel Lepage Vallee 18c9071baf 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-02-28 02:04:51 -05:00
Emmanuel Lepage Vallee 0719485f49 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-02-21 02:34:05 -05:00
Emmanuel Lepage Vallee 788708ea45 Add new helper modules.
This commit begin to merge the Radical "view" rewrite.

Those module API replace previously hardcoded positioning
logic. Some code may eventually be upstreamed once mature
enough.
2016-02-21 02:31:31 -05:00
Emmanuel Lepage Vallee 1e6d66f8ec Fix compatibility with LGI 0.9
Also add a 1px padding for checkboxes
2016-02-19 03:29:40 -05:00
Emmanuel Lepage Vallee 55fb74c709 refactor: Port radical.layout.horizontal to the declarative syntax
These commits dont make the code any smaller or more readable by
themselves. However, they are one step along many to refactor the
code to become more readable and simpler.

Eventual addition will extend the declarative syntax and merge it
with Radical own syntax (this will break the API a little due to
naming conflitcs).

I will also split the theme details from the declarative syntax and
use a separate "chain of responsability" meta-object to handle it.
2016-02-12 00:03:06 -05:00
Emmanuel Lepage Vallee 82afdd4570 refactor: Port radical.item.layout.centerred to the declarative syntax 2016-02-11 23:39:45 -05:00
Emmanuel Lepage Vallee 38db5447c8 refactor: Port radical.item.layout.icon to the declarative syntax 2016-02-11 23:25:03 -05:00
Emmanuel Lepage Vallee cb84a127c9 refactor: Port radical.item.layout.horizontal to the declarative syntax 2016-02-11 04:21:14 -05:00
Emmanuel Lepage Vallee 151120c812 refactor: Port radical.layout.vertical to the declarative syntax 2016-02-11 02:51:14 -05:00
Emmanuel Lepage Vallee 2f0d8707cd Use the newly upstreamed container methods 2016-02-11 01:50:27 -05:00
Emmanuel Lepage Vallee 0256412462 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-02-11 01:36:50 -05:00
Emmanuel Lepage Vallee a1a1c9eb28 Fix drawable position calculation
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.
2016-02-01 00:15:28 -05:00
Emmanuel Lepage Vallee eab27bdd8c 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-01-12 03:33:38 -05:00
Emmanuel Lepage Vallee bd3591dae6 Fix more issues for 3.6. The arrow_prefix now work using a new hack
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.
2016-01-09 04:25:46 -05:00
Emmanuel Lepage Vallee 7a0ea0507f common: Make overlay support available to all widgets
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.
2015-12-29 08:38:02 -05:00
Emmanuel Lepage Vallee e9443666a8 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
2015-12-29 06:21:13 -05:00
Emmanuel Lepage Vallee d57c46a5f0 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
2015-12-29 05:19:23 -05:00
Emmanuel Lepage Vallee 75e560995c Fix pango API misuse, add pie-chart cache 2015-03-15 16:25:41 -04:00
Emmanuel Lepage Vallee 698ca53762 Fix nil dereference 2015-03-13 00:15:21 -04:00
Emmanuel Lepage Vallee e65ae86d1d alttab: Prevent toggle from other screens 2015-03-08 18:37:32 -04:00
Emmanuel Lepage Vallee 4be9babed8 Fix dock when the screen doesn't start at y=0 2015-02-22 05:43:13 +00:00
Emmanuel Lepage Vallee da08a267cf Add rounded + shadow item style 2015-01-10 23:59:51 -05:00
Emmanuel Lepage Vallee c12501be9b Add a new 'line_3d' item_style 2015-01-02 17:52:36 -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 7b071fb7d1 Add an helper function to generate a layout switcher item 2014-12-29 23:28:45 -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 5768d4729c Improve tag/tasklist theming options 2014-12-24 00:53:09 -05:00
Emmanuel Lepage Vallee 4683fa672d Add a 'rounded' style for bar menus 2014-12-23 14:55:54 -05:00
Emmanuel Lepage Vallee 234c73b63a Add a new arrow based item style 2014-12-21 23:54:10 -05:00
Emmanuel Lepage Vallee 8fe10a1a9d Use betters maths for the Radial menu
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.
2014-12-18 16:13:10 -05:00
Emmanuel Lepage Vallee 9f121b1d42 Begin to resurect the Radial menu type 2014-12-17 23:51:58 -05:00
Emmanuel Lepage Vallee 79dcd66b7b Add a basic tag switching menu 2014-11-30 23:25:40 -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 e72323441d Add more item styles, inspired by Android Holo and Neon themes 2014-11-02 23:27:52 -05:00