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>
21import Ubuntu.Components 0.1
26 property alias minimumValue: slider.minimumValue
27 property alias maximumValue: slider.maximumValue
28 property alias value: slider.value
32 width: _sliderMenu.text ? units.gu(20) : _sliderMenu.width - units.gu(4)
33 anchors.verticalCenter: parent.verticalCenter
35 // FIXME: The interval should be [0.0 - 1.0]. Unfortunately, when
36 // reaching the boundaries (0.0 or 1.0), the value is converted
37 // to an integer when automatically wrapped in a variant when
38 // passed to QStateAction::updateState(…). The server chokes on
39 // those values, complaining that they’re not of the right type…
40 minimumValue: menu.extra.canonical_min ? menu.extra.canonical_min * 1.000001 : 0.0000001
41 maximumValue: menu.extra.canonical_max ? menu.extra.canonical_max * 1.000001 : 0.9999999
44 target: slider.ItemStyle.style
45 property: "backgroundColor"
46 value: Qt.rgba(0.5, 0.5, 0.5, 0.1)
50 target: slider.ItemStyle.style
51 property: "backgroundOpacity"
55 // Use this to disable the label, since there is not way to do it on the component.
56 function formatValue(v) {
62 action: menu ? menu.action : undefined
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