mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
CURA-5035 Added thumbnails and detail view
This commit is contained in:
parent
15b8d18da8
commit
dc00156410
6 changed files with 187 additions and 18 deletions
|
@ -17,10 +17,10 @@ Window
|
|||
property bool dataReady: manager.dataReady
|
||||
title: catalog.i18nc("@title:tab", "Toolbox");
|
||||
modality: Qt.ApplicationModal
|
||||
width: 800 * screenScaleFactor
|
||||
width: 960 * screenScaleFactor
|
||||
height: 640 * screenScaleFactor
|
||||
minimumWidth: 800 * screenScaleFactor
|
||||
maximumWidth: 800 * screenScaleFactor
|
||||
minimumWidth: 960 * screenScaleFactor
|
||||
maximumWidth: 960 * screenScaleFactor
|
||||
minimumHeight: 350 * screenScaleFactor
|
||||
color: UM.Theme.getColor("sidebar")
|
||||
Item
|
||||
|
|
|
@ -72,12 +72,13 @@ Item
|
|||
right: parent.right
|
||||
}
|
||||
height: UM.Theme.getSize("base_unit").height * 12
|
||||
Rectangle
|
||||
Image
|
||||
{
|
||||
id: thumbnail
|
||||
width: UM.Theme.getSize("toolbox_thumbnail_medium").width
|
||||
height: UM.Theme.getSize("toolbox_thumbnail_medium").height
|
||||
color: "grey"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: manager.detailData["icon_url"] || "../images/logobot.svg"
|
||||
anchors
|
||||
{
|
||||
top: parent.top
|
||||
|
@ -99,21 +100,21 @@ Item
|
|||
spacing: Math.floor(UM.Theme.getSize("default_margin").height/2)
|
||||
Label
|
||||
{
|
||||
text: "DSM"
|
||||
text: manager.detailData["type"] == "material" ? manager.detailData["author"] : manager.detailData["name"]
|
||||
font: UM.Theme.getFont("large")
|
||||
wrapMode: Text.WordWrap
|
||||
width: parent.width
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: "Sets the horizontal and vertical alignment of the text within the Text items width and height. By default, the text is vertically aligned to the top."
|
||||
text: manager.detailData["description"]
|
||||
font: UM.Theme.getFont("default")
|
||||
wrapMode: Text.WordWrap
|
||||
width: parent.width
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: "Author: " + "DSM"
|
||||
text: "Author: " + manager.detailData["author"]["name"]
|
||||
font: UM.Theme.getFont("small")
|
||||
wrapMode: Text.WordWrap
|
||||
width: parent.width
|
||||
|
|
|
@ -26,6 +26,13 @@ Item
|
|||
height: UM.Theme.getSize("toolbox_thumbnail_small").height
|
||||
color: "white"
|
||||
border.width: 1
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
width: UM.Theme.getSize("toolbox_thumbnail_small").width - 26
|
||||
height: UM.Theme.getSize("toolbox_thumbnail_small").height - 26
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: model.icon_url || "../images/logobot.svg"
|
||||
}
|
||||
}
|
||||
Column
|
||||
{
|
||||
|
|
|
@ -6,9 +6,6 @@ import QtQuick.Dialogs 1.1
|
|||
import QtQuick.Window 2.2
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
|
||||
// TODO: Switch to QtQuick.Controls 2.x and remove QtQuick.Controls.Styles
|
||||
|
||||
import UM 1.1 as UM
|
||||
|
||||
Window {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue