mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 13:55:56 +08:00
Add (not yet operational) search-bar to new Marketplace.
part of CURA-8559
This commit is contained in:
parent
b5d58f78d7
commit
7432c0d8f0
@ -70,46 +70,79 @@ Window
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Search & Top-Level Tabs
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
Layout.preferredWidth: parent.width
|
|
||||||
Layout.preferredHeight: childrenRect.height
|
Layout.preferredHeight: childrenRect.height
|
||||||
|
Layout.preferredWidth: parent.width - 2 * UM.Theme.getSize("thin_margin").width
|
||||||
ManagePackagesButton
|
RowLayout
|
||||||
{
|
{
|
||||||
id: managePackagesButton
|
width: parent.width
|
||||||
|
height: UM.Theme.getSize("button_icon").height + UM.Theme.getSize("default_margin").height
|
||||||
|
spacing: UM.Theme.getSize("thin_margin").width
|
||||||
|
|
||||||
anchors.right: parent.right
|
Rectangle
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
|
||||||
|
|
||||||
onClicked:
|
|
||||||
{
|
{
|
||||||
content.source = "ManagedPackages.qml"
|
Layout.preferredHeight: parent.height
|
||||||
|
Layout.preferredWidth: UM.Theme.getSize("thin_margin").width
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Page selection.
|
Cura.SearchBar
|
||||||
TabBar
|
|
||||||
{
|
|
||||||
id: pageSelectionTabBar
|
|
||||||
anchors.right: managePackagesButton.left
|
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
|
||||||
height: UM.Theme.getSize("button_icon").height
|
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
PackageTypeTab
|
|
||||||
{
|
{
|
||||||
width: implicitWidth
|
id: searchBar
|
||||||
padding: UM.Theme.getSize("default_margin").width/2
|
Layout.preferredHeight: parent.height
|
||||||
text: catalog.i18nc("@button", "Plugins")
|
Layout.fillWidth: true
|
||||||
onClicked: content.source = "Plugins.qml"
|
//onTextEdited: // TODO!
|
||||||
}
|
}
|
||||||
PackageTypeTab
|
|
||||||
|
// Page selection.
|
||||||
|
TabBar
|
||||||
{
|
{
|
||||||
|
id: pageSelectionTabBar
|
||||||
|
height: parent.height
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
padding: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
spacing: 0
|
||||||
text: catalog.i18nc("@button", "Materials")
|
|
||||||
onClicked: content.source = "Materials.qml"
|
PackageTypeTab
|
||||||
|
{
|
||||||
|
id: pluginTabText
|
||||||
|
width: implicitWidth
|
||||||
|
padding: UM.Theme.getSize("thin_margin").width
|
||||||
|
text: catalog.i18nc("@button", "Plugins")
|
||||||
|
onClicked: content.source = "Plugins.qml"
|
||||||
|
}
|
||||||
|
PackageTypeTab
|
||||||
|
{
|
||||||
|
id: materialsTabText
|
||||||
|
width: implicitWidth
|
||||||
|
padding: UM.Theme.getSize("thin_margin").width
|
||||||
|
text: catalog.i18nc("@button", "Materials")
|
||||||
|
onClicked: content.source = "Materials.qml"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TextMetrics
|
||||||
|
{
|
||||||
|
id: pluginTabTextMetrics
|
||||||
|
text: pluginTabText.text
|
||||||
|
font: pluginTabText.font
|
||||||
|
}
|
||||||
|
TextMetrics
|
||||||
|
{
|
||||||
|
id: materialsTabTextMetrics
|
||||||
|
text: materialsTabText.text
|
||||||
|
font: materialsTabText.font
|
||||||
|
}
|
||||||
|
|
||||||
|
ManagePackagesButton
|
||||||
|
{
|
||||||
|
id: managePackagesButton
|
||||||
|
height: parent.height
|
||||||
|
width: UM.Theme.getSize("button_icon").width
|
||||||
|
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
content.source = "ManagedPackages.qml"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user