mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Work around button margins being too thin on Windows
This commit is contained in:
parent
f9aa232d9b
commit
309c467403
1 changed files with 4 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
# Copyright: Ankitects Pty Ltd and contributors
|
# Copyright: Ankitects Pty Ltd and contributors
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
|
from anki.utils import is_win
|
||||||
from aqt import colors, props
|
from aqt import colors, props
|
||||||
from aqt.theme import ThemeManager
|
from aqt.theme import ThemeManager
|
||||||
|
|
||||||
|
@ -101,8 +102,10 @@ QMenu::indicator {{
|
||||||
|
|
||||||
|
|
||||||
def button_styles(tm: ThemeManager) -> str:
|
def button_styles(tm: ThemeManager) -> str:
|
||||||
|
# For some reason, Windows needs a larger padding to look the same
|
||||||
|
button_pad = 25 if is_win else 15
|
||||||
return f"""
|
return f"""
|
||||||
QPushButton {{ padding-left: 15px; padding-right: 15px; }}
|
QPushButton {{ padding-left: {button_pad}px; padding-right: {button_pad}px; }}
|
||||||
QPushButton,
|
QPushButton,
|
||||||
QTabBar::tab:!selected,
|
QTabBar::tab:!selected,
|
||||||
QComboBox:!editable,
|
QComboBox:!editable,
|
||||||
|
|
Loading…
Reference in a new issue