vlc | branch: master | Prince Gupta <[email protected]> | Tue Dec 8 19:25:10 2020 +0530| [ba7f131447971563ad750b3acf84c0d7a8c45726] | committer: Pierre Lamot
qml: change row foreground color on highlighted in KeyNavigableTableView Signed-off-by: Pierre Lamot <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ba7f131447971563ad750b3acf84c0d7a8c45726 --- modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml | 2 ++ modules/gui/qt/widgets/qml/KeyNavigableTableView.qml | 4 ++++ modules/gui/qt/widgets/qml/TableColumns.qml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml b/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml index 84b01696e4..e70ba6d1f6 100644 --- a/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml +++ b/modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml @@ -164,6 +164,7 @@ Widgets.NavigableFocusScope { Widgets.ListLabel { text: rowModel ? rowModel.track_number : "" + color: foregroundColor Layout.fillHeight: true Layout.preferredWidth: VLCStyle.margin_large @@ -171,6 +172,7 @@ Widgets.NavigableFocusScope { Widgets.ListLabel { text: rowModel ? rowModel.title : "" + color: foregroundColor Layout.fillHeight: true Layout.fillWidth: true diff --git a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml index 6cdd5cfe39..f475465185 100644 --- a/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml +++ b/modules/gui/qt/widgets/qml/KeyNavigableTableView.qml @@ -41,6 +41,7 @@ NavigableFocusScope { anchors.fill: parent text: !rowModel ? "" : (rowModel[model.criteria] || "") + color: parent.foregroundColor } property Component tableHeaderDelegate: Widgets.CaptionLabel { text: model.text || "" @@ -200,6 +201,7 @@ NavigableFocusScope { property var rowModel: model property bool selected: selectionDelegateModel.isSelected(root.model.index(index, 0)) readonly property bool highlighted: selected || hoverArea.containsMouse || activeFocus + readonly property color foregroundColor: highlighted ? VLCStyle.colors.bgHoverText : VLCStyle.colors.text readonly property int _index: index property int _modifiersOnLastPress: Qt.NoModifier @@ -292,6 +294,7 @@ NavigableFocusScope { property var colModel: modelData readonly property bool currentlyFocused: lineView.activeFocus readonly property bool containsMouse: hoverArea.containsMouse + readonly property color foregroundColor: lineView.foregroundColor readonly property int index: lineView._index anchors.fill: parent @@ -306,6 +309,7 @@ NavigableFocusScope { anchors.left: content.right anchors.leftMargin: VLCStyle.margin_xxsmall anchors.verticalCenter: content.verticalCenter + color: lineView.foregroundColor backgroundColor: hovered || activeFocus ? VLCStyle.colors.getBgColor( lineView.selected, hovered, activeFocus ) : "transparent" diff --git a/modules/gui/qt/widgets/qml/TableColumns.qml b/modules/gui/qt/widgets/qml/TableColumns.qml index b2e943ab83..293d6c596d 100644 --- a/modules/gui/qt/widgets/qml/TableColumns.qml +++ b/modules/gui/qt/widgets/qml/TableColumns.qml @@ -70,6 +70,7 @@ Item { Widgets.ListLabel { text: (!rowModel || !root.showTitleText) ? "" : (rowModel[model.criteria] || i18n.qtr("Unknown Title")) visible: root.showTitleText + color: foregroundColor Layout.fillHeight: true Layout.fillWidth: true @@ -108,6 +109,7 @@ Item { height: parent.height horizontalAlignment: Text.AlignHCenter text: !rowModel ? "" : rowModel[model.criteria] || "" + color: foregroundColor } } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
