Use the theme color for the selected encoder

This commit is contained in:
Guillaume Meunier
2024-10-13 13:09:26 +02:00
parent c0c83d36ed
commit a0792de58a
+3 -1
View File
@@ -441,9 +441,11 @@ void settings::load_settings()
selected_rectangle_changed(0); selected_rectangle_changed(0);
ui->partitionner->set_paint([&](QPainter & painter, QRect rect, const QVariant & data, int index, bool selected) { ui->partitionner->set_paint([&](QPainter & painter, QRect rect, const QVariant & data, int index, bool selected) {
QPalette palette = QApplication::palette();
if (selected) if (selected)
{ {
painter.fillRect(rect.adjusted(1, 1, 0, 0), QColorConstants::Cyan); painter.fillRect(rect.adjusted(1, 1, 0, 0), palette.color(QPalette::Highlight));
} }
auto [encoder_id, codec_id] = data.value<std::pair<int, int>>(); auto [encoder_id, codec_id] = data.value<std::pair<int, int>>();