mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 19:25:53 +08:00
Make switching Marketplace-tabs work with search-bar.
Reset search-bar (text) when switching tabs. Also hide search-bar (at least for now) when dealing with the managed packages tab. part of CURA-8559
This commit is contained in:
parent
44242dcd02
commit
24eaad4c6d
@ -86,7 +86,8 @@ Window
|
|||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
Layout.preferredHeight: parent.height
|
Layout.preferredHeight: parent.height
|
||||||
Layout.preferredWidth: UM.Theme.getSize("thin_margin").width
|
Layout.preferredWidth: searchBar.visible ? UM.Theme.getSize("thin_margin").width : 0
|
||||||
|
Layout.fillWidth: ! searchBar.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.SearchBar
|
Cura.SearchBar
|
||||||
@ -94,7 +95,7 @@ Window
|
|||||||
id: searchBar
|
id: searchBar
|
||||||
Layout.preferredHeight: parent.height
|
Layout.preferredHeight: parent.height
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onTextEdited: marketplaceDialog.searchStringChanged(text)
|
onTextEdited: searchStringChanged(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Page selection.
|
// Page selection.
|
||||||
@ -111,7 +112,12 @@ Window
|
|||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
padding: UM.Theme.getSize("thin_margin").width
|
padding: UM.Theme.getSize("thin_margin").width
|
||||||
text: catalog.i18nc("@button", "Plugins")
|
text: catalog.i18nc("@button", "Plugins")
|
||||||
onClicked: content.source = "Plugins.qml"
|
onClicked:
|
||||||
|
{
|
||||||
|
searchBar.text = ""
|
||||||
|
searchBar.visible = true
|
||||||
|
content.source = "Plugins.qml"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
PackageTypeTab
|
PackageTypeTab
|
||||||
{
|
{
|
||||||
@ -119,7 +125,12 @@ Window
|
|||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
padding: UM.Theme.getSize("thin_margin").width
|
padding: UM.Theme.getSize("thin_margin").width
|
||||||
text: catalog.i18nc("@button", "Materials")
|
text: catalog.i18nc("@button", "Materials")
|
||||||
onClicked: content.source = "Materials.qml"
|
onClicked:
|
||||||
|
{
|
||||||
|
searchBar.text = ""
|
||||||
|
searchBar.visible = true
|
||||||
|
content.source = "Materials.qml"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TextMetrics
|
TextMetrics
|
||||||
@ -143,6 +154,8 @@ Window
|
|||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
searchBar.text = ""
|
||||||
|
searchBar.visible = false
|
||||||
content.source = "ManagedPackages.qml"
|
content.source = "ManagedPackages.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user