[vlc-commits] [Git][videolan/vlc][master] 3 commits: qt: use proper transparent color for background in `systempalettethemeprovider.cpp`
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Jul 16 12:07:31 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
8de55572 by Fatih Uzunoglu at 2026-07-16T11:49:23+00:00
qt: use proper transparent color for background in `systempalettethemeprovider.cpp`
- - - - -
eef6f5ce by Fatih Uzunoglu at 2026-07-16T11:49:23+00:00
qt: use proper color for menu bar background color in `SystemPalette`
- - - - -
2b347c2c by Fatih Uzunoglu at 2026-07-16T11:49:23+00:00
qml: use proper transparent color when color animation is involved
- - - - -
20 changed files:
- modules/gui/qt/maininterface/qml/UpdatePane.qml
- modules/gui/qt/medialibrary/qml/MusicArtistDelegate.qml
- modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
- modules/gui/qt/network/qml/AddressbarButton.qml
- modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
- modules/gui/qt/player/qml/controlbarcontrols/Fallback.qml
- modules/gui/qt/player/qml/controlbarcontrols/HighResolutionTimeWidget.qml
- modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
- modules/gui/qt/playlist/qml/PlaylistDelegate.qml
- modules/gui/qt/playlist/qml/PlaylistPane.qml
- modules/gui/qt/style/systempalette.cpp
- modules/gui/qt/style/systempalettethemeprovider.cpp
- modules/gui/qt/widgets/qml/BannerTabButton.qml
- modules/gui/qt/widgets/qml/CheckButton.qml
- modules/gui/qt/widgets/qml/CheckedDelegate.qml
- modules/gui/qt/widgets/qml/ComboBoxExt.qml
- modules/gui/qt/widgets/qml/GridItem.qml
- modules/gui/qt/widgets/qml/ImageToolButton.qml
- modules/gui/qt/widgets/qml/TableViewDelegateExt.qml
- modules/gui/qt/widgets/qml/TextToolButton.qml
Changes:
=====================================
modules/gui/qt/maininterface/qml/UpdatePane.qml
=====================================
@@ -326,7 +326,7 @@ T.Pane {
anchors.fill: parent
backgroundColor: (root.background?.visible && root.background.color.a >= 1.0) ? root.background.color
- : "transparent"
+ : Qt.alpha(root.background.color, 0.0)
sourceItem: descriptionFlickable.contentItem
=====================================
modules/gui/qt/medialibrary/qml/MusicArtistDelegate.qml
=====================================
@@ -147,7 +147,7 @@ T.ItemDelegate {
background: Widgets.AnimatedBackground {
enabled: theme.initialized
color: (root.isCurrent || root.selected) ? theme.bg.highlight : theme.bg.primary
- border.color: visualFocus ? theme.visualFocus : "transparent"
+ border.color: visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
Widgets.CurrentIndicator {
anchors {
=====================================
modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
=====================================
@@ -182,7 +182,7 @@ Widgets.PageExt {
displayMarginBeginning: root.displayMarginBeginning
displayMarginEnd: root.displayMarginEnd
- fadingEdge.backgroundColor: artistListBackground.usingAcrylic ? "transparent"
+ fadingEdge.backgroundColor: artistListBackground.usingAcrylic ? Qt.alpha(artistListBackground.alternativeColor, 0.0)
: artistListBackground.alternativeColor
fadingEdge.enableBeginningFade: root.enableBeginningFade
=====================================
modules/gui/qt/network/qml/AddressbarButton.qml
=====================================
@@ -64,7 +64,7 @@ T.Button {
background: Widgets.AnimatedBackground {
enabled: theme.initialized
color: button.backgroundColor
- border.color: visualFocus ? theme.visualFocus : "transparent"
+ border.color: visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
}
contentItem: contentLoader.item
=====================================
modules/gui/qt/player/qml/controlbarcontrols/ArtworkInfoWidget.qml
=====================================
@@ -143,7 +143,7 @@ AbstractButton {
background: Widgets.AnimatedBackground {
enabled: theme.initialized
- border.color: visualFocus ? theme.visualFocus : "transparent"
+ border.color: visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
}
contentItem: RowLayout {
=====================================
modules/gui/qt/player/qml/controlbarcontrols/Fallback.qml
=====================================
@@ -40,7 +40,7 @@ Control {
background: Widgets.AnimatedBackground {
enabled: theme.initialized
- border.color: visualFocus ? theme.visualFocus : "transparent"
+ border.color: visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
}
contentItem: Widgets.MenuLabel {
=====================================
modules/gui/qt/player/qml/controlbarcontrols/HighResolutionTimeWidget.qml
=====================================
@@ -67,7 +67,7 @@ Control {
background: Widgets.AnimatedBackground {
enabled: theme.initialized
- border.color: visualFocus ? theme.visualFocus : "transparent"
+ border.color: visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
}
contentItem: Item {
=====================================
modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
=====================================
@@ -251,7 +251,7 @@ T.Control {
enabled: theme.initialized
- border.color: root.visualFocus ? theme.visualFocus : "transparent"
+ border.color: root.visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
}
Rectangle {
=====================================
modules/gui/qt/playlist/qml/PlaylistDelegate.qml
=====================================
@@ -129,7 +129,7 @@ T.Control {
enabled: theme.initialized
- border.color: delegate.visualFocus ? theme.visualFocus : "transparent"
+ border.color: delegate.visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
Widgets.CurrentIndicator {
anchors {
=====================================
modules/gui/qt/playlist/qml/PlaylistPane.qml
=====================================
@@ -221,7 +221,7 @@ T.Pane {
model: root.model
fadingEdge.backgroundColor: (root.background && (root.background.color.a >= 1.0)) ? root.background.color
- : "transparent"
+ : Qt.alpha(root.background.color, 0.0)
isDropAcceptableFunc: function(drop, index) {
if (drop.source === dragItem)
=====================================
modules/gui/qt/style/systempalette.cpp
=====================================
@@ -563,7 +563,7 @@ void SystemPalette::makeLightPalette()
//menubar
{
C::ColorSet CS = C::MenuBar;
- setColor(CS, C::Bg, C::Primary, C::Normal, setColorAlpha(lightGrey300, 0.0));
+ setColor(CS, C::Bg, C::Primary, C::Normal, setColorAlpha(lightGrey700, 0.0));
setColor(CS, C::Bg, C::Primary, C::Focused, lightGrey700);
setColor(CS, C::Bg, C::Primary, C::Hovered, lightGrey700);
setColor(CS, C::Fg, C::Primary, C::Normal, Qt::black);
=====================================
modules/gui/qt/style/systempalettethemeprovider.cpp
=====================================
@@ -254,7 +254,11 @@ static int updatePalette(vlc_qt_theme_provider_t* obj)
QColor hightlightPressed = sys->m_isDark ? hightlight.lighter(120) : hightlight.darker(110);
- setQtColor(obj, CS, VQTC_SECTION_BG, VQTC_NAME_PRIMARY, VQTC_STATE_NORMAL, Qt::transparent);
+ const QColor transparentHighlight = [hightlight]() mutable {
+ hightlight.setAlpha(0);
+ return hightlight;
+ }();
+ setQtColor(obj, CS, VQTC_SECTION_BG, VQTC_NAME_PRIMARY, VQTC_STATE_NORMAL, transparentHighlight);
setQtColor(obj, CS, VQTC_SECTION_BG, VQTC_NAME_PRIMARY, VQTC_STATE_HOVERED, hightlight);
setQtColor(obj, CS, VQTC_SECTION_BG, VQTC_NAME_PRIMARY, VQTC_STATE_FOCUSED, hightlight);
setQtColor(obj, CS, VQTC_SECTION_BG, VQTC_NAME_PRIMARY, VQTC_STATE_PRESSED, hightlightPressed);
@@ -354,9 +358,13 @@ static int updatePalette(vlc_qt_theme_provider_t* obj)
setQtColorSetFg(obj, CS, VQTC_NAME_PRIMARY, QPalette::Text);
setQtColor(obj, CS, VQTC_SECTION_FG, VQTC_NAME_SECONDARY, VQTC_STATE_NORMAL, secondaryTextBase);
- setQtColor(obj, CS, VQTC_SECTION_BG, VQTC_NAME_PRIMARY, VQTC_STATE_NORMAL, Qt::transparent);
QColor itemBgHover = hightlight;
itemBgHover.setAlphaF(0.1);
+ const QColor transparentBgHover = [itemBgHover]() mutable {
+ itemBgHover.setAlpha(0.0);
+ return itemBgHover;
+ }();
+ setQtColor(obj, CS, VQTC_SECTION_BG, VQTC_NAME_PRIMARY, VQTC_STATE_NORMAL, transparentBgHover);
setQtColor(obj, CS, VQTC_SECTION_BG, VQTC_NAME_PRIMARY, VQTC_STATE_FOCUSED, itemBgHover);
setQtColor(obj, CS, VQTC_SECTION_BG, VQTC_NAME_PRIMARY, VQTC_STATE_HOVERED, itemBgHover);
=====================================
modules/gui/qt/widgets/qml/BannerTabButton.qml
=====================================
@@ -88,7 +88,7 @@ T.TabButton {
animationDuration: VLCStyle.duration_short
color: theme.bg.primary
- border.color: visualFocus ? theme.visualFocus : "transparent"
+ border.color: visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
Widgets.CurrentIndicator {
anchors {
=====================================
modules/gui/qt/widgets/qml/CheckButton.qml
=====================================
@@ -157,7 +157,7 @@ T.Switch {
background: AnimatedBackground {
enabled: theme.initialized
- border.color: root.visualFocus ? theme.visualFocus : "transparent"
+ border.color: root.visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
}
indicator: Rectangle {
=====================================
modules/gui/qt/widgets/qml/CheckedDelegate.qml
=====================================
@@ -50,7 +50,7 @@ T.ItemDelegate {
background: Widgets.AnimatedBackground {
enabled: theme.initialized
color: control.checked ? theme.bg.highlight : theme.bg.primary
- border.color: visualFocus ? theme.visualFocus : "transparent"
+ border.color: visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
}
contentItem: Item { // don't use a row, it will move text when control is unchecked
=====================================
modules/gui/qt/widgets/qml/ComboBoxExt.qml
=====================================
@@ -113,7 +113,7 @@ T.ComboBox {
highlight: Widgets.AnimatedBackground {
enabled: theme.initialized
- border.color: visualFocus ? theme.visualFocus : "transparent"
+ border.color: visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
color: theme.bg.secondary
}
=====================================
modules/gui/qt/widgets/qml/GridItem.qml
=====================================
@@ -272,7 +272,7 @@ T.ItemDelegate {
//don't show the backgroud unless selected
color: root.selected ? theme.bg.highlight : theme.bg.primary
- border.color: visualFocus ? theme.visualFocus : "transparent"
+ border.color: visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
}
contentItem: ColumnLayout {
=====================================
modules/gui/qt/widgets/qml/ImageToolButton.qml
=====================================
@@ -73,7 +73,7 @@ T.ToolButton {
enabled: theme.initialized
color: theme.bg.primary
- border.color: control.visualFocus ? theme.visualFocus : "transparent"
+ border.color: control.visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
}
contentItem: Image {
=====================================
modules/gui/qt/widgets/qml/TableViewDelegateExt.qml
=====================================
@@ -213,7 +213,7 @@ T.Control {
animationDuration: VLCStyle.duration_short
enabled: theme.initialized
color: delegate.selected ? theme.bg.highlight : theme.bg.primary
- border.color: visualFocus ? theme.visualFocus : "transparent"
+ border.color: visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
}
contentItem: Row {
=====================================
modules/gui/qt/widgets/qml/TextToolButton.qml
=====================================
@@ -70,7 +70,7 @@ T.ToolButton {
background: AnimatedBackground {
enabled: theme.initialized
color: theme.bg.primary
- border.color: visualFocus ? theme.visualFocus : "transparent"
+ border.color: visualFocus ? theme.visualFocus : Qt.alpha(theme.visualFocus, 0.0)
radius: control.radius
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/91b90455f0fd0ca4e295e7613ce267f4c27d6e16...2b347c2cec4737c8bb215ea04b3a50d024adf982
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/91b90455f0fd0ca4e295e7613ce267f4c27d6e16...2b347c2cec4737c8bb215ea04b3a50d024adf982
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list