From 1e033aadca892a4c50937c648905bda4a6198bd2 Mon Sep 17 00:00:00 2001 From: Clayton Groeneveld Date: Mon, 12 Aug 2019 23:42:44 -0500 Subject: [PATCH] UI: Fix look of extra panels trash icon --- UI/data/themes/Acri.qss | 13 +++++++++++++ UI/data/themes/Dark.qss | 12 ++++++++++++ UI/data/themes/Rachni.qss | 12 ++++++++++++ UI/window-extra-browsers.cpp | 10 ++++------ 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/UI/data/themes/Acri.qss b/UI/data/themes/Acri.qss index e98cd8b3d..6d7c4928f 100644 --- a/UI/data/themes/Acri.qss +++ b/UI/data/themes/Acri.qss @@ -1002,3 +1002,16 @@ VisibilityCheckBox::indicator:unchecked:hover { * [themeID="revertIcon"] { qproperty-icon: url(./Dark/revert.svg); } + +QPushButton#extraPanelDelete { + background: transparent; + border: none; +} + +QPushButton#extraPanelDelete:hover { + background-color: #2a3a75; +} + +QPushButton#extraPanelDelete:pressed { + background-color: #161f41; +} diff --git a/UI/data/themes/Dark.qss b/UI/data/themes/Dark.qss index b4a0ca4af..15a432140 100644 --- a/UI/data/themes/Dark.qss +++ b/UI/data/themes/Dark.qss @@ -737,3 +737,15 @@ VisibilityCheckBox::indicator:unchecked { * [themeID="revertIcon"] { qproperty-icon: url(./Dark/revert.svg); } + +QPushButton#extraPanelDelete { + background-color: rgb(31, 30, 31); +} + +QPushButton#extraPanelDelete:hover { + background-color: rgb(122,121,122); +} + +QPushButton#extraPanelDelete:pressed { + background-color: rgb(31,30,31); +} diff --git a/UI/data/themes/Rachni.qss b/UI/data/themes/Rachni.qss index b227654fe..7167bbc72 100644 --- a/UI/data/themes/Rachni.qss +++ b/UI/data/themes/Rachni.qss @@ -1328,3 +1328,15 @@ VisibilityCheckBox::indicator:unchecked:hover { * [themeID="revertIcon"] { qproperty-icon: url(./Dark/revert.svg); } + +QPushButton#extraPanelDelete { + background-color: rgb(35, 38, 41); +} + +QPushButton#extraPanelDelete:hover { + background-color: rgba(145, 76, 103); +} + +QPushButton#extraPanelDelete:pressed { + background-color: rgb(240, 98, 146); +} diff --git a/UI/window-extra-browsers.cpp b/UI/window-extra-browsers.cpp index c1e6f8e4a..16cf38256 100644 --- a/UI/window-extra-browsers.cpp +++ b/UI/window-extra-browsers.cpp @@ -150,20 +150,18 @@ void ExtraBrowsersModel::AddDeleteButton(int idx) { QTableView *widget = reinterpret_cast(parent()); - QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding, - QSizePolicy::PushButton); - policy.setWidthForHeight(true); - QModelIndex index = createIndex(idx, (int)Column::Delete, nullptr); QPushButton *del = new DelButton(index); del->setProperty("themeID", "trashIcon"); - del->setSizePolicy(policy); - del->setFlat(true); + del->setObjectName("extraPanelDelete"); + del->setFixedSize(QSize(20, 20)); connect(del, &QPushButton::clicked, this, &ExtraBrowsersModel::DeleteItem); widget->setIndexWidget(index, del); + widget->setRowHeight(idx, 20); + widget->setColumnWidth(idx, 20); } void ExtraBrowsersModel::CheckToAdd()