[vlc-commits] [Git][videolan/vlc][master] 4 commits: qt: update ColorContext colors when palette internally changes
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Mar 18 16:35:31 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
8b9293f3 by Pierre Lamot at 2023-03-18T16:04:39+00:00
qt: update ColorContext colors when palette internally changes
- - - - -
9d87d210 by Pierre Lamot at 2023-03-18T16:04:39+00:00
qml: fix label not colorized properly in the ToolbarEditor
it tries to use the colorContext of the WindowDialog which was not exposed
- - - - -
2aa07f52 by Pierre Lamot at 2023-03-18T16:04:39+00:00
qml: add missing import for ColorContext
- - - - -
ff905bd5 by Pierre Lamot at 2023-03-18T16:04:39+00:00
qml: add missing color in EmptyLabelHint
- - - - -
5 changed files:
- modules/gui/qt/dialogs/dialogs/qml/WindowDialog.qml
- modules/gui/qt/medialibrary/qml/EmptyLabelHint.qml
- modules/gui/qt/player/qml/controlbarcontrols/SpacerWidget.qml
- modules/gui/qt/style/colorcontext.cpp
- modules/gui/qt/widgets/qml/ImageToolButton.qml
Changes:
=====================================
modules/gui/qt/dialogs/dialogs/qml/WindowDialog.qml
=====================================
@@ -40,6 +40,7 @@ Window {
property alias contentComponent: loader.sourceComponent
property alias standardButtons: buttonBox.standardButtons
+ property alias colorContext: layout.colorContext
signal accepted()
signal rejected(bool byButton)
@@ -62,6 +63,7 @@ Window {
}
ColumnLayout {
+ id: layout
anchors.fill: parent
anchors.margins: VLCStyle.margin_small
=====================================
modules/gui/qt/medialibrary/qml/EmptyLabelHint.qml
=====================================
@@ -25,6 +25,7 @@ import "qrc:///style/"
import "qrc:///widgets/" as Widgets
EmptyLabel {
+ id: root
// Aliases
property alias hint: labelHint.text
@@ -46,5 +47,7 @@ EmptyLabel {
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
+
+ color: root.colorContext.fg.secondary
}
}
=====================================
modules/gui/qt/player/qml/controlbarcontrols/SpacerWidget.qml
=====================================
@@ -18,6 +18,8 @@
import QtQuick 2.11
import QtQuick.Templates 2.4 as T
+import org.videolan.vlc 0.1
+
import "qrc:///widgets/" as Widgets
import "qrc:///style/"
=====================================
modules/gui/qt/style/colorcontext.cpp
=====================================
@@ -188,12 +188,18 @@ bool ColorContext::setInheritedPalette(SystemPalette* palette)
if (m_palette == palette)
return false;
if (m_palette)
+ {
disconnect(m_palette, &SystemPalette::sourceChanged, this, &ColorContext::colorsChanged);
+ disconnect(m_palette, &SystemPalette::paletteChanged, this, &ColorContext::colorsChanged);
+ }
m_palette = palette;
if (m_palette)
+ {
connect(m_palette, &SystemPalette::sourceChanged, this, &ColorContext::colorsChanged);
+ connect(m_palette, &SystemPalette::paletteChanged, this, &ColorContext::colorsChanged);
+ }
else
m_initialized = false;
=====================================
modules/gui/qt/widgets/qml/ImageToolButton.qml
=====================================
@@ -18,6 +18,8 @@
import QtQuick 2.11
import QtQuick.Templates 2.4 as T
+import org.videolan.vlc 0.1
+
import "qrc:///widgets/" as Widgets
import "qrc:///style/"
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4d5606c58d132cb58fdc11bda1da0927d98ba386...ff905bd558f6934ea96f2fc7a2fa4400d41c1f77
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4d5606c58d132cb58fdc11bda1da0927d98ba386...ff905bd558f6934ea96f2fc7a2fa4400d41c1f77
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list