on xenial help sign in
As review
28b558bAndrea Cimitan
qml/Dash/Previews/PreviewMediaToolbar.qmlnew file+36
@@ -0,0 +1,36 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import QtQuick 2.0
18+import Ubuntu.Components 0.1
19+import "../../Components"
20+
21+Rectangle {
22+ property alias shareData: sharingWidget.shareData
23+
24+ implicitHeight: units.gu(6)
25+ color: Qt.rgba(0, 0, 0, 0.8)
26+ visible: sharingWidget.visible
27+
28+ PreviewSharing {
29+ id: sharingWidget
30+ anchors {
31+ left: parent.left
32+ verticalCenter: parent.verticalCenter
33+ leftMargin: units.gu(1)
34+ }
35+ }
36+}
qml/Dash/Previews/PreviewVideoPlayback.qml+2−15
@@ -73,27 +73,14 @@ PreviewWidget {
73 onClicked: Qt.openUrlExternally(widgetData["source"])
73 onClicked: Qt.openUrlExternally(widgetData["source"])
74 }
74 }
75
75
76− Rectangle {
76+ PreviewMediaToolbar {
77 id: toolbar
77 id: toolbar
78 anchors {
78 anchors {
79 left: parent.left
79 left: parent.left
80 right: parent.right
80 right: parent.right
81 bottom: parent.bottom
81 bottom: parent.bottom
82 }
82 }
83− height: units.gu(6)
84− color: Qt.rgba(0, 0, 0, 0.8)
85−
86− visible: sharingWidget.url != ""
87−
88− PreviewSharing {
89− id: sharingWidget
90− anchors {
91− left: parent.left
92− verticalCenter: parent.verticalCenter
93− leftMargin: units.gu(1)
94− }
95− shareData: widgetData["shareData"]
83+ shareData: widgetData["shareData"]
96− }
97 }
84 }
98 }
85 }
99}
86}
qml/Dash/Previews/PreviewZoomableImage.qml+2−15
@@ -64,27 +64,14 @@ PreviewWidget {
64 onStatusChanged: if (lazyImage.sourceImage.status === Image.Error) lazyImage.sourceImage.source = widgetData["fallback"];
64 onStatusChanged: if (lazyImage.sourceImage.status === Image.Error) lazyImage.sourceImage.source = widgetData["fallback"];
65 }
65 }
66
66
67− Rectangle {
67+ PreviewMediaToolbar {
68 id: toolbar
68 id: toolbar
69 anchors {
69 anchors {
70 left: parent.left
70 left: parent.left
71 right: parent.right
71 right: parent.right
72 bottom: parent.bottom
72 bottom: parent.bottom
73 }
73 }
74− height: units.gu(6)
75− color: Qt.rgba(0, 0, 0, 0.8)
76−
77− visible: sharingWidget.url != ""
78−
79− PreviewSharing {
80− id: sharingWidget
81− anchors {
82− left: parent.left
83− verticalCenter: parent.verticalCenter
84− leftMargin: units.gu(1)
85− }
86− shareData: widgetData["shareData"]
74+ shareData: widgetData["shareData"]
87− }
88 }
75 }
89 }
76 }
90
77