Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jcznk
Copy link
Contributor

@jcznk jcznk commented Jul 13, 2025

Closes #4183

Took inspiration from: https://stackoverflow.com/questions/66637388/is-there-a-way-to-change-the-external-border-of-a-qpushbutton

This trick should prevent border growth on QPushButtons on focus and hover from shrinking the space available for the button’s label. Previously, this could cause text (such as Yes in confirmation dialogs) to be clipped on the left and right.

Before:
image

After:
image

@abdnh abdnh merged commit 4604bc7 into ankitects:main Jul 13, 2025
1 check passed
@user1823
Copy link
Contributor

user1823 commented Sep 6, 2025

@jcznk, thank you for the fix. I think that this change has largely fixed the issue. But, I still noticed some clipping.

In the choose deck window opened from the Add note window in Anki 25.09,
Before hover:
image

On hover: (The screenshot tool didn't capture the mouse pointer)
image

It would be great if you could fix this too.

@jcznk
Copy link
Contributor Author

jcznk commented Sep 6, 2025

@user1823 Thanks for the report! I could also reproduce this. I pushed a fix: #4323

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

Successfully merging this pull request may close these issues.

Text is partly cut in QPushButton:focus

3 participants