diff options
author | bd <bdunahu@operationnull.com> | 2025-04-27 14:33:26 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-04-27 14:33:26 -0400 |
commit | 8954fab5b430623e2052753fae20707b878b858c (patch) | |
tree | a0ed1d6b49e76c27f417c39e90b87e54c8cc1c5d | |
parent | ad0557059bb83da52e1a5bd7ea608a29a4ab6346 (diff) |
Fix styles
-rw-r--r-- | gui/cachewaysselector.cc | 3 | ||||
-rw-r--r-- | gui/gui.ui | 7 | ||||
-rw-r--r-- | 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<int> CacheWaysSelector::values() const @@ -376,13 +376,6 @@ </widget> </item> <item> - <layout class="QHBoxLayout" name="cache_controls"> - <property name="sizeConstraint"> - <enum>QLayout::SizeConstraint::SetMinimumSize</enum> - </property> - </layout> - </item> - <item> <widget class="QLabel" name="label"> <property name="text"> <string>Ways Selector (powers of 2)</string> 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; |