[vlc-devel] [PATCH 08/21] qml: allow forcing colors of Teletext widget
Pierre Lamot
pierre at videolabs.io
Wed Aug 7 15:52:14 CEST 2019
---
modules/gui/qt/qml/player/TeletextWidget.qml | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt/qml/player/TeletextWidget.qml b/modules/gui/qt/qml/player/TeletextWidget.qml
index e63ec52f1b..32c7902783 100644
--- a/modules/gui/qt/qml/player/TeletextWidget.qml
+++ b/modules/gui/qt/qml/player/TeletextWidget.qml
@@ -36,6 +36,9 @@ FocusScope{
property bool acceptFocus: autohide
visible: !autohide
+ property color color: VLCStyle.colors.text
+ property color bgColor: VLCStyle.colors.bg
+
RowLayout{
id: teleWidget
width: autohide ? 0 : VLCStyle.widthTeletext * scale
@@ -47,6 +50,7 @@ FocusScope{
text: VLCIcons.tv
size: VLCStyle.icon_normal
onClicked: player.teletextEnabled = !player.teletextEnabled
+ color: widgetfscope.color
checked: player.teletextEnabled
focus: true
KeyNavigation.right: player.teletextEnabled ?
@@ -60,6 +64,7 @@ FocusScope{
opacity: 0.5
enabled: player.teletextEnabled
onClicked: player.teletextTransparency = !player.teletextTransparency
+ color: widgetfscope.color
KeyNavigation.right: telePageNumber
}
@@ -69,6 +74,8 @@ FocusScope{
from: 100
to: 899
editable: true
+ textColor: widgetfscope.color
+ bgColor: widgetfscope.bgColor
onValueChanged: player.teletextPage = value
KeyNavigation.right: indexKeyBtn
}
@@ -80,6 +87,7 @@ FocusScope{
text: VLCIcons.record
onClicked: player.teletextPage = PlayerController.TELE_INDEX
color: "grey"
+ colorDisabled: "grey"
KeyNavigation.right: redKeyBtn
}
Utils.IconToolButton{
@@ -88,7 +96,8 @@ FocusScope{
size: VLCStyle.icon_normal
text: VLCIcons.record
onClicked: player.teletextPage = PlayerController.TELE_RED
- color: enabled ? "red" : "grey"
+ color: "red"
+ colorDisabled: "grey"
KeyNavigation.right: greenKeyBtn
}
Utils.IconToolButton{
@@ -97,7 +106,8 @@ FocusScope{
size: VLCStyle.icon_normal
text: VLCIcons.record
onClicked: player.teletextPage = PlayerController.TELE_GREEN
- color: enabled ? "green" : "grey"
+ color: "green"
+ colorDisabled: "grey"
KeyNavigation.right: yellowKeyBtn
}
Utils.IconToolButton{
@@ -106,7 +116,8 @@ FocusScope{
size: VLCStyle.icon_normal
text: VLCIcons.record
onClicked: player.teletextPage = PlayerController.TELE_YELLOW
- color: enabled ? "yellow" : "grey"
+ color: "yellow"
+ colorDisabled: "grey"
KeyNavigation.right: blueKeyBtn
}
Utils.IconToolButton{
@@ -115,7 +126,8 @@ FocusScope{
size: VLCStyle.icon_normal
text: VLCIcons.record
onClicked: player.teletextPage = PlayerController.TELE_BLUE
- color: enabled ? "blue" : "grey"
+ color: "blue"
+ colorDisabled: "grey"
}
}
}
--
2.17.1
More information about the vlc-devel
mailing list