Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize the wibox.layout.grid module and add border support. #3746

Merged
merged 6 commits into from
Mar 24, 2024

Commits on Dec 31, 2023

  1. tests: The grid layout has no padding property.

    Looks like a rebase leftover from an earlier iteration of the code.
    Elv13 committed Dec 31, 2023
    Configuration menu
    Copy the full SHA
    3beb218 View commit details
    Browse the repository at this point in the history
  2. grid: Add the ability to specify the properties inline.

    This is already used in the `wibox.layout.manual` layout. It makes
    the widget easier to use. Previously, using the imperative syntax
    was necessary for most grids.
    Elv13 committed Dec 31, 2023
    Configuration menu
    Copy the full SHA
    2d5c4b6 View commit details
    Browse the repository at this point in the history
  3. grid: Add border support.

    This is long overdue. A bit of historical context. The grid API
    is losely somewhat based on the old `radical` module, but was
    heavily improved by @getzze. That version had row_span and col_span.
    
    This made the way the previous implementation coded the border
    incompatible. I spent some time back then trying to bolt it back on,
    but the complexity is quite high and never made it work right.
    
    This commit goes in another direction. Rather than draw the border,
    it creates a mask where the border should *not* be, then bucket fill
    the widget. This is the equivalent of CSS `border-collapse`.
    
    It also support custom borders. This allows dashed lines and partial
    borders.
    
    The main use case will be to add border support to the calendar. It
    was previously possible to partially do it using custom cell painters,
    but was pretty hacky. Now that the calendar will deprecate the custom
    painters in favor of `widget_template`s, a more robust alternative was
    required.
    
    The drawback of this commit is obviously the added complexity to the
    most complex layout. This is why it adds many tests to cover the various
    corner cases.
    Elv13 committed Dec 31, 2023
    Configuration menu
    Copy the full SHA
    f8f5e2c View commit details
    Browse the repository at this point in the history
  4. grid: Apply Awesome v4.2 naming conventions.

    * Stop using top level properties for vertical/horizontal
    * No abbreviations
    * Use height/width instead of size
    * Don't use methods where properties can be used
    Elv13 committed Dec 31, 2023
    Configuration menu
    Copy the full SHA
    956bd96 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    de7f3bf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    eddb83f View commit details
    Browse the repository at this point in the history