CURA-5035 Fixed selection header

This commit is contained in:
Ian Paschal 2018-04-24 16:59:23 +02:00
parent f2301eec31
commit 236e2db47e
14 changed files with 29 additions and 29 deletions

View file

@ -9,6 +9,7 @@ import UM 1.1 as UM
Window
{
id: base
property var selection: null
title: catalog.i18nc("@title", "Toolbox")
modality: Qt.ApplicationModal
width: 720 * screenScaleFactor

View file

@ -8,8 +8,8 @@ import UM 1.1 as UM
Item
{
id: base
property var details: toolbox.viewSelection
id: page
property var details: base.selection
anchors.fill: parent
ToolboxBackColumn
{
@ -130,9 +130,9 @@ Item
anchors
{
top: header.bottom
bottom: base.bottom
bottom: page.bottom
left: header.left
right: base.right
right: page.right
}
}
}

View file

@ -6,19 +6,20 @@ import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import UM 1.1 as UM
Item
Rectangle
{
id: base
id: detailList
// color: "green"
ScrollView
{
frameVisible: false
anchors.fill: base
anchors.fill: detailList
style: UM.Theme.styles.scrollview
Column
{
anchors
{
right: base.right
right: detailList.right
topMargin: UM.Theme.getSize("wide_margin").height
bottomMargin: UM.Theme.getSize("wide_margin").height
top: parent.top

View file

@ -8,8 +8,8 @@ import UM 1.1 as UM
Item
{
id: base
property var details: toolbox.viewSelection
id: page
property var details: base.selection
anchors.fill: parent
width: parent.width
ToolboxBackColumn
@ -149,9 +149,9 @@ Item
anchors
{
top: header.bottom
bottom: base.bottom
bottom: page.bottom
left: header.left
right: base.right
right: page.right
}
}
}

View file

@ -8,8 +8,9 @@ import UM 1.1 as UM
Item
{
id: tile
property bool installed: toolbox.isInstalled(model.id)
width: base.width - UM.Theme.getSize("wide_margin").width
width: detailList.width - UM.Theme.getSize("wide_margin").width
height: UM.Theme.getSize("toolbox_detail_tile").height
Column
{
@ -55,9 +56,10 @@ Item
Rectangle
{
id: controls
anchors.right: parent.right
anchors.top: parent.top
anchors.right: tile.right
anchors.top: tile.top
width: childrenRect.width
color: "blue"
Button
{
id: installButton
@ -180,9 +182,9 @@ Item
Rectangle
{
color: UM.Theme.getColor("lining")
width: parent.width
width: tile.width
height: UM.Theme.getSize("default_lining").height
anchors.bottom: parent.bottom
anchors.bottom: tile.bottom
}
Connections
{

View file

@ -11,7 +11,6 @@ import UM 1.1 as UM
Column
{
id: base
height: childrenRect.height
width: parent.width
spacing: UM.Theme.getSize("default_margin").height

View file

@ -9,7 +9,6 @@ import UM 1.1 as UM
Item
{
id: base
height: childrenRect.height
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
Rectangle
@ -88,7 +87,7 @@ Item
}
onClicked:
{
toolbox.viewSelection = model
base.selection = model
switch(toolbox.viewCategory)
{
case "material":

View file

@ -8,14 +8,14 @@ import UM 1.1 as UM
ScrollView
{
id: base
id: page
frameVisible: false
width: parent.width
height: parent.height
style: UM.Theme.styles.scrollview
Column
{
width: base.width
width: page.width
spacing: UM.Theme.getSize("default_margin").height
padding: UM.Theme.getSize("wide_margin").height
height: childrenRect.height + 2 * padding

View file

@ -8,7 +8,6 @@ import UM 1.1 as UM
Column
{
id: base
height: childrenRect.height
spacing: UM.Theme.getSize("toolbox_showcase_spacing").width
width: parent.width

View file

@ -64,7 +64,7 @@ Item
anchors.fill: parent
onClicked:
{
toolbox.viewSelection = model
base.selection = model
switch(toolbox.viewCategory)
{
case "material":

View file

@ -10,7 +10,7 @@ import UM 1.1 as UM
ScrollView
{
id: base
id: page
frameVisible: false
width: parent.width
height: parent.height
@ -68,7 +68,7 @@ ScrollView
Label
{
visible: toolbox.materialsInstalledModel.items.length > 0
width: base.width
width: page.width
text: catalog.i18nc("@title:tab", "Materials")
color: UM.Theme.getColor("text_medium")
font: UM.Theme.getFont("medium")

View file

@ -8,7 +8,6 @@ import UM 1.1 as UM
Item
{
id: base
property bool canUpdate: false
property bool isEnabled: true
height: UM.Theme.getSize("toolbox_installed_tile").height

View file

@ -7,7 +7,7 @@ import QtQuick.Controls.Styles 1.4
Rectangle
{
id: base
id: page
width: parent.width
height: parent.height
color: "transparent"

View file

@ -447,7 +447,7 @@
"toolbox_thumbnail_small": [6.0, 6.0],
"toolbox_thumbnail_medium": [8.0, 8.0],
"toolbox_thumbnail_large": [12.0, 12.0],
"toolbox_footer": [1.0, 5.5],
"toolbox_footer": [1.0, 4.5],
"toolbox_footer_button": [8.0, 2.5],
"toolbox_showcase_spacing": [1.0, 1.0],
"toolbox_header_tab": [8.0, 4.0],