2 * Copyright (C) 2012, 2013 Canonical, Ltd.
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.
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.
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/>.
18import Ubuntu.Components 0.1
21 height: childrenRect.height
22 width: childrenRect.width
23 property variant tooltip
25 property variant sliderData
26 property string action
27 property alias value: slider.value
29 // TODO We should not need this but without it
30 // slider.onValueChanged.connect(valueChanged) in
31 // HudParametrizedActionsPage.qml doesn't work
32 // Michael thinks it's related to https://bugreports.qt-project.org/browse/QTBUG-29141
35 onSliderDataChanged: {
36 label.text = sliderData["label"]
37 slider.minimumValue = sliderData["min"]
38 slider.maximumValue = sliderData["max"]
39 slider.live = sliderData["live"]
40 // SDK Slider does not support step yet
41// slider.step = sliderData["step"]
42 slider.value = sliderData["value"]
43 action = sliderData["action"]
48 anchors.top: parent.top
49 anchors.left: parent.left
50 anchors.right: parent.right
51 anchors.margins: units.gu(1)
52 anchors.leftMargin: units.gu(2)
57 anchors.top: label.bottom
58 anchors.left: parent.left
59 anchors.right: parent.right
60 anchors.margins: units.gu(1)
63 function realFormatValue(v) { return Math.round(v) + " %" }
64 function formatValue(v) { return tooltip.target == slider ? "" : realFormatValue(v) }
65 onPressedChanged: tooltip.target = pressed ? slider : undefined
68 source: "graphics/divider.sci"
69 anchors.top: slider.bottom
70 anchors.left: parent.left
71 anchors.right: parent.right
72 anchors.topMargin: units.gu(2)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list