Match native Qt+Fusion sizing across themed widgets (~23px uniform toolbar row), drop score +/- buttons, force score/page spinbox height to match

This commit is contained in:
pax 2026-04-07 15:42:36 -05:00
parent 81ce926c88
commit d501ccf69a
17 changed files with 105 additions and 111 deletions

View File

@ -403,26 +403,22 @@ class BooruApp(QMainWindow):
self._rating_combo.currentTextChanged.connect(self._on_rating_changed) self._rating_combo.currentTextChanged.connect(self._on_rating_changed)
top.addWidget(self._rating_combo) top.addWidget(self._rating_combo)
# Score filter # Score filter — type the value directly. Spinbox arrows hidden
# since the field is small enough to type into and the +/- buttons
# were just visual noise. setFixedHeight(23) overrides Qt's
# QSpinBox sizeHint which still reserves vertical space for the
# arrow buttons internally even when `setButtonSymbols(NoButtons)`
# is set, leaving the spinbox 3px taller than the surrounding
# combos/inputs/buttons in the top toolbar (26 vs 23).
score_label = QLabel("Score≥") score_label = QLabel("Score≥")
top.addWidget(score_label) top.addWidget(score_label)
self._score_spin = QSpinBox() self._score_spin = QSpinBox()
self._score_spin.setRange(0, 99999) self._score_spin.setRange(0, 99999)
self._score_spin.setValue(0) self._score_spin.setValue(0)
self._score_spin.setFixedWidth(50) self._score_spin.setFixedWidth(50)
self._score_spin.setFixedHeight(23)
self._score_spin.setButtonSymbols(QSpinBox.ButtonSymbols.NoButtons) self._score_spin.setButtonSymbols(QSpinBox.ButtonSymbols.NoButtons)
top.addWidget(self._score_spin) top.addWidget(self._score_spin)
_btn_style = "padding: 4px 6px;"
score_down = QPushButton("-")
score_down.setFixedWidth(25)
score_down.setStyleSheet(_btn_style)
score_down.clicked.connect(lambda: self._score_spin.setValue(max(0, self._score_spin.value() - 1)))
top.addWidget(score_down)
score_up = QPushButton("+")
score_up.setFixedWidth(25)
score_up.setStyleSheet(_btn_style)
score_up.clicked.connect(lambda: self._score_spin.setValue(self._score_spin.value() + 1))
top.addWidget(score_up)
self._media_filter = QComboBox() self._media_filter = QComboBox()
self._media_filter.addItems(["All", "Animated", "Video", "GIF", "Audio"]) self._media_filter.addItems(["All", "Animated", "Video", "GIF", "Audio"])
@ -436,6 +432,7 @@ class BooruApp(QMainWindow):
self._page_spin.setRange(1, 99999) self._page_spin.setRange(1, 99999)
self._page_spin.setValue(1) self._page_spin.setValue(1)
self._page_spin.setFixedWidth(50) self._page_spin.setFixedWidth(50)
self._page_spin.setFixedHeight(23) # match the surrounding 23px row
self._page_spin.setButtonSymbols(QSpinBox.ButtonSymbols.NoButtons) self._page_spin.setButtonSymbols(QSpinBox.ButtonSymbols.NoButtons)
top.addWidget(self._page_spin) top.addWidget(self._page_spin)

View File

@ -58,14 +58,13 @@ class BookmarksView(QWidget):
top = QHBoxLayout() top = QHBoxLayout()
top.setContentsMargins(0, 0, 4, 0) top.setContentsMargins(0, 0, 4, 0)
# Compact button padding matches the rest of the app's narrow # Compact horizontal padding matches the rest of the app's narrow
# toolbar buttons (search bar score field, settings spinbox +/-, # toolbar buttons. Vertical padding (2px) and min-height (inherited
# preview toolbar). The bundled themes' default `padding: 5px 12px` # from the global QPushButton rule = 16px) give a total height of
# is too wide for short labels in fixed-width slots. # 22px, lining up with the bundled themes' inputs/combos so the
# min-height 22px gives a total height of 30px (22 + 3+3 padding + # whole toolbar row sits at one consistent height — and matches
# 1+1 border), matching the inputs/combos in the same row so the # what native Qt+Fusion produces with no QSS at all.
# whole toolbar lines up at one consistent height. _btn_style = "padding: 2px 6px;"
_btn_style = "padding: 3px 6px; min-height: 22px;"
self._folder_combo = QComboBox() self._folder_combo = QComboBox()
self._folder_combo.setMinimumWidth(120) self._folder_combo.setMinimumWidth(120)

View File

@ -63,13 +63,11 @@ class LibraryView(QWidget):
top = QHBoxLayout() top = QHBoxLayout()
top.setContentsMargins(0, 0, 4, 0) top.setContentsMargins(0, 0, 4, 0)
# Compact button padding matches the rest of the app's narrow # Compact horizontal padding matches the rest of the app's narrow
# toolbar buttons. Bundled themes' default `padding: 5px 12px` # toolbar buttons. Vertical padding (2px) + global min-height
# is too wide for short labels in fixed-width slots. # (16px) gives a 22px total height — lines up with the inputs/
# min-height 22px gives a total height of 30px (22 + 3+3 padding + # combos in the same row.
# 1+1 border), matching the inputs/combos in the same row so the _btn_style = "padding: 2px 6px;"
# whole toolbar lines up at one consistent height.
_btn_style = "padding: 3px 6px; min-height: 22px;"
self._folder_combo = QComboBox() self._folder_combo = QComboBox()
self._folder_combo.setMinimumWidth(140) self._folder_combo.setMinimumWidth(140)

View File

@ -83,7 +83,7 @@ class FullscreenPreview(QMainWindow):
# Same compact-padding override as the embedded preview toolbar — # Same compact-padding override as the embedded preview toolbar —
# bundled themes' default `padding: 5px 12px` is too wide for these # bundled themes' default `padding: 5px 12px` is too wide for these
# short labels in narrow fixed slots. # short labels in narrow fixed slots.
_tb_btn_style = "padding: 3px 6px;" _tb_btn_style = "padding: 2px 6px;"
self._bookmark_btn = QPushButton("Bookmark") self._bookmark_btn = QPushButton("Bookmark")
self._bookmark_btn.setMaximumWidth(90) self._bookmark_btn.setMaximumWidth(90)
@ -961,7 +961,7 @@ class VideoPlayer(QWidget):
# bottom controls bar reads as part of the same panel rather than # bottom controls bar reads as part of the same panel rather than
# as a stamped-in overlay. Bundled themes' default `padding: 5px 12px` # as a stamped-in overlay. Bundled themes' default `padding: 5px 12px`
# is too wide for short labels in narrow button slots. # is too wide for short labels in narrow button slots.
_ctrl_btn_style = "padding: 3px 6px;" _ctrl_btn_style = "padding: 2px 6px;"
self._play_btn = QPushButton("Play") self._play_btn = QPushButton("Play")
self._play_btn.setMaximumWidth(65) self._play_btn.setMaximumWidth(65)
@ -1321,7 +1321,7 @@ class ImagePreview(QWidget):
# Unsave, BL Tag, BL Post, Popout) fit cleanly under any theme. # Unsave, BL Tag, BL Post, Popout) fit cleanly under any theme.
# Same pattern as the search-bar score buttons in app.py and the # Same pattern as the search-bar score buttons in app.py and the
# settings dialog spinbox +/- buttons. # settings dialog spinbox +/- buttons.
_tb_btn_style = "padding: 3px 6px;" _tb_btn_style = "padding: 2px 6px;"
self._bookmark_btn = QPushButton("Bookmark") self._bookmark_btn = QPushButton("Bookmark")
self._bookmark_btn.setFixedWidth(100) self._bookmark_btn.setFixedWidth(100)

View File

@ -90,20 +90,20 @@ class SettingsDialog(QDialog):
# absolute minimum bounds), which causes the spinbox value text to # absolute minimum bounds), which causes the spinbox value text to
# vertically clip. setMinimumHeight is a Python-side floor that # vertically clip. setMinimumHeight is a Python-side floor that
# propagates up the layout chain — the dialog's own min size grows # propagates up the layout chain — the dialog's own min size grows
# to accommodate it instead of squeezing the contents. 32px gives # to accommodate it instead of squeezing the contents. 24px gives
# comfortable headroom for the 13px font + padding/border on every # a couple of extra pixels of headroom over the 22px native button
# tested DPI/scale combo (smoke-tested at 1x and 1.5x). # height for the 13px font, comfortable on every tested DPI/scale.
spinbox.setMinimumHeight(32) spinbox.setMinimumHeight(24)
container = QWidget() container = QWidget()
h = QHBoxLayout(container) h = QHBoxLayout(container)
h.setContentsMargins(0, 0, 0, 0) h.setContentsMargins(0, 0, 0, 0)
h.setSpacing(2) h.setSpacing(2)
h.addWidget(spinbox, 1) h.addWidget(spinbox, 1)
# Inline padding override mirrors the search-bar score field at # Inline padding override matches the rest of the app's narrow
# app.py:370 — without it, the bundled themes' QPushButton padding # toolbar buttons. The new bundled themes use `padding: 2px 8px`
# of `5px 12px` leaves no horizontal room for the +/- glyph and # globally, but `2px 6px` here gives the +/- glyph a touch more
# the buttons render empty under custom.qss. # room to breathe in a 25px-wide button.
_btn_style = "padding: 4px 6px;" _btn_style = "padding: 2px 6px;"
minus = QPushButton("-") minus = QPushButton("-")
minus.setFixedWidth(25) minus.setFixedWidth(25)
minus.setStyleSheet(_btn_style) minus.setStyleSheet(_btn_style)

View File

@ -60,8 +60,8 @@ QPushButton {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -114,12 +114,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -145,8 +145,8 @@ QComboBox {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};

View File

@ -59,8 +59,8 @@ QPushButton {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -111,12 +111,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -141,8 +141,8 @@ QComboBox {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};

View File

@ -60,8 +60,8 @@ QPushButton {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -114,12 +114,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -145,8 +145,8 @@ QComboBox {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};

View File

@ -59,8 +59,8 @@ QPushButton {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -111,12 +111,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -141,8 +141,8 @@ QComboBox {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};

View File

@ -60,8 +60,8 @@ QPushButton {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -114,12 +114,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -145,8 +145,8 @@ QComboBox {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};

View File

@ -59,8 +59,8 @@ QPushButton {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -111,12 +111,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -141,8 +141,8 @@ QComboBox {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};

View File

@ -60,8 +60,8 @@ QPushButton {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -114,12 +114,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -145,8 +145,8 @@ QComboBox {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};

View File

@ -59,8 +59,8 @@ QPushButton {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -111,12 +111,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -141,8 +141,8 @@ QComboBox {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};

View File

@ -60,8 +60,8 @@ QPushButton {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -114,12 +114,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -145,8 +145,8 @@ QComboBox {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};

View File

@ -59,8 +59,8 @@ QPushButton {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -111,12 +111,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -141,8 +141,8 @@ QComboBox {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};

View File

@ -60,8 +60,8 @@ QPushButton {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -114,12 +114,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -145,8 +145,8 @@ QComboBox {
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
border-radius: 4px; border-radius: 4px;
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};

View File

@ -59,8 +59,8 @@ QPushButton {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 5px 12px; padding: 2px 8px;
min-height: 18px; min-height: 17px;
} }
QPushButton:hover { QPushButton:hover {
background-color: ${bg_hover}; background-color: ${bg_hover};
@ -111,12 +111,12 @@ QLineEdit, QSpinBox, QDoubleSpinBox, QTextEdit, QPlainTextEdit {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
/* min-height ensures the painted text fits inside the widget bounds /* min-height ensures the painted text fits inside the widget bounds
* even when a parent layout (e.g. QFormLayout inside a QGroupBox) * even when a parent layout (e.g. QFormLayout inside a QGroupBox)
* compresses the natural sizeHint. Without this, spinboxes in dense * compresses the natural sizeHint. Without this, spinboxes in dense
* forms render with the top of the value text clipped. */ * forms render with the top of the value text clipped. */
min-height: 20px; min-height: 16px;
selection-background-color: ${accent}; selection-background-color: ${accent};
selection-color: ${accent_text}; selection-color: ${accent_text};
} }
@ -141,8 +141,8 @@ QComboBox {
background-color: ${bg_subtle}; background-color: ${bg_subtle};
color: ${text}; color: ${text};
border: 1px solid ${border_strong}; border: 1px solid ${border_strong};
padding: 4px 8px; padding: 2px 6px;
min-height: 20px; min-height: 16px;
} }
QComboBox:hover { QComboBox:hover {
border-color: ${accent}; border-color: ${accent};