Add 1 px margin to QPushButton to prevent text from being cut

https://stackoverflow.com/questions/66637388/is-there-a-way-to-change-the-external-border-of-a-qpushbutton
This commit is contained in:
jcznk 2025-07-13 14:34:38 +02:00 committed by GitHub
parent 3b18097550
commit e57abaf0f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -177,9 +177,13 @@ class CustomStyles:
QPushButton:default {{
border: 1px solid {tm.var(colors.BORDER_FOCUS)};
}}
QPushButton {{
margin: 1px;
}}
QPushButton:focus {{
border: 2px solid {tm.var(colors.BORDER_FOCUS)};
outline: none;
margin: 0px;
}}
QPushButton:hover,
QTabBar::tab:hover,