Commit Graph

322 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallée 8b1f8958b4
Merge pull request #3746 from Elv13/grid_border
Modernize the `wibox.layout.grid` module and add border support.
2024-03-23 22:50:03 -07:00
Emmanuel Lepage Vallée 2eab55e536 Update lib/wibox/container/border.lua
Co-authored-by: Aire-One <aireone@aireone.xyz>
2023-12-31 15:27:21 -08:00
Emmanuel Lepage Vallee e23940cc6a imagebox: Expose the "optimal size" properties.
The `textbox` already has the equivalent. This will soon be used
by the new `wibox.container.border` widget.
2023-12-31 14:54:44 -08:00
Emmanuel Lepage Vallee ab121e9ac0 imagebox: Support a CSS file.
Before, the CSS had to be inline. Now that the border container uses
this code, it makes sense to make it more flexible.
2023-12-31 14:54:44 -08:00
Emmanuel Lepage Vallee 5c9ffb8ef3 imagebox: Expose the private SVG handling function.
To be used by `wibox.container.border`, which is a specialized imagebox.
2023-12-31 14:54:44 -08:00
Emmanuel Lepage Vallee ecc20dd0b8 imagebox: Add 3 new fit policies.
This will be used soon by a nice CSS inspired image slicer
container/layout.

They have a limitation inherited from Cairo of only working on a
single axis. This isn't important for 99% of the use case.
2023-12-31 14:54:42 -08:00
Emmanuel Lepage Vallee eddb83fb72 calendar: Add a border width property. 2023-12-31 00:57:07 -08:00
David Kosorin ed71b17f1b
Fix slider with minimum value (#3807) 2023-08-12 16:59:15 -07:00
Emily 5077c8381b
wibox.widget.slider: Add a handle cursor property (#3734)
* wibox.widget.slider: Add a handle cursor property
* wibox.widget.slider: Add a beautiful variable for handle_cursor
* wibox.widget.slider: Remove an unneeded or statement
* wibox.widget.slider: Move handle_cursor variable to the function it belongs in
2022-10-31 10:05:13 -07:00
Emmanuel Lepage Vallee 88c65a71dd textbox: Rename `align` to `halign`.
`halign` is used in multiple place in the API. Once upon a time,
Awesome only supported horizontal widgets, but this era has long
passed.

Fix #3640
2022-09-06 16:11:04 -07:00
Emmanuel Lepage Vallee d7f6410e09 textbox: Add 3 properties.
The textbox API reflects the Pango layout API circa 2011, time to
bring this to 2022. This adds:

 * indent
 * justify
 * line_spacing_factor

It doesn't add `spacing` because it doesn't seem to do anything.
It also doesn't add the `is_*` methods to know if the text wraps
or ellipsize. We could, but nobody asked for them. The line spacing
is a feature request from Posix on Discord.
2022-09-06 16:09:26 -07:00
Emmanuel Lepage Vallee 82a5fb6030 doc: Do not document the 16bit max widget size.
As pointed out by @aire-one, it does not provide much value.
2022-08-29 22:54:09 -07:00
Emmanuel Lepage Vallee a18b40e12b wibox.widget.textclock: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 1eda8cdf93 wibox.widget.textbox: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 642fa3b66b wibox.widget.systray: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 5367513609 wibox.widget.slider: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 79496e9acc wibox.widget.separator: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee f9f04866b8 wibox.widget.progressbar: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee e63d867523 wibox.widget.piechart: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 95cd45942a wibox.widget.imagebox: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 8e16dc4412 wibox.widget.graph: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee ff9c89d005 wibox.widget.checkbox: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 1b726985de wibox.widget.calendar: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 1259c3ccc6 wibox.widget.base: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 4fa957b75d doc: Force all properties to document their default value. 2022-08-29 22:49:46 -07:00
Emmanuel Lepage Vallee 86d1b1c22c doc: Add a mandatory `@noreturn` for functions and methods.
The goal is to catch cases where the return value exists, but is
forgotten. There was a large enough number of them to turn this
into a real check. Initially, I just wanted to implement it to fix
the problems, then delete the code. But since this is so common, I
think it is worth the annoyance.
2022-08-29 22:49:45 -07:00
Emmanuel Lepage Vallee 4bd90f0f35 doc: Add documentation linting and fix all issues it found. 2022-08-29 22:48:54 -07:00
Emmanuel Lepage Vallee 18468d32dd widget: Fix saving a widget to a file.
Previously, if `beautiful.fg_normal` wasn't black, it would not render
correctly.
2022-08-29 22:48:36 -07:00
Emmanuel Lepage Vallee 75019c3f6f Implement fixes for Luacheck 0.26.1
* Rename or mute parameters starting with _
 * Replace `not (>=)` with `<`
2022-08-28 16:59:14 -07:00
Actionless Loveless 2d6244f944
doc(progressbar): sanitize paddings/margins (#3556) 2022-02-03 13:25:05 +01:00
Xinhao Yuan b49a53f6dd
Multi-row support of systray by taking a beautiful variable specifying the maximum number of rows to fill per column. (#3520)
Also, fix the fitting logic so that the result width and height are fitted in the available space. Previously the result dimensions can be larger than the input, but cropped in e7a21947e6/lib/wibox/widget/base.lua (L547). But still it can cause problems e.g. when used inside wibox.container.place.
2021-12-30 13:22:31 -08:00
Lucas Schwiderski 869e63fcdc
doc(w.w.textbox): Make alignment property descriptions consistent
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-12-14 19:09:42 +01:00
Emmanuel Lepage Vallée 2eb035e125
Merge pull request #3493 from Elv13/progressbar_doc
Improve the progressbar doc with more examples.
2021-11-03 12:40:56 -07:00
Emmanuel Lepage Vallee 76704b33e7 progressbar: Make `ticks` and `bar_shape` compatible with each other.
It looked horrible/buggy when combined. Now it looks like people would
expect it to work. Another problem was the `bar_border_width` look
when `ticks` was `true.
2021-11-02 20:36:07 -07:00
Emmanuel Lepage Vallee 0afb719f82 doc: Improve the progressbar doc.
Another commit in the "lets finish the widget doc" serie.
2021-11-02 20:36:07 -07:00
Emmanuel Lepage Vallee 1fa0204d80 doc: Add many textbox examples. 2021-10-30 22:51:40 -07:00
Emmanuel Lepage Vallée 50b9b10437
texrbox: Fix a recent regression. (#3488)
The intial font wasn't set.
2021-10-28 19:24:49 -07:00
Emmanuel Lepage Vallee bb65181e61 doc: Document the textbox font. 2021-10-27 20:08:15 -07:00
Emmanuel Lepage Vallee c36a869ded textbox: Store the font in `_private`.
So a getter can work.
2021-10-27 13:41:11 -07:00
Emmanuel Lepage Vallée 7b8426bd24 Update lib/wibox/widget/imagebox.lua
Co-authored-by: Aire-One <aireone@aireone.xyz>
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee d8bc791818 imagebox: Add DPI and CSS Stylesheet properties for SVG images.
This exposes the `librsvg` DPI and Stylesheet properties. This
is a groundwork commit to port the xresources theme to use a SVG
wallpaper instead of hardcoded Cairo code to generate the colorfar
logo.
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee ddccddb6dc imagebox: Allow to load SVG data without saving it. 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 5212f0634a imagebox: Add a `downscale` and `upscale` property.
Previously, it was really hard to get the image to do one *or* the
other. The `resize` property set both at the same time.

While it could, this does not deprecate the old `resize` property
since 99% of the user wan't to lock both.
2021-09-24 08:38:13 -07:00
mergify[bot] 7ae6d26363
Merge pull request #3387 from mattplm/master
Stop using fixed row number in calendars
2021-09-07 23:51:38 +00:00
mattplm 97726e8f38 Stop using fixed row number 2021-08-28 23:10:40 +02:00
aflorea-2k 260f6dbe97
doc(wibox.widget.textbox.html): fixed pango links (#3401)
Links to gnome's pango webpage
(https://developer.gnome.org/pango/stable/PangoMarkupFormat.html) were
broken. They now all point to docs.gtk.org .
2021-08-03 20:02:25 +02:00
Lucas Schwiderski c689af64d5
doc(w.w.textbox): Improve ellipsize documentation
The list of possible values was missing one. Additionally, this adds an
example to visualize the available options.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-07-31 15:05:09 +02:00
Lucas Schwiderski 8fab5aa703
doc(w.w.imagebox): Improve various bits
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-07-14 23:17:49 +02:00
Aire-One 53a880454f fix(w.widget): signal typo and unit test
This is a combination of 2 commits.
* fix(w.widget): emit signal typo
* add(w.widget.base_spec): Unit test for setters signals emittion
2021-06-26 17:26:21 +02:00
actionless 2249dc3c81 refactor(menubar, textbox): replace menubar.utils.compute_text_width() with textbox.get_markup_geometry()
feat(menubar): allow setting beautiful.menubar_font

fix(menubar: init: get_current_page): label return value

Update lib/wibox/widget/textbox.lua

Co-authored-by: Lucas Schwiderski <4508454+sclu1034@users.noreply.github.com>

Update lib/wibox/widget/textbox.lua

Co-authored-by: Lucas Schwiderski <4508454+sclu1034@users.noreply.github.com>

revert textbox changes

fix(menubar: init: show): fix font height detection

Update lib/menubar/init.lua

fix(menubar: init: get_current_page): list_spacing depends on presence of icon; also take cursor block width into consideration

fix(menubar: init: label): force icons to be square

fix(menubar: init: get_current_page): also take border_width into consideration when computing available space

merge conflict
2021-05-26 14:18:10 +02:00