vlc | branch: master | Prince Gupta <[email protected]> | Sat Dec 5 00:24:07 2020 +0530| [66f6af14d72bff9c9bf2a819ab0e318577208692] | committer: Pierre Lamot
qml: add CoverShadow widget Signed-off-by: Pierre Lamot <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=66f6af14d72bff9c9bf2a819ab0e318577208692 --- modules/gui/qt/Makefile.am | 1 + modules/gui/qt/vlc.qrc | 1 + modules/gui/qt/widgets/qml/CoverShadow.qml | 55 ++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am index 6512df8171..1e2c14f650 100644 --- a/modules/gui/qt/Makefile.am +++ b/modules/gui/qt/Makefile.am @@ -695,6 +695,7 @@ libqt_plugin_la_QML = \ gui/qt/widgets/qml/CheckedDelegate.qml \ gui/qt/widgets/qml/ComboBoxExt.qml \ gui/qt/widgets/qml/ContextButton.qml \ + gui/qt/widgets/qml/CoverShadow.qml \ gui/qt/widgets/qml/CSDWindowButton.qml \ gui/qt/widgets/qml/CSDWindowButtonSet.qml \ gui/qt/widgets/qml/CSDTitlebarTapNDrapHandler.qml \ diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc index a4bd4b57a4..080c9c0246 100644 --- a/modules/gui/qt/vlc.qrc +++ b/modules/gui/qt/vlc.qrc @@ -241,6 +241,7 @@ <file alias="LocalTabBar.qml">widgets/qml/LocalTabBar.qml</file> <file alias="IconButton.qml">widgets/qml/IconButton.qml</file> <file alias="DragItem.qml">widgets/qml/DragItem.qml</file> + <file alias="CoverShadow.qml">widgets/qml/CoverShadow.qml</file> </qresource> <qresource prefix="/network"> <file alias="AddressbarButton.qml">network/qml/AddressbarButton.qml</file> diff --git a/modules/gui/qt/widgets/qml/CoverShadow.qml b/modules/gui/qt/widgets/qml/CoverShadow.qml new file mode 100644 index 0000000000..ab540a312c --- /dev/null +++ b/modules/gui/qt/widgets/qml/CoverShadow.qml @@ -0,0 +1,55 @@ + +/***************************************************************************** + * Copyright (C) 2020 VLC authors and VideoLAN + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * ( at your option ) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + *****************************************************************************/ +import QtQuick 2.11 +import QtGraphicalEffects 1.0 + +import "qrc:///style/" + +Item { + id: root + + property alias source: primaryShadow.source + property alias primaryVerticalOffset: primaryShadow.verticalOffset + property alias primaryRadius: primaryShadow.radius + property alias primarySamples: primaryShadow.samples + property alias secondaryVerticalOffset: secondaryShadow.verticalOffset + property alias secondaryRadius: secondaryShadow.radius + property alias secondarySamples: secondaryShadow.samples + + DropShadow { + id: primaryShadow + + anchors.fill: parent + horizontalOffset: 0 + spread: 0 + color: Qt.rgba(0, 0, 0, .22) + samples: 1 + radius * 2 + } + + DropShadow { + id: secondaryShadow + + anchors.fill: parent + source: primaryShadow.source + horizontalOffset: 0 + spread: 0 + color: Qt.rgba(0, 0, 0, .18) + samples: 1 + radius * 2 + } +} _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
