Changeset View
Changeset View
Standalone View
Standalone View
cuttlefish/package/contents/ui/Tools.qml
Show All 14 Lines | |||||
15 | * You should have received a copy of the GNU General Public License * | 15 | * You should have received a copy of the GNU General Public License * | ||
16 | * along with this program; if not, write to the * | 16 | * along with this program; if not, write to the * | ||
17 | * Free Software Foundation, Inc., * | 17 | * Free Software Foundation, Inc., * | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | ||
19 | * * | 19 | * * | ||
20 | ***************************************************************************/ | 20 | ***************************************************************************/ | ||
21 | 21 | | |||
22 | import QtQuick 2.2 | 22 | import QtQuick 2.2 | ||
23 | import QtQuick.Controls 1.0 | 23 | import QtQuick.Controls 2.0 | ||
24 | import QtQuick.Layouts 1.0 | 24 | import QtQuick.Layouts 1.0 | ||
25 | 25 | | |||
26 | import org.kde.plasma.core 2.0 as PlasmaCore | 26 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
27 | import org.kde.plasma.components 2.0 as PlasmaComponents | 27 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
28 | 28 | | |||
29 | PlasmaComponents.ToolBar { | 29 | PlasmaComponents.ToolBar { | ||
30 | 30 | | |||
31 | Rectangle { | 31 | Rectangle { | ||
Show All 24 Lines | 55 | onTriggered: { | |||
56 | iconModel.filter = filterInput.text | 56 | iconModel.filter = filterInput.text | ||
57 | } | 57 | } | ||
58 | } | 58 | } | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | ComboBox { | 61 | ComboBox { | ||
62 | Layout.preferredWidth: units.gridUnit * 6 | 62 | Layout.preferredWidth: units.gridUnit * 6 | ||
63 | model: iconModel.categories | 63 | model: iconModel.categories | ||
64 | onCurrentIndexChanged: { | 64 | onActivated: { | ||
65 | if (currentText == "all") { | 65 | if (currentText == "all") { | ||
66 | iconModel.category = ""; | 66 | iconModel.category = ""; | ||
67 | } else if (currentText != "") { | 67 | } else if (currentText != "") { | ||
68 | iconModel.category = currentText | 68 | iconModel.category = currentText | ||
69 | } | 69 | } | ||
70 | } | 70 | } | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | Slider { | 73 | Slider { | ||
74 | id: sizeslider | 74 | id: sizeslider | ||
75 | Layout.preferredWidth: preview.width - units.gridUnit * 2 | 75 | Layout.preferredWidth: preview.width - units.gridUnit * 2 | ||
76 | 76 | | |||
77 | maximumValue: 6.0 | 77 | to: 6.0 | ||
78 | stepSize: 1.0 | 78 | stepSize: 1.0 | ||
79 | tickmarksEnabled: true | 79 | snapMode: Slider.AlwaysSnap | ||
80 | value: 4 | 80 | value: 4.0 | ||
81 | 81 | | |||
82 | onValueChanged: { | 82 | onValueChanged: { | ||
83 | sizetimer.restart() | 83 | sizetimer.restart() | ||
84 | pixelSizeInput.text = indexToSize(sizeslider.value) | 84 | pixelSizeInput.text = indexToSize(sizeslider.value) | ||
85 | } | 85 | } | ||
86 | 86 | | |||
87 | Timer { | 87 | Timer { | ||
88 | id: sizetimer | 88 | id: sizetimer | ||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |