fix main layout

This commit is contained in:
Marco Martin 2015-09-23 12:01:13 +02:00
parent 2a0152bad0
commit 1de2633a5b

View file

@ -133,23 +133,16 @@ Rectangle {
} }
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors {
GridLayout { fill: parent
id: topBar margins: units.smallSpacing
anchors { }
top: parent.top spacing: units.smallSpacing
left: parent.left
right: parent.right
topMargin: 0
leftMargin: units.smallSpacing
}
columns: 2
PlasmaExtras.Title { PlasmaExtras.Title {
id: heading id: heading
text: i18nd("plasma_shell_org.kde.plasma.desktop", "Widgets") text: i18nd("plasma_shell_org.kde.plasma.desktop", "Widgets")
Layout.fillWidth: true Layout.fillWidth: true
}
PlasmaComponents.ToolButton { PlasmaComponents.ToolButton {
id: closeButton id: closeButton
@ -160,33 +153,26 @@ Rectangle {
iconSource: "window-close" iconSource: "window-close"
onClicked: removeAnim.running = true; onClicked: removeAnim.running = true;
} }
PlasmaComponents.TextField {
id: searchInput
clearButtonShown: true
placeholderText: i18nd("plasma_shell_org.kde.plasma.desktop", "Search...")
onTextChanged: {
list.positionViewAtBeginning()
list.currentIndex = -1
widgetExplorer.widgetsModel.searchTerm = text
}
Component.onCompleted: forceActiveFocus()
Layout.columnSpan: 2
Layout.fillWidth: true
}
} }
PlasmaExtras.ScrollArea { PlasmaComponents.TextField {
anchors { id: searchInput
top: topBar.bottom clearButtonShown: true
left: parent.left placeholderText: i18nd("plasma_shell_org.kde.plasma.desktop", "Search...")
right: parent.right onTextChanged: {
bottom: bottomBar.top list.positionViewAtBeginning()
topMargin: units.smallSpacing list.currentIndex = -1
leftMargin: units.smallSpacing widgetExplorer.widgetsModel.searchTerm = text
bottomMargin: units.smallSpacing
} }
Component.onCompleted: forceActiveFocus()
Layout.fillWidth: true
}
PlasmaExtras.ScrollArea {
Layout.fillHeight: true
Layout.fillWidth: true
GridView { GridView {
id: list id: list