Skip to content

Commit

Permalink
+comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercury13 committed Dec 15, 2024
1 parent 9755dc0 commit 53f6d81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Unicodia/FmMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Unicodia/FmMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class RowCache
};


enum class TableColors { NO, YES };
enum class TableColors : unsigned char { NO, YES };


class VirtualCharsModel
Expand Down

0 comments on commit 53f6d81

Please sign in to comment.