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

wibox.layout.fixed.horizontal does not respect height of smaller widgets #3782

Open
SystematicError opened this issue Feb 28, 2023 · 1 comment

Comments

@SystematicError
Copy link
Contributor

Output of awesome --version:

awesome v4.3-1588-gb54e50ad (Too long)
 • Compiled against Lua 5.1.4 (running with LuaJIT 2.1.0-beta3)
 • API level: 4
 • D-Bus support: no
 • xcb-errors support: no
 • execinfo support: yes
 • xcb-randr version: 1.6
 • LGI version: 0.9.2
 • Transparency enabled: yes
 • Custom search paths: no

How to reproduce the issue:

local awful = require "awful"
local wibox = require "wibox"

awful.popup {
    widget = {
        {
            text = "Large text",
            font = "Monospace 22",
            widget = wibox.widget.textbox
        },

        {
            wibox.widget.progressbar
            
            height = 5,
            width = 200,
            widget = wibox.container.constraint
        },

        layout = wibox.layout.fixed.horizontal
    },

    visible = true,
    placement = awful.placement.centered
}

Actual result:

image

The docs do mention that the forced_height property may be ignored, but even the constraint widget is not respected by the layout. Even if this is intended the user should have the ability to at the very least control the height of smaller widgets somehow, whether it be through respecting wibox.container.constraints or through some "strategy" algorithm, similar to how wibox.container.align implements it.

Expected result:

The progress bar widget should've only been 5 pixels tall as specified, however it instead is the size of the largest widget.

@kosorin
Copy link
Contributor

kosorin commented Feb 28, 2023

You should place the constraint widget into the place widget and set halign:

{
    widget = wibox.container.place,
    halign = "center",
    {
        wibox.widget.progressbar,
        
        height = 5,
        width = 200,
        widget = wibox.container.constraint
    },
},

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants