Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/Applications.qml
Show All 15 Lines | 1 | /* | |||
---|---|---|---|---|---|
16 | GNU General Public License for more details. | 16 | GNU General Public License for more details. | ||
17 | 17 | | |||
18 | You should have received a copy of the GNU General Public License | 18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | import QtQuick 2.0 | 22 | import QtQuick 2.0 | ||
23 | import QtQuick.Layouts 1.1 | 23 | import QtQuick.Layouts 1.1 | ||
24 | import QtQuick.Controls 1.3 | 24 | import QtQuick.Controls 2.2 | ||
25 | 25 | | |||
26 | import org.kde.plasma.private.volume 0.1 | 26 | import org.kde.plasma.private.volume 0.1 | ||
27 | 27 | | |||
28 | ScrollView { | 28 | ScrollView { | ||
29 | id: scrollView | 29 | id: scrollView | ||
30 | anchors.fill: parent | 30 | | ||
31 | contentWidth: contentLayout.width | ||||
32 | contentHeight: contentLayout.height | ||||
33 | clip: true | ||||
34 | | ||||
35 | // Show the frame | ||||
36 | Component.onCompleted: scrollView.background.visible = true; | ||||
31 | 37 | | |||
32 | ColumnLayout { | 38 | ColumnLayout { | ||
33 | Component.onCompleted: { | 39 | id: contentLayout | ||
34 | // Normal binding causes binding loops | 40 | | ||
35 | width = Qt.binding(function() { | 41 | // This doesn't cause a binding loop with the QQC2 scrollview, | ||
36 | return scrollView.viewport.width; | 42 | // but it does cause a horizontal scrollbar because the scrollview | ||
37 | }); | 43 | // is a few pixels wider than its viewport area, and the QQC2 version | ||
38 | } | 44 | // doesn't expose that property to let us precisely match its width. | ||
45 | // To deal with this, we manually reduce the width a few pixels. | ||||
46 | width: scrollView.width - 4 | ||||
39 | 47 | | |||
40 | Header { | 48 | Header { | ||
41 | Layout.fillWidth: true | 49 | Layout.fillWidth: true | ||
42 | enabled: eventStreamView.count || sinkInputView.count | 50 | enabled: eventStreamView.count || sinkInputView.count | ||
43 | text: i18nd("kcm_pulseaudio", "Playback") | 51 | text: i18nd("kcm_pulseaudio", "Playback") | ||
44 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Applications Playing Audio") | 52 | disabledText: i18ndc("kcm_pulseaudio", "@label", "No Applications Playing Audio") | ||
45 | } | 53 | } | ||
46 | 54 | | |||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |