Fix padding in the installed tab

This commit is contained in:
Diego Prado Gesto 2019-05-09 17:04:27 +02:00
parent 39aa5fedf5
commit a62f4eb1d2
3 changed files with 11 additions and 15 deletions

View file

@ -2,9 +2,7 @@
// Toolbox is released under the terms of the LGPLv3 or higher. // Toolbox is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 1.4 import QtQuick.Controls 2.3
import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.3
import UM 1.1 as UM import UM 1.1 as UM
Column Column

View file

@ -7,6 +7,7 @@ import UM 1.1 as UM
ScrollView ScrollView
{ {
id: base
clip: true clip: true
width: parent.width width: parent.width
height: parent.height height: parent.height

View file

@ -15,31 +15,26 @@ ScrollView
Column Column
{ {
width: page.width
spacing: UM.Theme.getSize("default_margin").height spacing: UM.Theme.getSize("default_margin").height
padding: UM.Theme.getSize("wide_margin").width
visible: toolbox.pluginsInstalledModel.items.length > 0 visible: toolbox.pluginsInstalledModel.items.length > 0
height: childrenRect.height + 4 * UM.Theme.getSize("default_margin").height height: childrenRect.height + 2 * UM.Theme.getSize("wide_margin").height
anchors
{
right: parent.right
left: parent.left
margins: UM.Theme.getSize("default_margin").width
top: parent.top
}
Label Label
{ {
width: page.width width: parent.width - 2 * parent.padding
text: catalog.i18nc("@title:tab", "Plugins") text: catalog.i18nc("@title:tab", "Plugins")
color: UM.Theme.getColor("text_medium") color: UM.Theme.getColor("text_medium")
font: UM.Theme.getFont("large") font: UM.Theme.getFont("large")
renderType: Text.NativeRendering renderType: Text.NativeRendering
} }
Rectangle Rectangle
{ {
id: installedPlugins id: installedPlugins
color: "transparent" color: "transparent"
width: parent.width width: parent.width - 2 * parent.padding
height: childrenRect.height + UM.Theme.getSize("default_margin").width height: childrenRect.height + UM.Theme.getSize("default_margin").width
border.color: UM.Theme.getColor("lining") border.color: UM.Theme.getColor("lining")
border.width: UM.Theme.getSize("default_lining").width border.width: UM.Theme.getSize("default_lining").width
@ -60,8 +55,10 @@ ScrollView
} }
} }
} }
Label Label
{ {
width: parent.width - 2 * parent.padding
text: catalog.i18nc("@title:tab", "Materials") text: catalog.i18nc("@title:tab", "Materials")
color: UM.Theme.getColor("text_medium") color: UM.Theme.getColor("text_medium")
font: UM.Theme.getFont("medium") font: UM.Theme.getFont("medium")
@ -72,7 +69,7 @@ ScrollView
{ {
id: installedMaterials id: installedMaterials
color: "transparent" color: "transparent"
width: parent.width width: parent.width - 2 * parent.padding
height: childrenRect.height + UM.Theme.getSize("default_margin").width height: childrenRect.height + UM.Theme.getSize("default_margin").width
border.color: UM.Theme.getColor("lining") border.color: UM.Theme.getColor("lining")
border.width: UM.Theme.getSize("default_lining").width border.width: UM.Theme.getSize("default_lining").width