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

TaskList: Use qtile Img object for all icons #4349

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elParaguayo
Copy link
Member

Doing this makes drawing/scaling the icons easier.

Also fixes issue with vertical positioning of the icon and the text.

Doing this makes drawing/scaling the icons easier.

Also fixes issue with vertical positioning of the icon and the text.
@ezntek
Copy link

ezntek commented Jul 22, 2023

just tested it, its a bit wonky.

Screenshot_2023-07-22_13-42-50
Here's with margin_y=0,

Screenshot_2023-07-22_13-44-35
But here's with margin_y=10.

The icon's size magically changes when the margin_y does, oh and the highlight area (border in qtile jargon iirc) is now off-centered and is not affected by margin x or y.

Screenshot_2023-07-22_13-45-44

i think this may need further fixes.

Relevant config:

widget.TaskList(
            highlight_method="block",
            border="#313244",
            urgent_border="f38ba8",
            margin_x=12,
            margin_y=8,
            padding=3,
            #theme_path="/usr/share/icons/Papirus-dark",
            txt_floating="🗗",
            txt_maximized="🗖",
            txt_minimized="🗕", 
            **DECORATIONS_LR
        ),

@elParaguayo
Copy link
Member Author

Thanks for testing. Will investigate further!

@elParaguayo
Copy link
Member Author

just tested it, its a bit wonky.

Screenshot_2023-07-22_13-42-50 Here's with margin_y=0,

Screenshot_2023-07-22_13-44-35 But here's with margin_y=10.

The icon's size magically changes when the margin_y does

If you don't set the icon_size then the widget calculates the icon size required to match the bar height less any border and margin so changing margin_y should change the icon size in your case.

oh and the highlight area (border in qtile jargon iirc) is now off-centered and is not affected by margin x or y.

Screenshot_2023-07-22_13-45-44

i think this may need further fixes.

Relevant config:

widget.TaskList(
            highlight_method="block",
            border="#313244",
            urgent_border="f38ba8",
            margin_x=12,
            margin_y=8,
            padding=3,
            #theme_path="/usr/share/icons/Papirus-dark",
            txt_floating="🗗",
            txt_maximized="🗖",
            txt_minimized="🗕", 
            **DECORATIONS_LR
        ),

Can you post the DECORATIONS_LR definition please.

@ezntek
Copy link

ezntek commented Jul 22, 2023

Here's the decorations constant (using qtile-extras btw)

DECORATIONS_LR = {
    "decorations": [
        RectDecoration(colour="#11111e", radius=16, filled=True, padding=3),
        #RectDecoration(line_width=3, colour="#cba6f7", padding=3, radius=17),
     ],
    "foreground": "#cdd6f4",
}

@elParaguayo
Copy link
Member Author

In my opinion, text and icons should be centered vertically by default. margin_y should be used for fine tuning up or down.

@github-actions
Copy link

This PR is stale because it has been open 90 days with no activity. Remove the status: stale label or comment, or this will be closed in 30 days.

@elParaguayo
Copy link
Member Author

@ezntek - sorry, forgot about this one. Based on the explanations above, is this one ok to merge or is it still "wonky"?

@ezntek
Copy link

ezntek commented Jan 27, 2024

It's okay, I also forgot about this one. I don't use qtile anymore, and I have no way to see if this still works so I think it is okay to leave it be.

when someone else reports this issue then they can try this fix.

Copy link

This PR is stale because it has been open 90 days with no activity. Remove the status: stale label or comment, or this will be closed in 30 days.

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

Successfully merging this pull request may close these issues.

None yet

2 participants