qtile / qtile

:cookie: A full-featured, hackable tiling window manager written and configured in Python (X11 + Wayland)
http://qtile.org
MIT License
4.8k stars 701 forks source link

Dropdown not centering on screen despite dimensions #4986

Closed Shringe closed 1 month ago

Shringe commented 2 months ago

Issue description

I want to set a "maximized" dropdown. Whenever I set the dimensions accordingly, the dropdown is a couple pixels to the bottom right of where it should be, leaving a small gap in the upper left, and hanging slightly off the screen on the bottom right. scratchpad_off_center The bottom and right borders being off-screen is the easiest way to see this effect.

This seems to happen to all dropdowns actually, but it is most noticeable here.

Version

0.28.2.dev0+gf1ed49bc.d20240813

Backend

X11 (default)

Config

groups: list = [
    Group("1", layouts=[primary_layout]),
    Group(
        "2",
        layouts=[VerticalTile],
        matches=[Match(wm_class="strawberry"), Match(wm_class="tidal-hifi")],
    ),
    Group("3", layouts=[primary_layout]),
    Group("4", layouts=[primary_layout]),
    Group("5", layouts=[primary_layout]),
    Group("6", layouts=[primary_layout]),
    Group("7", layouts=[primary_layout]),
    Group("8", layouts=[primary_layout]),
    Group("9", layouts=[primary_layout]),
    ScratchPad(
        "0",
        [
            DropDown(
                "khal",
                format_tui("ikhal", apps.terminal),
                opacity=1,
                x=0.7,
                y=0.0,
                width=0.3,
                height=1,
            ),
            # FULLSCREEN DROPDOWN HERE
            DropDown(
                "music",
                format_tui(apps.music_player, apps.terminal),
                opacity=0.6,
                x=0.0,
                y=0.0,
                width=1,
                height=1,
            ),
            DropDown(
                "terminal",
                apps.terminal,
                x=0.25,
                y=0.15,
                width=0.5,
                height=0.7,
            ),
        ],
    ),
]

Logs

No response

Required

elParaguayo commented 2 months ago

I wonder if this is to do with the border widths. I'll take a look later.

elParaguayo commented 1 month ago

Found the problem. Will work on a fix when I can.

EDIT: Done. Please test #5011