[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: add toolbar play button background graphic
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Sat Jul 2 18:11:01 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
23214846 by Fatih Uzunoglu at 2022-07-02T17:29:59+00:00
qt: add toolbar play button background graphic
Co-authored-by: Pierre Lamot <pierre at videolabs.io>
- - - - -
c7b9e7bf by Fatih Uzunoglu at 2022-07-02T17:29:59+00:00
qml: use graphic as toolbar play button background
- - - - -
4 changed files:
- modules/gui/qt/Makefile.am
- + modules/gui/qt/pixmaps/toolbar/play_button.svg
- modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
- modules/gui/qt/vlc.qrc
Changes:
=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -692,6 +692,7 @@ libqt_plugin_la_RES = \
gui/qt/pixmaps/toolbar/volume-muted.svg \
gui/qt/pixmaps/toolbar/volume-slider-inside.svg \
gui/qt/pixmaps/toolbar/volume-slider-outside.svg \
+ gui/qt/pixmaps/toolbar/play_button.svg \
gui/qt/pixmaps/types/capture-card_16px.svg \
gui/qt/pixmaps/types/disc_16px.svg \
gui/qt/pixmaps/types/file-asym_16px.svg \
=====================================
modules/gui/qt/pixmaps/toolbar/play_button.svg
=====================================
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="48" height="48" version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
+ <defs>
+ <linearGradient id="gradient" x1="0" x2="0" y1="1" y2="0">
+ <stop stop-color="#e25b01" offset="0%"/>
+ <stop stop-color="#f89a06" offset="100%"/>
+ </linearGradient>
+ </defs>
+ <circle cx="24" cy="24" r="24" fill="url(#gradient)"/>
+ <circle cx="24" cy="24" r="22" fill="#fff"/>
+</svg>
=====================================
modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
=====================================
@@ -17,7 +17,6 @@
*****************************************************************************/
import QtQuick 2.11
import QtQuick.Templates 2.4 as T
-import QtGraphicalEffects 1.0
import org.videolan.vlc 0.1
@@ -209,7 +208,6 @@ T.Control {
anchors.centerIn: parent
- z: -1
visible: opacity > 0
opacity: 0
@@ -229,7 +227,6 @@ T.Control {
anchors.centerIn: parent
- z: -1
visible: opacity > 0
opacity: 0
@@ -244,48 +241,9 @@ T.Control {
sourceSize: Qt.size(parent.width, parent.height)
}
- Rectangle {
+ Widgets.ScaledImage {
anchors.fill: parent
- anchors.margins: VLCStyle.dp(1, VLCStyle.scale)
-
- radius: (width * 0.5)
-
- color: VLCStyle.colors.white
- }
-
- Rectangle {
- id: outerRect
- anchors.fill: parent
-
- visible: false
-
- radius: (width * 0.5)
-
- gradient: Gradient {
- GradientStop { position: 0.0; color: VLCStyle.colors.buttonPlayA }
- GradientStop { position: 1.0; color: VLCStyle.colors.buttonPlayB }
- }
- }
-
- Rectangle {
- id: innerRect
- anchors.fill: parent
-
- radius: (width * 0.5)
- border.width: VLCStyle.dp(2, VLCStyle.scale)
-
- color: "transparent"
- visible: false
- }
-
- OpacityMask {
- id: opacityMask
- anchors.fill: parent
-
- source: outerRect
- maskSource: innerRect
-
- antialiasing: true
+ source: "qrc:/toolbar/play_button.svg"
}
}
}
=====================================
modules/gui/qt/vlc.qrc
=====================================
@@ -82,6 +82,7 @@
<file alias="slower2.svg">pixmaps/slower2.svg</file>
<file alias="faster2.svg">pixmaps/faster2.svg</file>
<file alias="audiosub.svg">pixmaps/toolbar/audiosub.svg</file>
+ <file alias="play_button.svg">pixmaps/toolbar/play_button.svg</file>
</qresource>
<qresource prefix="/buttons/playlist">
<file alias="playlist_add.svg">pixmaps/playlist/add.svg</file>
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/61a05c739b2b4ccc4a4515269ec65207ed03acbe...c7b9e7bf43c03e97f1d2d850e5f0c4a477ddb7d8
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/61a05c739b2b4ccc4a4515269ec65207ed03acbe...c7b9e7bf43c03e97f1d2d850e5f0c4a477ddb7d8
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