[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml/MediaCover: Update background to discern a grid item against the window background
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Mon Oct 4 08:18:19 UTC 2021
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
3473aa81 by Benjamin Arnaud at 2021-10-04T07:32:54+00:00
qml/MediaCover: Update background to discern a grid item against the window background
- - - - -
faa1ae74 by Benjamin Arnaud at 2021-10-04T07:32:54+00:00
VLCColors: Update background colors
- - - - -
2 changed files:
- modules/gui/qt/style/VLCColors.qml
- modules/gui/qt/widgets/qml/MediaCover.qml
Changes:
=====================================
modules/gui/qt/style/VLCColors.qml
=====================================
@@ -107,6 +107,9 @@ Item {
// GridItem
+ // NOTE: This needs to contrast with the background because we have no border.
+ property color grid: (isThemeDark) ? "#272727" : "#ededed"
+
property color gridSelect: (isThemeDark) ? "#303030" : "#e5e5e5"
// ListItem
@@ -206,7 +209,7 @@ Item {
text: "#232627"
textInactive: "#7f8c8d"
- bg: "#fcfdfc"
+ bg: "#fafafa"
bgInactive: "#fcfdfc"
bgAlt: "#ededed"
@@ -246,7 +249,7 @@ Item {
text: "#eff0f1"
textInactive: "#bdc3c7"
- bg: "#1a1a1a"
+ bg: "#1e1e1e"
bgInactive: "#232629"
bgAlt: "#242424"
bgAltInactive: "#212121"
=====================================
modules/gui/qt/widgets/qml/MediaCover.qml
=====================================
@@ -24,20 +24,49 @@ import "qrc:///style/"
import org.videolan.controls 0.1
-RoundImage {
+// NOTE: This rectangle is useful to discern the item against a similar background.
+// FIXME: Maybe we could refactor this to draw the background directly in the RoundImage.
+Rectangle {
id: root
- property alias playCoverOpacity: playCoverLoader.opacity
- property alias playCoverVisible: playCoverLoader.visible
+ // Properties
+
property bool playCoverOnlyBorders: false
+
property real playIconSize: VLCStyle.play_cover_normal
+
property real playCoverBorderWidth: VLCStyle.table_cover_border
+
+ // Aliases
+
+ property alias source: image.source
+
property alias imageOverlay: overlay.sourceComponent
+
+ property alias playCoverOpacity: playCoverLoader.opacity
+ property alias playCoverVisible: playCoverLoader.visible
+
+ // Signals
+
signal playIconClicked
+ // Settings
+
height: VLCStyle.listAlbumCover_height
width: VLCStyle.listAlbumCover_width
+ color: VLCStyle.colors.grid
+
+ // Children
+
+ RoundImage {
+ id: image
+
+ anchors.fill: parent
+
+ radius: root.radius
+ }
+
Loader {
id: overlay
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9e7ed0247dd298fe8597431ae0738882e734011b...faa1ae74f0a17705ce71b878bb50949d66e84fa8
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9e7ed0247dd298fe8597431ae0738882e734011b...faa1ae74f0a17705ce71b878bb50949d66e84fa8
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list