diff --git a/resources/styles/main.qss b/resources/styles/main.qss index 1b2e497..2ae1fae 100644 --- a/resources/styles/main.qss +++ b/resources/styles/main.qss @@ -739,7 +739,7 @@ QListView { border: 1px solid #2e323b; border-radius: 6px; alternate-background-color: #1a1c20; - selection-background-color: rgba(59, 130, 246, 0.15); + selection-background-color: rgba(59, 130, 246, 160); selection-color: #f0f1f3; gridline-color: #262931; outline: none; @@ -761,13 +761,15 @@ QListView::item:hover { QTableView::item:selected, QTreeView::item:selected, QListView::item:selected { - background-color: rgba(59, 130, 246, 0.4); + background-color: rgba(59, 130, 246, 160); + color: #f0f1f3; } QTableView::item:selected:hover, QTreeView::item:selected:hover, QListView::item:selected:hover { - background-color: rgba(59, 130, 246, 0.45); + background-color: rgba(59, 130, 246, 180); + color: #f0f1f3; } QHeaderView { @@ -1188,5 +1190,6 @@ QListView#LogListView::item:hover { } QListView#LogListView::item:selected { - background-color: rgba(59, 130, 246, 0.4); + background-color: rgba(59, 130, 246, 160); + color: #f0f1f3; } \ No newline at end of file diff --git a/src/ui/CueItemDelegates.cpp b/src/ui/CueItemDelegates.cpp index 3793533..616945a 100644 --- a/src/ui/CueItemDelegates.cpp +++ b/src/ui/CueItemDelegates.cpp @@ -18,13 +18,13 @@ CueNumberDelegate::CueNumberDelegate(CueList* cueList, QObject* parent) void CueNumberDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { - QVariant bgData = index.data(Qt::BackgroundRole); - if (bgData.isValid()) { - painter->fillRect(option.rect, bgData.value()); - } - QStyleOptionViewItem opt = option; + opt.state &= ~QStyle::State_HasFocus; + + QVariant bgData = index.data(Qt::BackgroundRole); if (bgData.isValid()) { + opt.state &= ~QStyle::State_Selected; + painter->fillRect(opt.rect, bgData.value()); opt.backgroundBrush = bgData.value(); } @@ -119,13 +119,13 @@ CueTypeDelegate::CueTypeDelegate(QObject* parent) : QStyledItemDelegate(parent) void CueTypeDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { - QVariant bgData = index.data(Qt::BackgroundRole); - if (bgData.isValid()) { - painter->fillRect(option.rect, bgData.value()); - } - QStyleOptionViewItem opt = option; + opt.state &= ~QStyle::State_HasFocus; + + QVariant bgData = index.data(Qt::BackgroundRole); if (bgData.isValid()) { + opt.state &= ~QStyle::State_Selected; + painter->fillRect(opt.rect, bgData.value()); opt.backgroundBrush = bgData.value(); } @@ -212,13 +212,13 @@ CueTextDelegate::CueTextDelegate(QObject* parent) : QStyledItemDelegate(parent) void CueTextDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { - QVariant bgData = index.data(Qt::BackgroundRole); - if (bgData.isValid()) { - painter->fillRect(option.rect, bgData.value()); - } - QStyleOptionViewItem opt = option; + opt.state &= ~QStyle::State_HasFocus; + + QVariant bgData = index.data(Qt::BackgroundRole); if (bgData.isValid()) { + opt.state &= ~QStyle::State_Selected; + painter->fillRect(opt.rect, bgData.value()); opt.backgroundBrush = bgData.value(); } diff --git a/src/ui/CueTableModel.cpp b/src/ui/CueTableModel.cpp index 8b8f1ba..1c59bef 100644 --- a/src/ui/CueTableModel.cpp +++ b/src/ui/CueTableModel.cpp @@ -66,7 +66,7 @@ QVariant CueTableModel::data(const QModelIndex& index, int role) const { if (role == Qt::BackgroundRole) { if (row == m_currentIndex) { - return QBrush(QColor(34, 197, 94, 160)); + return QBrush(QColor(34, 197, 94, 220)); } }