[vlc-devel] [PATCH 3/4] qml: fix focus background not visible in TextToolButton
Pierre Lamot
pierre at videolabs.io
Thu Feb 6 14:10:14 CET 2020
---
modules/gui/qt/widgets/qml/TextToolButton.qml | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/widgets/qml/TextToolButton.qml b/modules/gui/qt/widgets/qml/TextToolButton.qml
index 716f076685..e85355e2c0 100644
--- a/modules/gui/qt/widgets/qml/TextToolButton.qml
+++ b/modules/gui/qt/widgets/qml/TextToolButton.qml
@@ -17,14 +17,20 @@
*****************************************************************************/
import QtQuick 2.11
import QtQuick.Controls 2.4
+import QtQuick.Templates 2.4 as T
import "qrc:///style/"
-ToolButton {
+T.ToolButton {
id: control
font.pixelSize: VLCStyle.fontSize_normal
+ implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
+ implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
+
+ padding: VLCStyle.margin_xxsmall
+
contentItem: Label {
text: control.text
font: control.font
@@ -51,5 +57,6 @@ ToolButton {
}
background: FocusBackground {
+ active: (control.activeFocus || control.hovered)
}
}
--
2.17.1
More information about the vlc-devel
mailing list