[vlc-devel] [PATCH 7/9] qml: show bgHover color when row has focus in KeyNavigableTableView

jagannatharjun guptaprince8832 at gmail.com
Fri Jun 5 17:27:23 CEST 2020


From: Prince Gupta <guptaprince8832 at gmail.com>

---
 modules/gui/qt/widgets/qml/KeyNavigableTableView.qml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
index f6ea48806f..718a02b576 100644
--- a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
+++ b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
@@ -152,12 +152,13 @@ NavigableFocusScope {
         delegate:Rectangle {
             id: lineView
 
-            width: view.width
-            height: root.rowHeight
-            color: VLCStyle.colors.getBgColor(selected, hoverArea.containsMouse, lineView.activeFocus)
-
             property var rowModel: model
             property bool selected: selectionModel.isSelected(root.model.index(index, 0))
+            readonly property bool highlighted: selected || hoverArea.containsMouse || activeFocus
+
+            width: view.width
+            height: root.rowHeight
+            color: highlighted ? VLCStyle.colors.bgHover : "transparent"
 
             Connections {
                 target: selectionModel
-- 
2.25.1



More information about the vlc-devel mailing list