From 8954fab5b430623e2052753fae20707b878b858c Mon Sep 17 00:00:00 2001 From: bd Date: Sun, 27 Apr 2025 14:33:26 -0400 Subject: Fix styles --- gui/cachewaysselector.cc | 3 +-- gui/gui.ui | 7 ------- gui/resources/styles.qss | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 9 deletions(-) diff --git a/gui/cachewaysselector.cc b/gui/cachewaysselector.cc index f0314e5..14dae6f 100644 --- a/gui/cachewaysselector.cc +++ b/gui/cachewaysselector.cc @@ -32,7 +32,7 @@ CacheWaysSelector::CacheWaysSelector(QWidget *parent) : QWidget(parent) v = new QVBoxLayout(this); for (i = 1; i <= 6; ++i) { - l = new QHBoxLayout(this); + l = new QHBoxLayout; b = new QLabel(QString("L%1 2^").arg(i), this); @@ -46,7 +46,6 @@ CacheWaysSelector::CacheWaysSelector(QWidget *parent) : QWidget(parent) v->addLayout(l); this->sbs.append(sb); } - v->addStretch(); } QList CacheWaysSelector::values() const diff --git a/gui/gui.ui b/gui/gui.ui index c20b3f6..57a7974 100644 --- a/gui/gui.ui +++ b/gui/gui.ui @@ -375,13 +375,6 @@ - - - - QLayout::SizeConstraint::SetMinimumSize - - - diff --git a/gui/resources/styles.qss b/gui/resources/styles.qss index a61035e..758978c 100644 --- a/gui/resources/styles.qss +++ b/gui/resources/styles.qss @@ -4,6 +4,8 @@ color: "#00cc00"; background-color: "#000200"; border: 0px solid "#000200"; + selection-background-color: "#00cc00"; + selection-color: "#000200"; } QStatusBar { @@ -50,6 +52,52 @@ QGroupBox::title { QLabel { } +QSpinBox { + padding-right: 15px; /* make room for the arrows */ + border: none; +} + +QSpinBox::up-button { + color: "#000200"; + background-color: "#00cc00"; + subcontrol-origin: border; + subcontrol-position: top right; /* position at the top right corner */ + + width: 16px; + border: none; + subcontrol-origin: border; +} + +QSpinBox::up-arrow { + width: 7px; + height: 7px; +} + +QSpinBox::up-button:pressed { + color: "#00cc00"; + background-color: "#000200"; +} + +QSpinBox::down-button { + color: "#000200"; + background-color: "#00cc00"; + subcontrol-origin: border; + subcontrol-position: bottom right; /* position at bottom right corner */ + + width: 16px; + border: none; +} + +QSpinBox::down-arrow { + width: 7px; + height: 7px; +} + +QSpinBox::down-button:pressed { + color: "#00cc00"; + background-color: "#000200"; +} + QTableView { border: 0px; selection-background-color: transparent; -- cgit v1.2.3