2 * Copyright 2013 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
18 * Nick Dedekind <nick.dedekind@canonical.com>
22import Ubuntu.Components 0.1 as Components
23import Unity.Indicators 0.1 as Indicators
28 property alias minimumValue: slider.minimumValue
29 property alias maximumValue: slider.maximumValue
30 property double value: 0.0
32 property alias minIcon: leftImage.source
33 property alias maxIcon: rightImage.source
35 property QtObject d: QtObject {
36 property bool enableValueConnection: true
39 signal changeState(real value)
42 // TODO: look into adding a component to manage bi-directional bindings.
43 var oldEnable = d.enableValueConnection
44 d.enableValueConnection = false;
46 // Can't rely on binding. Slider value is assigned by user slide.
49 d.enableValueConnection = oldEnable;
54 width: menuItem.text ? units.gu(20) : menuItem.width - (2 * menuItem.__contentsMargins)
59 visible: status === Image.Ready
60 anchors.left: row.left
61 anchors.verticalCenter: row.verticalCenter
69 left: leftImage.visible ? leftImage.right : row.left
70 right: rightImage.visible ? rightImage.left : row.right
71 leftMargin: leftImage.visible ? units.gu(0.5) : 0
72 rightMargin: rightImage.visible ? units.gu(0.5) : 0
76 Component.onCompleted: {
77 value = menuItem.value
83 // FIXME - to be deprecated in Ubuntu.Components.
84 // Use this to disable the label, since there is not way to do it on the component.
85 function formatValue(v) {
90 target: d.enableValueConnection ? slider : null
92 menuItem.changeState(slider.value);
99 visible: status === Image.Ready
100 anchors.right: row.right
101 anchors.verticalCenter: row.verticalCenter
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