mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 06:16:07 +08:00
Add a simplistic design for a card for each package
It just displays the package name for now. Contributes to issue CURA-8556.
This commit is contained in:
parent
031c8efbe6
commit
1320d8c9f4
@ -4,16 +4,41 @@
|
|||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import Cura 1.7 as Cura
|
import Cura 1.7 as Cura
|
||||||
|
import UM 1.0 as UM
|
||||||
|
|
||||||
Column
|
ScrollView
|
||||||
{
|
{
|
||||||
Repeater
|
clip: true
|
||||||
{
|
|
||||||
model: Cura.PackageList{}
|
|
||||||
|
|
||||||
Label
|
Column
|
||||||
|
{
|
||||||
|
id: pluginColumn
|
||||||
|
width: parent.width
|
||||||
|
spacing: UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
|
Repeater
|
||||||
{
|
{
|
||||||
text: "Test" //TODO: Create a card for each package.
|
model: Cura.PackageList{}
|
||||||
|
|
||||||
|
delegate: Rectangle
|
||||||
|
{
|
||||||
|
width: pluginColumn.width
|
||||||
|
height: UM.Theme.getSize("card").height
|
||||||
|
|
||||||
|
color: UM.Theme.getColor("main_background")
|
||||||
|
radius: UM.Theme.getSize("default_radius").width
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: (parent.height - height) / 2
|
||||||
|
|
||||||
|
text: model.package.displayName
|
||||||
|
font: UM.Theme.getFont("medium_bold")
|
||||||
|
color: UM.Theme.getColor("text")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -553,6 +553,7 @@
|
|||||||
|
|
||||||
"standard_list_lineheight": [1.5, 1.5],
|
"standard_list_lineheight": [1.5, 1.5],
|
||||||
"standard_arrow": [1.0, 1.0],
|
"standard_arrow": [1.0, 1.0],
|
||||||
|
"card": [25.0, 8.75],
|
||||||
|
|
||||||
"button": [4, 4],
|
"button": [4, 4],
|
||||||
"button_icon": [2.5, 2.5],
|
"button_icon": [2.5, 2.5],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user