Commit Graph

546 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 78b8756068 place: Split internal logic to be reusable.
This will become the base class of a new "tile" container.

I also fixed a bug which could cause the output to be blurry for
some widget sizes.
2021-04-24 23:28:18 -07:00
Emmanuel Lepage Vallee 6a4e555ae1 slider: Fix an aliasing issue.
There was a bunch of `math.floor` missing. Some slider size were blurry.
2021-04-24 23:28:18 -07:00
Aire-One 6226742f72 doc(wibox.widget.textclock): Widget definition. 2021-04-07 01:38:53 -07:00
Aire-One b184f95195 doc(layout.flex): Hide `fill_space` property doc
Add an explicite `@property` tag to the `wibox.layout.flex` doc
comments to override the `fill_space` property from
`wibox.layout.fixed` and mark it as hidden thanks to `@hidden`.
2021-04-02 20:02:39 +02:00
Emmanuel Lepage Vallee 90c4c60d2a Add more @supermodule and @hidden 2021-04-02 19:24:07 +02:00
Aire-One 0ae0add45f doc(imagebox): Fix @method tags 2021-04-02 19:24:07 +02:00
Aire-One b706aa9bd0 doc(@hidden): Add to wibox.widget.base module 2021-04-02 19:24:07 +02:00
Aire-One 3969ad8819 doc(@supermodule): Add to wibox.layout modules 2021-04-02 19:24:07 +02:00
Aire-One 3b12a8d19a doc(@supermodule): Add to wibox.container modules 2021-04-02 19:24:07 +02:00
Aire-One 3ed2fc8500 doc(@supermodule): Add to wibox.widget modules 2021-04-02 19:24:07 +02:00
Aire-One 12662d4cb1 doc(@supermodule): wibox.widget.base doc 2021-04-02 19:24:07 +02:00
Emmanuel Lepage Vallée 13e8408562
Merge pull request #3284 from sclu1034/issue/3213
Fix composite widgets with top level container
2021-03-28 16:00:16 -07:00
Emmanuel Lepage Vallee c48e138b01 doc: Add examples for the graph. 2021-03-28 02:37:25 -07:00
Lucas Schwiderski 7bc3ec4c35
Fix composite widgets with top level container
When wrapping container widgets to create reusable composite widgets,
`drill` will be called twice on the same widget definition. The first
call happens within the wrapping function and applies the children
widgets fine. The second call happens when the composite widget is used,
but since there are no children widgets defined, the call to
`set_children` sets the existing child to `nil` instead.

Fixes #3213.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-03-11 12:32:28 +01:00
Lucas Schwiderski ad1a28ced2
Remove unused first parameter in some constructors
Fixes #3214.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-03-08 20:09:41 +01:00
Unai 538586c170
textbox: print traceback on error (#3205) 2020-11-01 16:12:42 -08:00
Uli Schlachter f1871873aa Fix setters/getters for grid layout direction properties
Wow. This code was so weirdly broken, I have no words.

Fixes: https://github.com/awesomeWM/awesome/issues/3198
Signed-off-by: Uli Schlachter <psychon@znc.in>
2020-10-10 17:32:04 +02:00
PlayerNameHere 45cfbe72bf Add getters for wibox.layout.stack offset properties
Getters for the horizontal_offset and vertical_offset properties
were missing, which resulted in nil when trying to get them.
2020-09-28 00:00:08 +08:00
PlayerNameHere 2647e1c855 Fix emitted signals in wibox.layout.stack:set_horizontal_offset() 2020-09-27 23:58:22 +08:00
PlayerNameHere 13e41a2a7b Fix wibox.layout.stack:raise()
There seem to be two issues here. First, the if-statement at the
beginning of the function will return prematurely if
`self._private.widgets[index]` exists. There seems to be a
missing `not` there.
Second, index 1 is interpreted as the top of the stack (although the
documentation says otherwise), but the widget is inserted at the end of
`self._private.widgets`, so it gets pushed to the bottom
instead of the top.
2020-09-27 16:02:17 +08:00
James Reed e2b00c71e7
Fix adjust misspelling
Co-authored-by: Aire-One <Aire-One@users.noreply.github.com>
2020-07-31 17:33:12 -06:00
Unai Fernández 654a3216e2 fix wibox declarative opacity 2020-04-26 17:36:36 +02:00
Rob Hoelz 1637e03dad Fix broken link to Pango markup documentation 2020-03-12 21:19:22 -05:00
Emmanuel Lepage Vallee c220bcce87 widget: Enable properties by default for API level 5. 2020-02-29 19:47:36 -05:00
Emmanuel Lepage Vallee 4c5fd3f222 widget: Fix set_buttons on widgets where properties are disabled.
Fix #3008
2020-02-29 19:47:36 -05:00
Uli Schlachter 225bb8a8c6 Consider icon spacing in systray:draw()
When less space is available than was asked, systray:draw() has to
compute the right base size so that all the icons fit into the available
space. This computation so far ignored the icon spacing, resulting in a
too large base size.

Fixes: https://github.com/awesomeWM/awesome/issues/2981
Signed-off-by: Uli Schlachter <psychon@znc.in>
2020-02-13 12:11:41 -05:00
Emmanuel Lepage Vallee 68a6c978f5 doc: Document that wibox have class-level signals. 2020-02-02 21:07:07 -05:00
Emmanuel Lepage Vallee 0c08bb4304 widget: Add class-level signal forwarding.
Just like clients and other CAPI classes, it is now possible to
connect to all instance signals. There was already a couple of
`request::geometry`, but no way to forward them, so it was
de-facto broken.
2020-02-02 21:06:19 -05:00
Emmanuel Lepage Vallee 5891783ba9 wibox: Do not overwrite `gears.object` methods.
The next commit will all class level signals. The current design
is used in widgets, but is a bad fit for wiboxes. They should
behave more like client. In v5, setting methods on `wibox` directly
will be deprecated. `wibox.object` is already supported. I don't
think anyone really do that anyway and isn't documented.
2020-02-02 21:06:16 -05:00
Emmanuel Lepage-Vallee 575b0f12dc doc: Remove all type aliases.
They render poorly and serve no purpose.

    #!/bin/bash
    for FILE in $(git ls-files | grep -E "\.(h|c|lua)" | grep -v tests | grep -v spec); do
        sed -i 's/^[ ]*--*[ ]*@client /-- @tparam client /g' $FILE
    done
2020-01-19 20:30:06 -05:00
Emmanuel Lepage Vallee 04c757322c client: Turn `rc.lua` logic into a new `request::border` signal.
The default `rc.lua` was using the focus/unfocus signals to set
the border color along with `awful.rules`. This logic block was
no longer aligned with the rest of `rc.lua` since it was
the only place where `beautiful` variables where only used by
`rc.lua`.

On top of this, the new request handler also has extra contexts
for the urgent and floating/maximixed use cases. So it can be used
by themes to implement much smarter borders than just focus based
ones. They were previously limited by the fact most of the
(un-monkey-patchable) logic was in `rc.lua`.

Note that this commit also shuffle the awful.rules order between
the titlebar and the border and changes the tests accordignly.
After some consideration, I came to the conclusion the previous
behavior was bogus and the fact that the placement tests required
to know about the titlebar height is simply a proof of that. The
change was required in this commit because since the border is no
longer in the default rules, a new buggy edge case surfaced.
2020-01-11 15:43:11 -08:00
Emmanuel Lepage Vallée b8c83fdf9c
Merge pull request #2949 from Elv13/more_trivial_doc
More trivial doc fixes
2019-12-28 12:29:19 -08:00
erik-f 56f2fcfccc
wibox.container.margin: Allow nonnegative dimensions
Commit f025409 avoided negative dimensions but 
also stopped allowing width and height to be zero.

For widgets like awful.widget.watch it is reasonable 
to allow dimensions to be zero because in many cases when 
the margin container is being calculated the watch widget is 
still computing and therefore has width and height zero.
2019-12-27 12:36:54 +01:00
Emmanuel Lepage-Vallee 3c26ccc424 doc: Port the `wibox` module to the new doc format. 2019-12-21 13:25:25 -08:00
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