fixed listview height
This commit is contained in:
@@ -27,6 +27,8 @@ Scope {
|
|||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if ( !visible ) {
|
if ( !visible ) {
|
||||||
searchInput.text = "";
|
searchInput.text = "";
|
||||||
|
appListView.currentIndex = 0;
|
||||||
|
appListView.positionViewAtBeginning();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,12 +43,6 @@ Scope {
|
|||||||
} else if ( launcherWindow.visible ) {
|
} else if ( launcherWindow.visible ) {
|
||||||
if ( !closeAnim.running ) {
|
if ( !closeAnim.running ) {
|
||||||
closeAnim.start();
|
closeAnim.start();
|
||||||
} else if ( openAnim.running ) {
|
|
||||||
openAnim.stop();
|
|
||||||
closeAnim.start();
|
|
||||||
} else if ( closeAnim.running ) {
|
|
||||||
closeAnim.stop();
|
|
||||||
openAnim.start();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
searchInput.forceActiveFocus();
|
searchInput.forceActiveFocus();
|
||||||
@@ -209,8 +205,8 @@ Scope {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 10
|
|
||||||
visible: appListView.count > 0
|
visible: appListView.count > 0
|
||||||
|
anchors.margins: 10
|
||||||
clip: true
|
clip: true
|
||||||
ListView {
|
ListView {
|
||||||
id: appListView
|
id: appListView
|
||||||
@@ -227,7 +223,7 @@ Scope {
|
|||||||
implicitHeight: Math.min( count, Config.appCount ) * 48
|
implicitHeight: Math.min( count, Config.appCount ) * 48
|
||||||
|
|
||||||
preferredHighlightBegin: 0
|
preferredHighlightBegin: 0
|
||||||
preferredHighlightEnd: appListRect.height
|
preferredHighlightEnd: appListView.height
|
||||||
highlightFollowsCurrentItem: false
|
highlightFollowsCurrentItem: false
|
||||||
highlightRangeMode: ListView.ApplyRange
|
highlightRangeMode: ListView.ApplyRange
|
||||||
focus: true
|
focus: true
|
||||||
|
|||||||
Reference in New Issue
Block a user