mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-03 01:04:35 +08:00
CURA-5137 Make some adjustments in the UI.
This commit is contained in:
parent
0e01e9a6a9
commit
2bf6615b53
@ -12,7 +12,7 @@ import QtQuick.Controls.Styles 1.4
|
|||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
|
|
||||||
Window
|
Window
|
||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
title: catalog.i18nc("@title:tab", "Toolbox");
|
title: catalog.i18nc("@title:tab", "Toolbox");
|
||||||
modality: Qt.ApplicationModal
|
modality: Qt.ApplicationModal
|
||||||
@ -75,9 +75,6 @@ Window
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||||
|
|
||||||
Connections
|
Connections
|
||||||
|
@ -11,30 +11,23 @@ import UM 1.1 as UM
|
|||||||
|
|
||||||
// TODO: Switch to QtQuick.Controls 2.x and remove QtQuick.Controls.Styles
|
// TODO: Switch to QtQuick.Controls 2.x and remove QtQuick.Controls.Styles
|
||||||
|
|
||||||
Rectangle
|
Column
|
||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
width: parent.width
|
height: childrenRect.height
|
||||||
height: childrenRect.height + UM.Theme.getSize("double_margin").height * 8
|
spacing: UM.Theme.getSize("base_unit").height
|
||||||
color: "transparent"
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: heading
|
id: heading
|
||||||
text: "Community Plugins"
|
text: "Community Plugins"
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: UM.Theme.getSize("base_unit").width * 4
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
color: UM.Theme.getColor("text_medium")
|
color: UM.Theme.getColor("text_medium")
|
||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
}
|
}
|
||||||
GridLayout
|
GridLayout
|
||||||
{
|
{
|
||||||
id: grid
|
id: grid
|
||||||
width: base.width
|
width: parent.width
|
||||||
anchors
|
|
||||||
{
|
|
||||||
top: heading.bottom
|
|
||||||
}
|
|
||||||
columns: 3
|
columns: 3
|
||||||
columnSpacing: UM.Theme.getSize("base_unit").width
|
columnSpacing: UM.Theme.getSize("base_unit").width
|
||||||
rowSpacing: UM.Theme.getSize("base_unit").height
|
rowSpacing: UM.Theme.getSize("base_unit").height
|
||||||
@ -42,7 +35,10 @@ Rectangle
|
|||||||
Repeater
|
Repeater
|
||||||
{
|
{
|
||||||
model: manager.packagesModel
|
model: manager.packagesModel
|
||||||
delegate: ToolboxGridTile {}
|
delegate: ToolboxGridTile
|
||||||
|
{
|
||||||
|
Layout.preferredWidth: (grid.width - (grid.columns - 1) * grid.columnSpacing) / grid.columns
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
Layout.fillWidth: true
|
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@ -29,22 +29,28 @@ Item
|
|||||||
}
|
}
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
width: UM.Theme.getSize("base_unit").width * 12
|
width: parent.width - thumbnail.width - parent.spacing
|
||||||
|
spacing: Math.floor(UM.Theme.getSize("base_unit").width / 2)
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: name
|
id: name
|
||||||
text: model.name
|
text: model.name
|
||||||
width: parent.width
|
width: parent.width
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
height: UM.Theme.getSize("base_unit").height * 2
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
font: UM.Theme.getFont("default_bold")
|
font: UM.Theme.getFont("default_bold")
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: info
|
id: info
|
||||||
text: model.description
|
text:
|
||||||
|
{
|
||||||
|
if (model.description.length > 50)
|
||||||
|
{
|
||||||
|
return model.description.substring(0, 50) + "..."
|
||||||
|
}
|
||||||
|
return model.description
|
||||||
|
}
|
||||||
width: parent.width
|
width: parent.width
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
color: UM.Theme.getColor("text_medium")
|
color: UM.Theme.getColor("text_medium")
|
||||||
|
@ -10,45 +10,30 @@ import UM 1.1 as UM
|
|||||||
|
|
||||||
// TODO: Switch to QtQuick.Controls 2.x and remove QtQuick.Controls.Styles
|
// TODO: Switch to QtQuick.Controls 2.x and remove QtQuick.Controls.Styles
|
||||||
|
|
||||||
Rectangle
|
Column
|
||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
width: parent.width
|
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
color: "transparent"
|
spacing: UM.Theme.getSize("base_unit").height
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: heading
|
id: heading
|
||||||
text: "Top Downloads"
|
text: "Top Downloads"
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: UM.Theme.getSize("base_unit").width * 4
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
color: UM.Theme.getColor("text_medium")
|
color: UM.Theme.getColor("text_medium")
|
||||||
font: UM.Theme.getFont("medium")
|
font: UM.Theme.getFont("medium")
|
||||||
}
|
}
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
width: childrenRect.width
|
|
||||||
spacing: UM.Theme.getSize("base_unit").width * 2
|
spacing: UM.Theme.getSize("base_unit").width * 2
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
top: heading.bottom
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolboxShowcaseTile {}
|
ToolboxShowcaseTile {}
|
||||||
ToolboxShowcaseTile {}
|
ToolboxShowcaseTile {}
|
||||||
ToolboxShowcaseTile {}
|
ToolboxShowcaseTile {}
|
||||||
}
|
}
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
color: UM.Theme.getColor("text_medium")
|
|
||||||
width: parent.width
|
|
||||||
height: UM.Theme.getSize("base_unit").height / 6
|
|
||||||
anchors
|
|
||||||
{
|
|
||||||
bottom: parent.bottom
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2018 Ultimaker B.V.
|
||||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.7
|
||||||
import QtQuick.Dialogs 1.1
|
import QtQuick.Dialogs 1.1
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
@ -12,29 +12,31 @@ import UM 1.1 as UM
|
|||||||
ScrollView
|
ScrollView
|
||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
frameVisible: false
|
frameVisible: true
|
||||||
anchors.fill: parent
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
style: UM.Theme.styles.scrollview
|
style: UM.Theme.styles.scrollview
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
width: base.width
|
width: base.width
|
||||||
spacing: UM.Theme.getSize("base_unit").height
|
spacing: UM.Theme.getSize("base_unit").height
|
||||||
height: childrenRect.height
|
padding: UM.Theme.getSize("base_unit").height * 2
|
||||||
anchors
|
height: childrenRect.height + 2 * padding
|
||||||
{
|
|
||||||
fill: parent
|
|
||||||
topMargin: UM.Theme.getSize("base_unit").height
|
|
||||||
bottomMargin: UM.Theme.getSize("base_unit").height
|
|
||||||
leftMargin: UM.Theme.getSize("base_unit").width * 2
|
|
||||||
rightMargin: UM.Theme.getSize("base_unit").width * 2
|
|
||||||
}
|
|
||||||
ToolboxShowcase
|
ToolboxShowcase
|
||||||
{
|
{
|
||||||
id: showcase
|
id: showcase
|
||||||
|
width: parent.width - 2 * parent.padding
|
||||||
|
}
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
color: UM.Theme.getColor("text_medium")
|
||||||
|
width: parent.width - 2 * parent.padding
|
||||||
|
height: UM.Theme.getSize("base_unit").height / 6
|
||||||
}
|
}
|
||||||
ToolboxGrid
|
ToolboxGrid
|
||||||
{
|
{
|
||||||
id: allPlugins
|
id: allPlugins
|
||||||
|
width: parent.width - 2 * parent.padding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user