CURA-5035 Renaming

This commit is contained in:
Ian Paschal 2018-04-04 13:53:09 +02:00
parent 0cfcc8cd5f
commit 20feabbb06
16 changed files with 68 additions and 60 deletions

View file

@ -1,7 +1,7 @@
# Copyright (c) 2018 Ultimaker B.V. # Copyright (c) 2018 Ultimaker B.V.
# Toolbox is released under the terms of the LGPLv3 or higher. # Toolbox is released under the terms of the LGPLv3 or higher.
from .Toolbox import Toolbox from .src import Toolbox
def getMetaData(): def getMetaData():

View file

@ -40,23 +40,23 @@ Window
top: topBar.bottom top: topBar.bottom
bottom: bottomBar.top bottom: bottomBar.top
} }
ToolboxViewDownloads ToolboxDownloadsPage
{ {
id: viewDownloads id: viewDownloads
visible: manager.currentView != "installed" && !manager.detailView visible: manager.currentView != "installed" && manager.detailView == ""
} }
ToolboxViewDetail ToolboxDetailsPage
{ {
id: viewDetail id: viewDetail
visible: manager.currentView != "installed" && manager.detailView visible: manager.currentView != "installed" && manager.detailView != ""
} }
ToolboxViewInstalled ToolboxInstalledPage
{ {
id: installedPluginList id: installedPluginList
visible: manager.currentView == "installed" visible: manager.currentView == "installed"
} }
} }
SectionShadow ToolboxShadow
{ {
anchors anchors
{ {
@ -67,7 +67,7 @@ Window
{ {
id: bottomBar id: bottomBar
} }
SectionShadow ToolboxShadow
{ {
anchors anchors
{ {

View file

@ -44,7 +44,7 @@ Item
} }
width: UM.Theme.getSize("base_unit").width * 4 width: UM.Theme.getSize("base_unit").width * 4
height: UM.Theme.getSize("base_unit").height * 2 height: UM.Theme.getSize("base_unit").height * 2
onClicked: manager.detailView = false onClicked: manager.detailView = ""
style: ButtonStyle style: ButtonStyle
{ {
background: Rectangle background: Rectangle
@ -153,17 +153,17 @@ Item
rightMargin: UM.Theme.getSize("double_margin").width rightMargin: UM.Theme.getSize("double_margin").width
} }
ToolboxDetailTile {} ToolboxDetailsTile {}
ToolboxDetailTile {} ToolboxDetailsTile {}
ToolboxDetailTile {} ToolboxDetailsTile {}
ToolboxDetailTile {} ToolboxDetailsTile {}
ToolboxDetailTile {} ToolboxDetailsTile {}
ToolboxDetailTile {} ToolboxDetailsTile {}
ToolboxDetailTile {} ToolboxDetailsTile {}
ToolboxDetailTile {} ToolboxDetailsTile {}
ToolboxDetailTile {} ToolboxDetailsTile {}
ToolboxDetailTile {} ToolboxDetailsTile {}
ToolboxDetailTile {} ToolboxDetailsTile {}
} }
*/ */
} }

View file

@ -35,7 +35,7 @@ Column
Repeater Repeater
{ {
model: manager.packagesModel model: manager.packagesModel
delegate: ToolboxGridTile delegate: ToolboxDownloadsGridTile
{ {
Layout.preferredWidth: (grid.width - (grid.columns - 1) * grid.columnSpacing) / grid.columns Layout.preferredWidth: (grid.width - (grid.columns - 1) * grid.columnSpacing) / grid.columns
} }

View file

@ -61,6 +61,9 @@ Item
MouseArea MouseArea
{ {
anchors.fill: parent anchors.fill: parent
onClicked: manager.detailView = true onClicked: {
console.log(model.id)
manager.detailView = model.id
}
} }
} }

View file

@ -12,7 +12,7 @@ import UM 1.1 as UM
ScrollView ScrollView
{ {
id: base id: base
frameVisible: true frameVisible: false
width: parent.width width: parent.width
height: parent.height height: parent.height
style: UM.Theme.styles.scrollview style: UM.Theme.styles.scrollview
@ -22,7 +22,7 @@ ScrollView
spacing: UM.Theme.getSize("base_unit").height spacing: UM.Theme.getSize("base_unit").height
padding: UM.Theme.getSize("base_unit").height * 2 padding: UM.Theme.getSize("base_unit").height * 2
height: childrenRect.height + 2 * padding height: childrenRect.height + 2 * padding
ToolboxShowcase ToolboxDownloadsShowcase
{ {
id: showcase id: showcase
width: parent.width - 2 * parent.padding width: parent.width - 2 * parent.padding
@ -33,7 +33,7 @@ ScrollView
width: parent.width - 2 * parent.padding width: parent.width - 2 * parent.padding
height: UM.Theme.getSize("base_unit").height / 6 height: UM.Theme.getSize("base_unit").height / 6
} }
ToolboxGrid ToolboxDownloadsGrid
{ {
id: allPlugins id: allPlugins
width: parent.width - 2 * parent.padding width: parent.width - 2 * parent.padding

View file

@ -32,8 +32,8 @@ Column
horizontalCenter: parent.horizontalCenter horizontalCenter: parent.horizontalCenter
} }
ToolboxShowcaseTile {} ToolboxDownloadsShowcaseTile {}
ToolboxShowcaseTile {} ToolboxDownloadsShowcaseTile {}
ToolboxShowcaseTile {} ToolboxDownloadsShowcaseTile {}
} }
} }

View file

@ -8,12 +8,6 @@ import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import UM 1.1 as UM import UM 1.1 as UM
/* NOTE: This file uses the UM.Theme's "base_unit" size. It's commonly agreed
that good design is consistent design, and since the UM.Theme's JSON file does
not provide a method for interiting base units across the interface, adding more
properties for severy single UI element is undesirable for both developers and
theme makers/modfiers. Thus, "base_unit" is used wherever it can be. */
Item Item
{ {
width: UM.Theme.getSize("toolbox_thumbnail_large").width width: UM.Theme.getSize("toolbox_thumbnail_large").width

View file

@ -17,21 +17,26 @@ Rectangle {
color: "transparent" color: "transparent"
height: childrenRect.height height: childrenRect.height
Row { Row
{
spacing: 12 spacing: 12
height: childrenRect.height height: childrenRect.height
width: childrenRect.width width: childrenRect.width
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.leftMargin: UM.Theme.getSize("default_margin").width
Button { Button
{
text: "Plugins" text: "Plugins"
style: ButtonStyle { style: ButtonStyle
background: Rectangle { {
background: Rectangle
{
color: "transparent" color: "transparent"
implicitWidth: 96 implicitWidth: 96
implicitHeight: 48 implicitHeight: 48
Rectangle { Rectangle
{
visible: manager.currentView == "plugins" visible: manager.currentView == "plugins"
color: UM.Theme.getColor("primary") color: UM.Theme.getColor("primary")
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
@ -39,12 +44,11 @@ Rectangle {
height: 3 height: 3
} }
} }
label: Text { label: Text
{
text: control.text text: control.text
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
font { font.pixelSize: 15
pixelSize: 15
}
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@ -53,17 +57,22 @@ Rectangle {
{ {
manager.filterPackagesByType("plugin") manager.filterPackagesByType("plugin")
manager.currentView = "plugins" manager.currentView = "plugins"
manager.detailView = ""
} }
} }
Button { Button
{
text: "Materials" text: "Materials"
style: ButtonStyle { style: ButtonStyle
background: Rectangle { {
background: Rectangle
{
color: "transparent" color: "transparent"
implicitWidth: 96 implicitWidth: 96
implicitHeight: 48 implicitHeight: 48
Rectangle { Rectangle
{
visible: manager.currentView == "materials" visible: manager.currentView == "materials"
color: UM.Theme.getColor("primary") color: UM.Theme.getColor("primary")
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
@ -71,12 +80,11 @@ Rectangle {
height: 3 height: 3
} }
} }
label: Text { label: Text
{
text: control.text text: control.text
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
font { font.pixelSize: 15
pixelSize: 15
}
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }
@ -85,16 +93,20 @@ Rectangle {
{ {
manager.filterPackagesByType("material") manager.filterPackagesByType("material")
manager.currentView = "materials" manager.currentView = "materials"
manager.detailView = ""
} }
} }
} }
Button { Button
{
text: "Installed" text: "Installed"
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.rightMargin: UM.Theme.getSize("default_margin").width
style: ButtonStyle { style: ButtonStyle
background: Rectangle { {
background: Rectangle
{
color: "transparent" color: "transparent"
implicitWidth: 96 implicitWidth: 96
implicitHeight: 48 implicitHeight: 48
@ -106,12 +118,11 @@ Rectangle {
height: 3 height: 3
} }
} }
label: Text { label: Text
{
text: control.text text: control.text
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
font { font.pixelSize: 15
pixelSize: 15
}
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }

View file

@ -28,6 +28,6 @@ ScrollView
rightMargin: UM.Theme.getSize("default_margin").width rightMargin: UM.Theme.getSize("default_margin").width
} }
model: manager.pluginsModel model: manager.pluginsModel
delegate: PluginEntry {} delegate: ToolboxInstalledTile {}
} }
} }

View file

@ -129,7 +129,7 @@ class Toolbox(QObject, Extension):
self.requestPackageList() self.requestPackageList()
if not self._dialog: if not self._dialog:
self._dialog = self._createDialog("PluginBrowser.qml") self._dialog = self._createDialog("Toolbox.qml")
self._dialog.show() self._dialog.show()
def requestPackageList(self): def requestPackageList(self):