Commit Graph

562 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallée 1b24acf2ea
progressbar: Fix a major regression. (#2933)
The typo was introduced when the signal and accessors were standardized
for to make the documentation less wrong.

Fix #2932
2019-12-01 03:35:26 -05:00
Emmanuel Lepage Vallee f21e0ba9dd doc: Upgrade the widget layout documentation. 2019-11-30 01:26:06 -05:00
Emmanuel Lepage Vallee be14666b4a doc: Modernize the widget doc.
This hass the following tags:

 * @interface
 * @tparam
 * @propbeautiful
 * @propemits
 * @renamedin

Beside tags, it adds some comments, fix formatting and add
new lines and dots where they belong.

Also add some signals to standardize everything.
2019-11-30 01:26:06 -05:00
Emmanuel Lepage Vallee 095e50b687 doc: Modernize the container documentation.
This hass the following tags:

 * @interface
 * @tparam
 * @propbeautiful
 * @propemits
 * @renamedin

Beside tags, it adds some comments, fix formatting and add
new lines and dots where they belong.

Also add some signals to standardize everything.
2019-11-30 01:26:06 -05:00
Emmanuel Lepage Vallee d2e5694f9c background: Add some property signals and update the doc.
It had no signals for the properties. That's non standard and has
been fixed.

The documentation tags were also upgraded to the latest standards.
2019-11-30 01:26:03 -05:00
Aire-One 3e6c33af64 Add imagebox doc example for `resize` property. 2019-11-28 13:53:59 +01:00
Aire-One 15209b305c Fix imagebox constructor missing argument. 2019-11-28 13:53:59 +01:00
Aire-One 90f89432d2 Improvement following the @psychon review. 2019-11-28 13:53:59 +01:00
Aire-One 5bf703416c Improve `wibox.widget.imagebox` documentation.
* Add the ldoc stop marker `.` to each functions, properties and methods definition ;
* Improve a little summaries ;
* Improve properties vs access methods documentation ;
* Change all documented parameters and return values to typed values.
2019-11-28 13:53:59 +01:00
Aire-One 86a9bbfd71 Improve the `wibox.widget.imagebox` descrition.
* Add a better descrition for the `imagebox` role in the wiboxes system ;
* Improve image + code render and integration into the descrition ;
* Add a second code exemple to show both coding style (imperative and declarative).

I think the user can now have a better overview of what's a `wibox.widget.imagebox` and how to use it.
2019-11-28 13:53:59 +01:00
Aire-One 82a2769e04 Fix ldoc modules summaries missing the final `.`. 2019-11-28 13:53:59 +01:00
Jordan Christiansen c09e5b16b7 Correct the name of get_children's return value (#2927)
get_children's return value should not be called "The". That was a
mistake because ldoc requires a name for return values and parameters.
If a name isn't provided, it thinks the first word of the description
is the name.
2019-11-25 17:04:01 -05:00
Jordan Christiansen f8a9c59d50 Improve textclock property docs (#2926)
* Add format docs to the constructor.
* Add timezone docs to the property.
* Give the argument to set_refresh a name other than "How".
* Fix bug in constructor argument "format" rendering.
2019-11-25 16:35:41 -05:00
Emmanuel Lepage Vallee 10fd4e8883 object: Try harder to auto-undeprecate the keys and buttons.
Having the new object layout will be important soon when the
append/remove methods start to get added to the client and the
reborn `awful.keyboard` module.
2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 45823f230a capi: Move from `.data` to `._private` for the property data.
This will bring the CAPI classes closer to the gears.object ones.

Fixes #2897
2019-11-09 16:43:12 -05:00
mergify[bot] bafe028a05
Merge pull request #2905 from psychon/imagebox_raw_pointers
imagebox:set_widget(): Handle userdata again
2019-10-11 16:50:57 +00:00
Uli Schlachter 08e230b1b3 imagebox:set_widget(): Handle userdata again
This function is not documented to handle userdata, but historically it
would just pass all arguments to gears.surface.load(), which interpreted
userdata as cairo surfaces. After 3295e9f33d, userdata
objects are restricted.

Accept userdata objects again by explicitly passing them to
gears.surface.load().

Fixes: https://github.com/awesomeWM/awesome/issues/2903
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-10-11 16:14:57 +02:00
Jordan Christiansen 580883add3 Add documentation about textclock format 2019-10-10 22:33:53 -05:00
Emmanuel Lepage Vallee cf0385af80 widget: Add an `:add_button()` method.
This is done now because a lot of code in `lib/` add buttons by manually
extracting buttons from awful.button. Instead of adding ugly code to
prevent using the legacy API, do this.
2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee 82db9180b1 widget: Mutualize all set_widget implementation to behave the same
Now always call both check_widget and make_widget_from_value. This
should make it a lot less confusing when randomly trying to create
a widget as all ways to do it slowly converge toward an unified
one.
2019-10-05 22:57:04 -04:00
Emmanuel Lepage Vallee 349b75994f titlebar/wibox: Support widget definition in set_widget.
So now it is mostly identical to `:setup()` beside some legacy
difference in how the get_children_by_id is implemented.
2019-10-05 22:57:04 -04:00
Emmanuel Lepage Vallee 249f11ec82 drawable: Add property getter/setter support.
Just like the wibox and the other APIs
2019-10-05 22:57:04 -04:00
Emmanuel Lepage Vallee 29e804a4f8 drawin: Turn `:buttons()` into a property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 3d918258e2 widget: Turn `:buttons()` into a normal property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 4cab9f8c38 widget: Return `nil` in case of failure.
Instead of an assert. If there is a "real" error, then a warning is
still printed, but otherwise this relax the requirements.
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee 51e3d66110 screen: Fix enough issue when all screens are removed to pass a test.
This doesn't mean removing all screens is supported. It isn't and never
will be. The only reason this commit exist is to allow some
initialization and error handling code to be tested.
2019-09-29 18:56:06 -04:00
Emmanuel Lepage Vallée c4c97174e6
doc: Fix a rendering regression regarding backgrounds. (#2820)
The way background are rendered changed to accomodate issues regarding
cliping and border. However this broke the documentation examples.

This commit fixes this in the least hacky way I found.

Fixes #2727
2019-08-06 22:48:06 -07:00
Uli Schlachter d4cb8dc8b3 wibox.hierarchy:draw: Clear paths after .draw (#2805)
Cairo's save/restore methods handle all properties except for the
current path. The path is just left as-is.

A widget's draw method could create some path without consuming it. This
path would then interfere with random things later which did not expect
a path to already exist.

This commits adds calls to cairo_new_path() in the relevant positions to
clean things up.

This not only applies to a widget's draw method, but also
{before,after}_draw_{child,children}. However, these methods could (for
whatever reason) create paths that are to be consumed in one of the
other methods. To keep this working, the path is only cleared after all
of these methods ran.

I do not expect this commit to break anything, because a widget cannot
really assume much about what widget is drawn after it. Especially so,
because partial redraws could mean that some later widget is skipped and
not redrawn.

This should fix the issue reported at
https://github.com/awesomeWM/awesome/pull/2804.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-07-03 16:55:38 -04:00
Emmanuel Lepage Vallée 0857a8fef8
Merge pull request #2800 from psychon/fix_negative_sizes
Fix negative sizes with the margin container
2019-06-21 17:30:59 -04:00
worron 3295e9f33d imagebox: Better svg support (#2779)
Use rsvg api to render svg image at requested size.
2019-06-21 17:30:10 -04:00
Uli Schlachter a4dadde335 Fix wibox.hierarchy's empty_clip()
This function checks if a given cairo context has an empty clip. It was
written with the assumption that cairo_clip_extents() produces the x, y,
width, height of the clip extents. However, that function actually
produces x1, y1, x2, y2, where (x1, y1) and (x2, y2) are the corners of
the rectangles.

Due to the way the function is written, it will return non-zero numbers
when there is a translation (cr:translate()). Thus, this function worked
basically never.

Fix this by checking if both points have the same X- or Y-coordinate.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-06-19 18:23:08 +02:00
Uli Schlachter 2aa198a57b wibox.widget.base.place_widget_*: Protect against negative sizes
This commits adds assertions to catch negative width or height.

Would-have-helped-with: https://github.com/awesomeWM/awesome/issues/2799
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-06-19 18:20:09 +02:00
Uli Schlachter f025409cd3 wibox.container.margin: Do not produce negative sizes
With draw_empty=false, :fit() can return 0,0. Then, when :layout() is
called, it will compute negative widths and heights. This can then cause
lots of problems later on.

Avoid this by having :layout() return nothing instead of producing
negative sizes.

Fixes: https://github.com/awesomeWM/awesome/issues/2799
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-06-19 18:18:06 +02:00
worron 99e81c097a imagebox: apply shape before scale (#2793) 2019-06-12 19:39:00 -04:00
Emmanuel Lepage Vallee 90a29f92eb doc: Fix all the property, theme and field types. 2019-06-08 18:14:14 -04:00
Emmanuel Lepage Vallee b4ece0f053 doc: Use an explicit tag for all static functions.
This way their name doesn't get mangle by the broken magic. It will also
eventually allow to `error()` in the template when the implicit
`@function` is used.

This commit also fixes a large number of issues found while
proof-reading everything.
2019-06-08 18:14:13 -04:00
Emmanuel Lepage Vallee 11d7a614d9 doc: Add a constructor stereotype for everything.
This forces the constructor functions to be at the top of the API
documentation rather than in a random position.
2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee 63ca0f0d8f doc: Use an explicit @method stereotype for all methods.
ldoc has a magical `@classmod` module type which tries to detect
what is a method and what is a static function. It fails about as
often as it works. This commit makes everything explicit to remove
such issues.

Fixes #2640
Ref #1373
2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee f1dceb02f6 doc: Move all popups to a section. 2019-06-08 18:13:42 -04:00
Emmanuel Lepage Vallee 9d0c2200b2 doc: Add a section for the important classes.
The choice is very subjective, but at least they stand out.
2019-06-08 18:13:28 -04:00
Emmanuel Lepage Vallee 7b00d76673 doc: Move all layouts to a new section. 2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee bb51add089 doc: Move all widgets to a new section. 2019-06-08 17:49:14 -04:00
Emmanuel Lepage Vallee e9d4164851 doc: Move all containers to a new section. 2019-06-08 17:49:14 -04:00
Hùng 755c44ca52 Slider new feature `bar_active_color` and examples
- Fill slider bar with a linear pattern based on current value (if `bar_active_color` and `bar_color` are correctly provided)
- Add examples for the apidoc
2019-04-23 23:13:32 -04:00
Emmanuel Lepage Vallee 8ac1f67237 container.margins: Allow the `margins` property to be a table.
It makes some code easier to write. It is mostly useful when the margins
are exposed through another widget. In that case it avoids having to
proxy 5 different property or re-invent the wheel there.
2019-04-05 21:06:11 -04:00
Emmanuel Lepage Vallee c1596f0b4e background: Deprecate `shape_border_(width|color)`.
In favor of `border_width` and `border_color`.
2019-04-05 21:06:11 -04:00
Emmanuel Lepage Vallee 81ff4d730c background: Always allow a border.
Previously, the border "support" was limited to shapes and would not
move the content by the offset of the border. Borders are now better
supported and thus renamed from `shape_border_width` to `border_width.

In the end, shrinking the widget by the border size is too common to
ignore. It should have been the default all along, just like the clip.
2019-04-05 21:06:11 -04:00
Emmanuel Lepage Vallee 02ed7ceed5 widget.base: Allow widgets constructor in the declarative template.
This avoids the boilerplate of having to do:

    {
        widget = awful.widget.mywidget
    }

in the templates.
2019-04-05 21:06:11 -04:00
Adrian Gabriel 0642d92967 Fixed input_passthrough property not being set (#2723)
* Fixed input_passthrough property not being set

In the table of properties supplied to the `wibox` function, you couldn't set the `input_passthrough` property. You could only set it after the wibox was created like this: `my_shlick_wibox.input_passthrough = true`. This commit fixes that and now you can set it in both ways.
2019-03-12 17:23:53 +01:00
Uli Schlachter 6a463da636 background container: Actually set the foreground color
Commit ba75da7976 worked around a bug in LGI. However, it did so by
just dropping the code that set the foreground color. Instead, it should
have changed the code so that cr:set_source() is only called if the
background container has a foreground color configured instead of "just
always".

Fixes: https://github.com/awesomeWM/awesome/pull/2609#issuecomment-459580395
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-02-01 15:28:29 +01:00
Uli Schlachter 5f2cdabc01 textclock: Produce reproducible output (#2622)
When $SOURCE_DIRECTORY is set, we are most likely currently running the
examples test, i.e. generating images. These images end up in the
documentation.

To make the images reproducable, i.e. independent from the current time,
this commit makes the textclock honor $SOURCE_DATE_EPOCH if
$SOURCE_DIRECTORY is set.

See commit 9d7eaf02 for some more details.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-01-31 20:34:41 +01:00
mergify[bot] cdd6e360f5
Merge pull request #2609 from psychon/shape_outside
Change the way the shape is done in the background container
2019-01-29 18:21:24 +00:00
Uli Schlachter 84eb175ccd background container: Deprecate shape_clip property
The previous commit removed the implementation of this property.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-01-28 14:55:53 +01:00
Uli Schlachter ba75da7976 Work around a bug in LGI
cairo_get_source() is not bound correctly, leading to use-after-free
bugs. Cairo catches this and crashes.

Work around this by preserving the current source in a different way.
Instead of using cairo_get_source() and later cairo_set_source(), this
commit wraps everything that changes the current source between
cairo_save() and cairo_restore(). Thus, cairo saves the current source
for us without us having to grab an explicit reference.

Works-around: https://github.com/pavouk/lgi/issues/210
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-01-27 11:42:51 +01:00
Uli Schlachter 67cf1469f0 Change the way the shape is done in the background container
Previously, the background container "just" used the shape and drew a
line around it. This means that half the line will be inside of the
shape and half of it will be outside. Thus, this hides the actual shape
that is used.

This commit changes that so that the line is added outside of the shape.
It does this via some tricks:

- In :before_draw_children(), :push_group() is used to redirect drawing
  of the child widget to a temporary surface.
- In :after_draw_children(), the border is added to this group.
  + For this, another temporary surface is created. It will be used as a
    mask.
  + The inside of the shape on this mask is cleared, everything else is
    filled. Thus, the mask now contains everything "not content".
  + Everything inside the mask is filled with the background color.
- Also in :after_draw_children(), the group is drawn to the actual
  target surface.
  + Again, this needs a mask.
  + This time, we draw the shape to the mask with twice the border width.
    Thus, half of this line will be outside of the shape.
  + Then, the shape itself is also filled so that the mask contains the
    shape and the border.
  + This mask is then used to copy the right parts of the temporary
    surface were the child widget and border was drawn to the actual
    target surface that will be visible on screen.

This approach has some upsides. Because we no longer have "half the
border" above content, colors with some transparency work fine for the
border. Also, this should avoid issues with anti-aliasing, because e.g.
the border is not just drawn with the border width, but also further out
to everything else so that the background cannot "bleed through".

Fixes: https://github.com/awesomeWM/awesome/issues/2516
Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-01-27 11:42:36 +01:00
Emmanuel Lepage Vallee dbb552097c arcchart: Also compute the sum when the limits are provided.
The result was used even when it wasn't computed.
2019-01-26 12:13:13 -05:00
Emmanuel Lepage Vallee 090f80d173 arcchart: Place the rounded edge in the right side of the arc. 2019-01-26 12:13:13 -05:00
Aire-One a01669693e layout.manual: Implement the `:insert()` method. (#2557)
It was documented but not implemented. It is necessary when the
"Z index" needs to be manually specified.
2019-01-09 00:31:14 -05:00
Emmanuel Lepage Vallée a2cd918603
wibox: Stop monkey-patching the `get_children_by_id` function. (#2513)
Before this commit, it was added by `wibox.widget.base` if
`:setup()` is used. However it doesn't work for the `awful.popup`
because of the extra indirection.

This commit stops the monkey-patching and make sure the function
always exists. This doesn't prevent it from not working and in
the long run this should still be moved into the hierarchy.

However for now it makes the situation a lot more consistent and is a
quick band-aid without too much controversy.

Mitigate #2181
2019-01-01 15:04:47 -05:00
Emmanuel Lepage Vallee 7d6f52c4dc wibox: Add the wibox reference to `find_widgets`
This is necessary to compute the widget real position on screen
because it's the only way to know the border_width offset.
2018-12-24 21:52:30 -05:00
Uli Schlachter c80bf6f46e wibox.layout.flex: Do not leave empty space behind
It is not possible to distribute 100px to three widgets equally. The
current version of wibox.layout.flex tries to do that anyway, by giving
each widget 33px and leaving one pixel outside of any widget. Thus, if
the widgets e.g. have a common background, this leads to a one pixel gap
in the background.

This patch changes the flex layout so that the extra pixel is assigned
to some widget instead. It does so by basically keeping a sum of
space_per_item for the widgets that was assigned so far. This sum is
rounded and when this leads to rounding, the corresponding child widget
gets an extra pixel.

More precisely, this tracks a pos as before. Widgets get their position
still assigned based on rounding pos. However, this now also remembers
this rounded position for the next iteration of the loop. This allows to
assign the size of widgets based on the difference between the current
and last rounded position.

(Possibly) fixes: https://github.com/awesomeWM/awesome/issues/2461
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-11-05 10:13:18 +01:00
Daniel Hahler 3876b18240 doc: Add missing C-object documentation and fix some papercuts.
Ref: https://github.com/awesomeWM/awesome/issues/1373
2018-07-25 18:26:11 -04:00
Alphonse Mariya 405c14496a wibox.layout.flex: remove exit condition (#2252) 2018-04-27 14:06:55 +02:00
Emmanuel Lepage Vallée 5b9180fc1b
Merge pull request #2249 from Aire-One/fix_widget_slider_doc
Fix widget slider doc
2018-04-26 20:46:54 -04:00
Aire-One 7521a861e6 add documentation for signal "property::value" 2018-04-24 00:23:42 +02:00
Jim Garrison 301d5b80c4 Move timezone determination to callback (#2229)
Patch by @psychon.  Fixes #2218.
2018-04-22 02:05:40 -04:00
Emmanuel Lepage Vallée 1182ad0f92
Merge pull request #2153 from otommod/master
Add set/get for textclock attributes
2018-01-22 17:44:03 -05:00
Otto Modinos 3687d198f2 textclock: mimick other widgets for docs/naming 2018-01-21 02:32:26 +02:00
Otto Modinos 1e685635a8 textclock: rename timeout to refresh 2018-01-21 02:06:24 +02:00
Otto Modinos 9d3a9547b1 Add set/get for textclock attributes
To allow "declarative" construction of clocks.
2018-01-21 02:04:12 +02:00
Uli Schlachter a4936c963c Fix 'creating new widgets' link (#2157)
This was broken ever since it was introduced in commit b1e69dba8c.
Yay. :-(

Fixes: https://github.com/awesomeWM/awesome/issues/1373#issuecomment-357891791
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-01-16 21:15:49 -05:00
Emmanuel Lepage Vallée 73b70d34fa
Merge pull request #2122 from Elv13/doc_tests_and_notif_p2_2
wibox: Add an input_passthrough property
2017-11-27 00:36:44 -05:00
Emmanuel Lepage Vallee d99504775b doc: Mutualize the wibar and wibox constructor documentation.
Do it now since the future awful.popup and notification widget
also uses it.

The `load_ldoc.cmake` changes allow to include `.ldoc` blocks in
existing ldoc comments. Previously, it added some extra newlines
and an autogenerated comments saying the content below was imported.
The problem is that this prevented the system to be used for shared
function arguments.

This commit also renames the `wibar` argument table from `arg` to
`args` as the name has to be the same in the `wibox` and `wibar`
constructor for this to work.
2017-11-27 00:22:11 -05:00
Emmanuel Lepage Vallee 4e54aea6a9 wibox: Add an input_passthrough property.
Allows, for example, to have semi translucent wibars on top of
the fullscreens clients without having issues with inputs.
2017-11-27 00:20:42 -05:00
Emmanuel Lepage Vallée b44fd6e35b
Merge pull request #2124 from Elv13/doc_tests_and_notif_p2_4
Add spacing widgets to layouts
2017-11-27 00:18:38 -05:00
Emmanuel Lepage Vallee e12c000b97 layout: Add separator widget support to 3 layouts
The ratio, fixed and flex layout can now display a widget between
each layout elements.

The align layout was left out because it doesn't support spacing
2017-11-24 19:13:59 -05:00
Emmanuel Lepage Vallée 056af3d48d
Merge pull request #2109 from Elv13/revert_dpi_per_screen
screen: Revert the DPI per screen changes.
2017-11-23 23:42:26 -05:00
Emmanuel Lepage Vallee 314e307cd6 textbox: Ensure that the DPI arguments are not nil
Otherwise it fails. This allows better error message to be sent to the
user.
2017-11-23 23:28:32 -05:00
Uli Schlachter 5ef937c07c textclock: Detect failures from g_date_time_format (#2119)
If g_date_time_format() fails, it returns a NULL pointer. This change
makes the textclock detect this and print a warning. This warning
contains 'g_date_time_format()' so that people can ask their favorite
search engine for the supported formats of this function. This warning
also contains the actual format string so that all the information is
available in one place and possible bug reports hopefully include the
format string.

Reference: https://github.com/awesomeWM/awesome/issues/2118
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-11-23 23:27:18 -05:00
Emmanuel Lepage Vallee 33124d8605 widget: Add a separator widget. 2017-11-06 05:19:17 +01:00
Emmanuel Lepage Vallee cedeb2bb5a wibox: Add a `to_widget()` and `save_to_svg()` method.
Take a wibox snapshot as a widget. It also add an helper to save
it to a file. This is useful for debugging when called from
`awesome-client`
2017-10-21 19:34:04 +02:00
Uli Schlachter 1592180c83 textbox: Make some screen arguments optional again (#2057)
Since beautiful.xresources.get_dpi(s) allows nil as argument to query
some "global DPI", the functions to query the size of a textbox also
allowed to use nil as the screen, even though this was never documented
to work. Commit a137655791 broke this by assuming a valid screen
object.

This commit makes a nil argument work again, but will cause a
deprecation warning in awesome 5.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-21 19:32:35 +02:00
Daniel Hahler c362524a5f Merge pull request #2012 from Elv13/doc_tests_and_notif_p1_2
widget: Add a flexible generic constructor
2017-10-21 19:26:49 +02:00
Uli Schlachter a137655791 Add & use a dpi property on screen objects
Once upon a time, beautiful.xresources.get_dpi was added to query
Xft.dpi. That made sense since this queried an xresources property. Over
time, other, non-xresources-based ways to query DPI were added to this
function. Now, it makes no more sense to have this function here.

Also, recently it became possible to add new properties to C objects
from Lua code. Thus, we no longer need to have a get_dpi() function
somewhere, but can add s.dpi directly.

Thus, this commit adds s.dpi and makes everything use it. No functional
changes are intended.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-10-08 12:30:21 +02:00
Uli Schlachter b04b1b27af Add a force_update() method to the textclock (#2034)
Reference: https://github.com/awesomeWM/awesome/issues/344
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-09-10 20:12:25 +02:00
Emmanuel Lepage Vallée fd2307afd0 grid: fix an unavoidable assert (#2017)
`:add()` was called with the optional `...` arguments, but the
function required at least one argument.
2017-08-21 21:10:43 +02:00
Emmanuel Lepage Vallee 7e8f3e9b9b widget: Add a flexible generic constructor
This avoid copy pasting this kind of code in many places.
2017-08-19 22:45:54 -04:00
Uli Schlachter 12bb7f5a9e Improve docs for emit_signal_recursive (#1998)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-16 13:37:14 +02:00
Uli Schlachter 8dfe18a382 Fix wibox to forward shapes directly
When doing w.shape_bounding = foo on a wibox, the code would first read
shape_bounding from the underlying drawin. This would create a
(possibly) huge cairo image surface that just waits to be collected by
the garbage collector, resulting in increased memory usage.

Fix this by checking the force_forward table first. This tables contains
the names of shape properties. Thus, the evaluation of this statement
gets short-circuited and the property is on the drawin is not read.

Helps-with: https://github.com/awesomeWM/awesome/issues/1958
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-08-04 13:10:14 +02:00
Uli Schlachter 07d561ee91 wibox.widget.calendar: Stop using make_widget_declarative
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-07-09 19:00:16 +02:00
Emmanuel Lepage Vallee fb367c3f9e stack: Add offset support 2017-06-26 02:27:20 -04:00
Emmanuel Lepage Vallee 29f70c1b4c mirror: Fix documentation
It didn't render properly
2017-06-26 02:27:20 -04:00
Emmanuel Lepage Vallee 458340b4d4 doc: Add examples for the ratio layout 2017-06-26 02:27:20 -04:00
Emmanuel Lepage Vallee 0430f55257 ratio: Add a fill strategy for empty entries
This allows, for example, to imeplement the tag `master_fill_policy`
and simplify the client layouts by not having to hardcode empty
columns and rows in each layouts.
2017-06-26 02:27:20 -04:00
Emmanuel Lepage Vallée ef1d7d8396 Merge pull request #1647 from Elv13/free_layout
Add a manual (free floating) layout
2017-06-12 19:49:30 -04:00
getzze 5b0abb9541 widget: Add a calendar widget 2017-06-12 02:58:06 -04:00
Emmanuel Lepage Vallee 5d46d47ef7 wibox.layout: Add a `manual` layout.
A layout with manual widget positions. It is still useful as it is
manager by the hierarchy and widget position can be functions.
2017-06-11 01:14:10 -04:00
Uli Schlachter 6de6419180 Add functions to draw widgets to a cairo surface
These are supposed to eventually replace the already-existing functions
in gears.surface which have a similar signature

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-05-30 11:22:07 +02:00
Matt ddf9689767 Add timezone option for textclock widget (#1743)
Adds a third parameter "timezone" to the textclock widget that is
optional. Defaults to local timezone if nil.

Signed-off-by: Matt Harrison <matt@harrison.us.com>
2017-04-21 16:34:23 +02:00
getzze 59662bc971 wibox.widget.base: do not call set_children if children is nil 2017-04-18 15:00:39 +02:00