mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06: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
1 changed files with 17 additions and 4 deletions
|
@ -86,7 +86,8 @@ Window
|
|||
Rectangle
|
||||
{
|
||||
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
|
||||
|
@ -94,7 +95,7 @@ Window
|
|||
id: searchBar
|
||||
Layout.preferredHeight: parent.height
|
||||
Layout.fillWidth: true
|
||||
onTextEdited: marketplaceDialog.searchStringChanged(text)
|
||||
onTextEdited: searchStringChanged(text)
|
||||
}
|
||||
|
||||
// Page selection.
|
||||
|
@ -111,7 +112,12 @@ Window
|
|||
width: implicitWidth
|
||||
padding: UM.Theme.getSize("thin_margin").width
|
||||
text: catalog.i18nc("@button", "Plugins")
|
||||
onClicked: content.source = "Plugins.qml"
|
||||
onClicked:
|
||||
{
|
||||
searchBar.text = ""
|
||||
searchBar.visible = true
|
||||
content.source = "Plugins.qml"
|
||||
}
|
||||
}
|
||||
PackageTypeTab
|
||||
{
|
||||
|
@ -119,7 +125,12 @@ Window
|
|||
width: implicitWidth
|
||||
padding: UM.Theme.getSize("thin_margin").width
|
||||
text: catalog.i18nc("@button", "Materials")
|
||||
onClicked: content.source = "Materials.qml"
|
||||
onClicked:
|
||||
{
|
||||
searchBar.text = ""
|
||||
searchBar.visible = true
|
||||
content.source = "Materials.qml"
|
||||
}
|
||||
}
|
||||
}
|
||||
TextMetrics
|
||||
|
@ -143,6 +154,8 @@ Window
|
|||
|
||||
onClicked:
|
||||
{
|
||||
searchBar.text = ""
|
||||
searchBar.visible = false
|
||||
content.source = "ManagedPackages.qml"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue