diff --git a/Unicodia/FmMain.cpp b/Unicodia/FmMain.cpp index e48e53436..3a2e0be15 100644 --- a/Unicodia/FmMain.cpp +++ b/Unicodia/FmMain.cpp @@ -399,9 +399,12 @@ void VirtualCharsModel::paintItem( if (!dark::isActuallyOn()) { if (option.state.testFlag(QStyle::State_HasFocus)) { QStyleOptionViewItem vi = option; + // Workaround: draw selected item from Windows’ skin + // 1. Set style vi.state = QStyle::State_Selected | QStyle::State_MouseOver | QStyle::State_Active | QStyle::State_Enabled | QStyle::State_Item | QStyle::State_On | QStyle::State_KeyboardFocusChange; + // 2. Use dummy list view as object instead of table view QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &vi, painter, dummyLv.get()); paintItem1(painter, option, index, owner->palette().windowText().color()); return; diff --git a/Unicodia/FmMain.h b/Unicodia/FmMain.h index c2666e0bc..51b4a444c 100644 --- a/Unicodia/FmMain.h +++ b/Unicodia/FmMain.h @@ -117,7 +117,7 @@ class RowCache }; -enum class TableColors { NO, YES }; +enum class TableColors : unsigned char { NO, YES }; class VirtualCharsModel