Tumbler: change default visibleItemCount to 5
This looks much better than 3; it looks more like an actual Tumbler, partly because the displacement shading is made more visible. This should make it less confusing to interact with for first-time users. In addition, we were previously setting it to 5 in several places. [ChangeLog][Important Behavior Changes][Tumbler] Changed the default value of visibleItemCount to 5 to make it visually clearer that it's a Tumbler. Change-Id: I7c16e05aa73f58e3405caa1826453cb824efae11 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
This commit is contained in:
parent
97c88459d8
commit
fa8cccf479
|
@ -57,7 +57,6 @@ Pane {
|
|||
|
||||
Tumbler {
|
||||
model: 10
|
||||
visibleItemCount: 5
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 154 KiB |
|
@ -32,7 +32,6 @@ import QtQuick.Controls 2.0
|
|||
Tumbler {
|
||||
id: control
|
||||
model: 15
|
||||
visibleItemCount: 5
|
||||
|
||||
background: Item {
|
||||
Rectangle {
|
||||
|
|
|
@ -78,21 +78,18 @@ Rectangle {
|
|||
|
||||
Tumbler {
|
||||
id: hoursTumbler
|
||||
visibleItemCount: 5
|
||||
model: 12
|
||||
delegate: delegateComponent
|
||||
}
|
||||
|
||||
Tumbler {
|
||||
id: minutesTumbler
|
||||
visibleItemCount: 5
|
||||
model: 60
|
||||
delegate: delegateComponent
|
||||
}
|
||||
|
||||
Tumbler {
|
||||
id: amPmTumbler
|
||||
visibleItemCount: 5
|
||||
wrap: false
|
||||
model: ["AM", "PM"]
|
||||
delegate: delegateComponent
|
||||
|
|
|
@ -74,7 +74,7 @@ class QQuickTumblerPrivate : public QQuickControlPrivate, public QQuickItemChang
|
|||
public:
|
||||
QQuickTumblerPrivate() :
|
||||
delegate(nullptr),
|
||||
visibleItemCount(3),
|
||||
visibleItemCount(5),
|
||||
wrap(true),
|
||||
view(nullptr),
|
||||
viewContentItem(nullptr),
|
||||
|
|
|
@ -61,7 +61,9 @@ TestCase {
|
|||
Component {
|
||||
id: tumblerComponent
|
||||
|
||||
Tumbler {}
|
||||
Tumbler {
|
||||
visibleItemCount: 3
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
@ -166,6 +168,7 @@ TestCase {
|
|||
Tumbler {
|
||||
model: 5
|
||||
currentIndex: 2
|
||||
visibleItemCount: 3
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,6 +179,7 @@ TestCase {
|
|||
model: 5
|
||||
currentIndex: 2
|
||||
wrap: false
|
||||
visibleItemCount: 3
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -186,6 +190,7 @@ TestCase {
|
|||
model: 5
|
||||
wrap: false
|
||||
currentIndex: 2
|
||||
visibleItemCount: 3
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,21 +73,18 @@ Window {
|
|||
|
||||
Tumbler {
|
||||
id: hoursTumbler
|
||||
visibleItemCount: 5
|
||||
model: 12
|
||||
delegate: delegateComponent
|
||||
}
|
||||
|
||||
Tumbler {
|
||||
id: minutesTumbler
|
||||
visibleItemCount: 5
|
||||
model: 60
|
||||
delegate: delegateComponent
|
||||
}
|
||||
|
||||
Tumbler {
|
||||
id: amPmTumbler
|
||||
visibleItemCount: 5
|
||||
wrap: false
|
||||
model: ["AM", "PM"]
|
||||
delegate: delegateComponent
|
||||
|
|
|
@ -128,7 +128,7 @@ void tst_Gifs::tumblerWrap()
|
|||
GifRecorder gifRecorder;
|
||||
gifRecorder.setDataDirPath(dataDirPath);
|
||||
gifRecorder.setOutputDir(outputDir);
|
||||
gifRecorder.setRecordingDuration(4);
|
||||
gifRecorder.setRecordingDuration(5);
|
||||
gifRecorder.setQmlFileName("qtquickcontrols2-tumbler-wrap.qml");
|
||||
|
||||
gifRecorder.start();
|
||||
|
|
Loading…
Reference in New Issue