Commit Graph

158 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee ab40a342af doc: Add a stack layout default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 163748c782 doc: Add a ratio layout default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 7fa56cb94c doc: Add a flex layout default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 150026690c doc: Add a fixed layout default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 5ba7af2be2 doc: Add an align layout default screenshot 2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 9d0693ce3a doc: Do not export draw, fit and layout methods
They are used internally, users should never call them.

This will make the API documentation cleaner.
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee d85588babe wibox: Create a container module
Previously, the "containers" were placed in layout or widget.

They all have similar APIs and usage, so lets bring them together.
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee b0571a8128 stack: Use the shared documentation and fix the doc 2016-05-09 01:37:48 -04:00
Emmanuel Lepage Vallee f8845fd970 ratio: Use the shared documentation and fix the doc 2016-05-09 01:37:48 -04:00
Emmanuel Lepage Vallee 76cb62a744 flex: Use the shared documentation and fix the doc 2016-05-09 01:37:48 -04:00
Emmanuel Lepage Vallee 533a4bfd8f fixed: Use the shared documentation and fix the doc 2016-05-09 01:37:48 -04:00
Emmanuel Lepage Vallée 770cfa4553 Merge pull request #775 from Elv13/margins_redraw
Margins redraw
2016-03-26 03:40:42 -04:00
Emmanuel Lepage Vallee 35ece57a78 layout.margin: Fix the documentation 2016-03-26 01:46:47 -04:00
Emmanuel Lepage Vallee 87813a5597 layout.margin: Avoid unneeded redraw 2016-03-26 01:46:30 -04:00
Emmanuel Lepage Vallee f1816474df wibox: Add widget and layout metatable for widget creation
Calling wibox.widget.base.make_widget_declarative{} is too long, so this
commit add wibox.widget{} and wibox.layout{} alias.
2016-03-19 17:37:33 -04:00
Daniel Hahler 8966c73599 Minor doc fixes 2016-03-06 14:46:13 +01:00
Emmanuel Lepage Vallee 78ed3abe1a wibox.widget: Minor enhancements
* Better widget names when using the declarative syntax
 * Add ratio.get_ratio to avoid using the private API
 * Also support `set_widget` when swapping widgets
2016-03-04 04:16:53 -05:00
Emmanuel Lepage Vallée 3be5343e83 Merge pull request #709 from psychon/implement-set-children-sanely
Implement set children sanely
2016-03-03 02:06:58 -05:00
Uli Schlachter b40b69d379 Fix the mirror layout
Issues involve:
- :layout() had the wrong signature and expected a cr argument that was left
  from when this was still the :draw() function.
- horizontal and vertical reflection were mixed up (I guess it has always been
  this way?)
- The return value should be a table of widget placements. Instead it was just a
  single widget placement.

This is broken since commit 85ab3f045b.

Fixes: https://github.com/awesomeWM/awesome/issues/718
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-29 22:50:47 +01:00
Uli Schlachter cf3c81fa9e Implement :set_children() sanely everywhere
This makes the code use the existing functions for setting widgets. That way,
all the sanity checks that the existing functions have are applied for this code
as well.

I just spent half an hour tracking down a bug where a boolean ended up as a
"widget" in a fixed layout. The symptom was that while drawing the widget, an
error happened. Via this change, the error would instead be flagged while
constructing the widget.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-27 13:55:34 +01:00
Uli Schlachter 267ab282b2 Sanitize argument handling for wibox.layout.stack constructor
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-16 19:42:35 +01:00
Uli Schlachter 9db539fbf2 Fix wibox.layout.mirror
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-14 14:42:34 +01:00
Uli Schlachter 15e72fb037 Fix luacheck warnings in lib/wibox
Warnings pointing out actual problems are left.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-12 09:15:55 +01:00
Emmanuel Lepage Vallee 0a39d196c7 wibox.layout: Add the new 'ratio' layout
This layout allow each widgets to take 'r' percent of the total
space, where 'r' is configurable.

It re-implement the 'wfact' system used by `awful.layout.suit.tile`
2016-02-10 21:40:40 -05:00
Emmanuel Lepage Vallee 20030e6f93 wibox.layout: Add new 'stack' layout
This layout display the widgets on top of each other. It can also optionally
display only the first one.

The most common use case is to create a composited widget. Other use case
include the creation of a "paged" stack to only display the most
relevant widget without adding extra complexity to the parent layout.
2016-02-10 21:40:40 -05:00
Emmanuel Lepage Vallee e36f23171b wibox.widget: Add `set_children` method
Provide a generic method to set the widget content
2016-02-10 01:09:50 -05:00
Emmanuel Lepage Vallee e615173552 layout.fixed: Add methods to manipulate the layout after creation
Until now, this layout was "append only". There was no official
APIs to remove, replace, insert and swap widgets. This is fine
for the usual wibox + sensors widget used by the majority of
users, but lack flexibility necessary to use the layout system
to place dynamic elements such as clients.

The methods introduced by this commit are also recursive. This
allow widgets to be decorated, wrapped and splitted without
having to add boilerplate code everywhere.
2016-02-03 04:01:38 -05:00
Emmanuel Lepage Vallee 330c8d97e1 layout.flex: Base on layout.fixed rather than widget.base
This remove duplicated code and will allow more "collection"
style layouts to be implemented without logic duplication.

This commit also do some small cleanup to remove duplicated
code now present in `awful.util`.

Fixes https://github.com/awesomeWM/awesome/issues/617
2016-02-03 04:00:56 -05:00
Emmanuel Lepage Vallee 8da5c79bb8 wibox.widget: Add new `get_children(recursive)` method to all widgets 2016-02-03 04:00:42 -05:00
Emmanuel Lepage Vallee b74b8ea0cd margin: Add an option to :fit() -> 0,0 when the content is empty
Make it easier to write "optional" widgets, like empty textbox
that can be filled only in certain scenarios.
2016-01-18 03:38:46 -05:00
Emmanuel Lepage Vallee bd8e2d2ca8 typo: replace 'wibox' with 'context' where relevant
Closes https://github.com/awesomeWM/awesome/pull/613.
2015-12-31 15:33:22 +01:00
Uli Schlachter 1c8aa0f5f4 Add a scroll layout
This allows scrolling a widget if there is too few space available. There are
several different modes available for how the scrolling "looks like".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-11-22 18:19:53 +01:00
Uli Schlachter dc0afe9f59 Add some constructor arguments to some layouts
This adds new constructor arguments to align, fixed and flex which allows adding
widgets directly while creating the layout.

Idea originally by actionless:
https://github.com/awesomeWM/awesome/pull/486#issuecomment-143606301

Closes https://github.com/awesomeWM/awesome/pull/490.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-10-17 14:50:46 +02:00
Daniel Hahler 4bffa7e47e doc: fix unintentional rendering as code due to indent 2015-10-14 00:22:26 +02:00
Daniel Hahler b0d7e6bb6c Merge pull request #458 from psychon/explicit_widget_deps
Explicitly track dependencies between widgets

Closes https://github.com/awesomeWM/awesome/pull/458.
2015-09-21 21:12:39 +02:00
Uli Schlachter b134318f19 Use gears.matrix instead of cairo.Matrix everywhere
This has some positive results on the "benchmark test". Each single number is
the best one out of three runs.

Before:
        create wibox: 0.0826502  sec/iter ( 13 iters, 1.157 sec for benchmark)
    update textclock: 0.0186952  sec/iter ( 57 iters, 2.473 sec for benchmark)
  relayout textclock: 0.0158112  sec/iter ( 64 iters, 1.028 sec for benchmark)
    redraw textclock: 0.0015197  sec/iter (662 iters, 1.861 sec for benchmark)

After:
        create wibox: 0.0825672  sec/iter ( 13 iters, 1.154 sec for benchmark)
    update textclock: 0.00378412 sec/iter (277 iters, 4.216 sec for benchmark)
  relayout textclock: 0.00259056 sec/iter (420 iters, 1.09 sec for benchmark)
    redraw textclock: 0.00105128 sec/iter (958 iters, 1.79 sec for benchmark)

We see no significant change in the creation of wiboxes (99.9% compared to
before). Update (20% of the previous run time), relayout (16%) and redraw (69%)
are all sped up by this change.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-19 13:38:05 +02:00
Uli Schlachter 41a8fabf4c Explicitly track dependencies between widgets
Before this, dependencies between widgets where implicitly discovered by
recursive calls to base.fit_widget() and base.layout_widget(). However, it is
too easy to get this wrong (just call one of these functions from outside of a
widget's :fit() / :layout() function) and the resulting mess would be hard to
debug.

Thus, this commit changes the API so that callers have to identify themselves
and we can explicitly record the dependency between the widgets involved.

This also fixes a bug where no dependencies were tracked for widgets after
:set_visible(false). Whoops...

Sorry for breaking the API for adding this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-17 18:17:05 +02:00
Yauhen Kirylau 475358050a fix(lib: wibox: layout: constraint): s/base_widget/base/
Closes https://github.com/awesomeWM/awesome/pull/446.
2015-09-12 15:23:16 +02:00
Uli Schlachter 958603410c flex layout: Test signal emission
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:51:36 +02:00
Uli Schlachter dcd4db69e6 fixed layout: Test signal emission
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:51:36 +02:00
Uli Schlachter 0e7ae1cb25 align layout: Test signal emission
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:51:36 +02:00
Uli Schlachter 3338718b93 Merge wibox.layout.base and wibox.widget.base
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:28:53 +02:00
Uli Schlachter b83eaf5915 Conver the rotate layout to the new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:28:53 +02:00
Uli Schlachter 85ab3f045b Convert the mirror layout to the new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:28:53 +02:00
Uli Schlachter f2b1071875 Convert the margin layout to the new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:28:53 +02:00
Uli Schlachter 746cc23402 Convert the constraint layout to the new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:28:52 +02:00
Uli Schlachter 496fbde9b4 Convert the flex layout to the new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:28:52 +02:00
Uli Schlachter 199b553895 Convert the fixed layout to the new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:28:52 +02:00
Uli Schlachter e67e2813e9 Convert the align layout to the new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:28:52 +02:00
Uli Schlachter 4785b63755 Prepare wibox.widget.base for new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-09-05 14:06:29 +02:00
Uli Schlachter bcc1751fca fit_widget(): Sanitize the result of :fit()
After this change, fit_widget() enforces that a widget cannot ask for more space
than was offered to it. This also fixes a rounding issue in the flex layout
where its fit function would return too small numbers.

Thanks to this, lots of "XXX" comments in spec/ disappear.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-08-23 17:08:44 +02:00
Uli Schlachter 3fbd16d9a3 wibox.layout.align: Correctly size second widget
In expand nodes "none" and "outside", the variable size_remains describes how
much space is available for the first/third widget. Everything else is used by
the second widget. Thus, fitting the second widget to anything involving
size_remains is wrong. Instead, this commit uses the correct value.

This also fixes a messed up argument order for horizontal align layouts.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-08-23 17:07:45 +02:00
Uli Schlachter 564fae8934 Merge branch 'add_gears_matrix' 2015-08-23 15:36:55 +02:00
Uli Schlachter 56c22cde77 Merge branch 'widget_context' 2015-08-23 15:33:43 +02:00
Uli Schlachter cb34144bf8 Merge branch 'master' of https://github.com/kindlycat/awesome 2015-08-23 15:29:22 +02:00
Grigory Mischenko d2407c3de1 Widget opacity: draw with alpha only if transparent 2015-08-13 12:26:43 +03:00
kindlycat 03663fe778 Add "opacity" property for widgets 2015-08-12 22:31:06 +00:00
Daniel Hahler f5ed8848e7 Use awful.util.round in wibox.layout.flex 2015-08-12 14:10:10 +02:00
Uli Schlachter 1ebc34b5e9 Widgets: Also add a context argument to :fit()
Together with the context argument to :draw(), this even allows widgets to have
DPI-dependant size.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-08-12 11:19:48 +02:00
Uli Schlachter 88b98789a0 Rename the first argument to :draw to "context"
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-08-12 11:19:28 +02:00
Uli Schlachter e5a9eef157 Widget drawing: Add a traceback on errors
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-08-12 11:17:48 +02:00
Uli Schlachter 19b9bfc46e Move wibox.layout.rect_to_device_geometry to wibox.widget
Having two modules named "base" is confusing and "wibox.layout" doesn't contain
much useful stuff. This is a first step for removing wibox.layout by moving a
function which should only ever be used internally in awesome.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-08-12 10:38:22 +02:00
Daniel Hahler 68b0fa243f Add "visible" property for widgets
Widgets with `visible = false` will not be drawn.

Closes https://github.com/awesomeWM/awesome/pull/326.
2015-08-10 23:09:07 +02:00
Uli Schlachter a239b2cac7 Use gears.cache to replace some other caches
Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-07-25 15:08:00 +02:00
Uli Schlachter d990e7918f Use :weak_connect_signal() for connecting to widget::updated
This way "that other widget" doesn't prevent the current widget from being
garbage collected.

Please note that this in all of these cases the widget under consideration does
have a strong reference to the callback function. This means that the callback
cannot be garbage collected until "this widget" itself is collected. Thanks to
this, this change is safe.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-06-25 06:37:05 +02:00
Julian Wollrath 6cc7be512c Remove the *.in from all files.
Signed-off-b: Julian Wollrath <jwollrath@web.de>
2015-06-19 22:33:32 +02:00
Julian Wollrath ca89f0f311 Use LDoc commands to mark parameters as optional in the docs.
Signed-off-by: Julian Wollrath <jwollrath@web.de>
2015-02-28 23:14:15 +01:00
Julian Wollrath 4d7bd19014 Make everything wibox related a class in the docs.
Signed-off-by: Julian Wollrath <jwollrath@web.de>
2015-02-28 23:14:13 +01:00
Ignas Anikevicius (gns_ank) e4fa6effe2 Docs: Fix headers for the wibox module
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:11 +01:00
actionless 7c4010eea3 fix(lib: wibox: layout): fixed ldoc for set_spacing method 2014-11-08 01:08:26 +01:00
Emmanuel Lepage Vallee 848aadf95c wibox.layout: Add fixed and flex layouts widget spacing property 2014-10-18 01:17:50 -04:00
Uli Schlachter 983d094c76 wibox.layout.base.rect_to_device_geometry: Fix for "weird" rotations
The old code transformed the top-left and bottom-right corner of the rectangle
to device space and calculated a rectangle based on these two points. However,
if you rotate a rectangle by 45°, these two points will be directly above each
other and thus the old code would calculate a width of 0.

Fix this by transforming all four corners of the rectangle into device space and
calculating a rectangle based on this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-10-05 10:47:39 +02:00
Uli Schlachter db00145406 wibox.layout.base.fit_widget: Enforce sane width and height
Previously, odd things could happen if a widget was getting fitted into a
negative width or, even worse, width being NaN (not a number)!

This can e.g. happen due to a margin layout which doesn't get enough space to
even draw the margin that it is supposed to add.

Fix this by enforcing a minimum value of 0 for the width and height that a
widget gets fitted into.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-23 17:48:26 +01:00
sirkha b1c14d5660 Added Comments
Added some comments to explain the changed code and how it functions

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-13 12:11:20 +01:00
sirkha fbba41ddaa Added Expand Modes
Added set_expand function with options of "none" "outside" or "inside" modes.
The "inside" mode is the default and will result in the original behavior. The
main benefit is being able to actually center a widget in the available space
with options of how to draw the outside widgets (expand to take the space,
or not.) Further functionality can be had by ommiting one of the outside
widgets. Set default layout mode in the constructor.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-13 12:11:04 +01:00
sirkha 601dc232db Fixed Flex Layout Fit Behavior
Modified flex:fit so that it will not return more than its sub-widgets need.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-13 12:05:50 +01:00
sirkha ceaeaedb5b Fix Align Layout Fit Behavior
This changes the align layout fit function so that align:fit will not return
more space than is actually needed by its sub-widgets. Changes to align:draw
were also required so that any widget assigned to the middle slot will expand
to fill the remaining space.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-13 12:05:50 +01:00
Rocco Aliberti 7adc21e2ca wibox.layout.margin: Add margins color parameter
This adds a :set_color() method so that the margin layout can color the margins,
drawing a bordered widget.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-01-20 17:28:04 +01:00
Björn Åström 8792d6a4ba wibox.layout.fixed: Fix fill space
The last widget always took up the remaining
space even though fill_space(false)
had been called on the layout.

This got broken in commit 9d333113dd.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-10-03 15:44:45 +02:00
Uli Schlachter 3edd216560 wibox: Add widget geometry cache
This commit adds and uses wibox.layout.base.fit_widget(). This function is a
wrapper for widget:fit() that caches the result and thus speeds things up.

This is necessary because some layouts call :fit() from their :fit() and :draw()
functions. Nesting such layouts means that at the widget at the tail of the
stack gets its :fit() function called quite often. If this function is not
blazingly fast, this results in noticeable slowness.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-08-21 12:26:47 +02:00
Uli Schlachter 8af54130d6 Fix wibox.layout.flex:fit() (FS#1126)
The flex:fit() function was calling the fit() function of the widgets it
contained with too large values, trying to hand out more space than it had
available. This resulted in more space being requested than was available and
some weird layout issues resulted.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-24 22:32:53 +01:00
Uli Schlachter 4c3bac07ec wibox: Improve constructor functions for some layouts
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-10 13:46:28 +01:00
Lukáš Hrázký 5365dfdb79 wibox.layout.constraint: fix the min and max strategies
Fixes mixed up min/max strategies and other bugs in min and max. Also
removes enforcing the size in draw, adhering more to awesome's layout
concept.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-10 11:24:53 +01:00
Lukáš Hrázký 1881ceb9d3 wibox.layout.flex: add set_max_widget_size() function
The function can be used to set the maximum size the widget in the
flex layout should take.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-02-20 13:08:27 +01:00
Uli Schlachter 6608b0aa1c wibox.layout.align: Give middle widget full height
I amended some change to commit 8560de597c which made the align layout's
middle widget really centered instead of being way too wide. However, this also
shrunk the widget on the "other" axis, too. This commit fixes that up.

A big "sorry" to Lukáš for breaking his patch.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-08 22:06:25 +01:00
Lukáš Hrázký 66e52229f7 wibox.layout: add a new constraint layout
This layout can be used to constraint the size of the widget it holds.
Depending on the strategy passed to it, the widget will have a minimum,
maximum or exact size that was set through this layout.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 23:05:30 +01:00
Lukáš Hrázký 8560de597c wibox.layout.align: make the middle widget really centered
Centers the middle widget in the align layout in the remaining space
left by the widgets on the sides.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 23:05:30 +01:00
Lukáš Hrázký e38651bafb wibox.layout.align: don't take up all space in the other axis
This adds a fit function to the align layout that makes sure that
the layout will not take up all the available space in the other
axis than it's direction. Eg. for horizontal align layout, it will
only take up the maximum of its widgets' heights in the vertical axis.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 21:05:45 +01:00
Lukáš Hrázký f6d9443c5d wibox.layout.flex: fix the fit function
The fit function of the flex layout is different from the fixed.fit one.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 21:04:48 +01:00
Lukáš Hrázký 9d333113dd wibox.layout: remove unnecessary wrapping of draw and fit functions
Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 20:59:42 +01:00
Uli Schlachter 3a25e78224 wibox.layout.rotate: Add some good constructor arguments
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 20:52:00 +01:00
Uli Schlachter ae69b2db03 wibox.layout.base: Use math.min/max
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 20:50:17 +01:00
Uli Schlachter f6b43a1f1d Fix wibox.layout.rotate
This got broken in commit 90f7f55348.

Thanks to crazedpsyc for reporting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-05 17:35:08 +01:00
Uli Schlachter d13b825c36 Fix warnings from LDoc
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 15:35:32 +01:00
Uli Schlachter 96e03cb45d Lots of random documentation fixes
This is mostly about mis-named parameters, but also other small things.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 14:09:10 +01:00
Uli Schlachter 90f7f55348 wibox: Make the functions a little more object-y
This replaces lots of function foo.bar(this, ...) with function foo:bar(...).
There should be no other changes in this commit.

The point is to make it easier for api documentation tools to figure out that
these are methods on objects.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-18 20:44:03 +01:00
Uli Schlachter 21d821a8dd rotate: Use the draw_widget() function
Without this, input handling is broken (draw_widget() registers each widget with
its position for input handling).

This also removes some unnecessary save()/restore() calls. Our caller (again
draw_widget()) already does that for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-06 13:09:13 +02:00
Uli Schlachter ce9932f17f Fix various minor errors after the lua 5.2 conversion
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 21:12:26 +02:00
Arvydas Sidorenko 61ff9ce2b7 Ported awful to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 4e67027a97 Ported wibox.layout to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00