mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 13:45:52 +08:00
boy scouting
CURA-8975
This commit is contained in:
parent
f9a5cb33fd
commit
418f88a4da
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2019 Ultimaker B.V.
|
// Copyright (c) 2022 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
@ -26,7 +26,7 @@ Item
|
|||||||
id: brand_header_background
|
id: brand_header_background
|
||||||
color:
|
color:
|
||||||
{
|
{
|
||||||
if(!expanded && sectionName == materialList.currentBrand)
|
if (!expanded && sectionName == materialList.currentBrand)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("favorites_row_selected")
|
return UM.Theme.getColor("favorites_row_selected")
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ Item
|
|||||||
text: sectionName
|
text: sectionName
|
||||||
height: UM.Theme.getSize("favorites_row").height
|
height: UM.Theme.getSize("favorites_row").height
|
||||||
width: parent.width - UM.Theme.getSize("favorites_button").width
|
width: parent.width - UM.Theme.getSize("favorites_button").width
|
||||||
leftPadding: (UM.Theme.getSize("default_margin").width / 2) | 0
|
leftPadding: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
||||||
}
|
}
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2022 Ultimaker B.V.
|
||||||
// Uranium is released under the terms of the LGPLv3 or higher.
|
// Uranium is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 2.4
|
||||||
import QtQuick.Layouts 1.3
|
|
||||||
|
|
||||||
import UM 1.2 as UM
|
import UM 1.5 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.5 as Cura
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
@ -51,26 +50,18 @@ Item
|
|||||||
materialProperties.approximate_diameter = currentItem.approximate_diameter || "0"
|
materialProperties.approximate_diameter = currentItem.approximate_diameter || "0"
|
||||||
}
|
}
|
||||||
|
|
||||||
Item
|
// Material title Label
|
||||||
{
|
UM.Label {
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
Item // Material title Label
|
|
||||||
{
|
|
||||||
id: profileName
|
id: profileName
|
||||||
|
|
||||||
width: parent.width
|
|
||||||
height: childrenRect.height
|
|
||||||
|
|
||||||
Label {
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
text: materialProperties.name
|
text: materialProperties.name
|
||||||
font: UM.Theme.getFont("large_bold")
|
font: UM.Theme.getFont("large_bold")
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
MaterialsView // Material detailed information view below the title Label
|
// Material detailed information view below the title Label
|
||||||
|
MaterialsView
|
||||||
{
|
{
|
||||||
id: materialDetailsView
|
id: materialDetailsView
|
||||||
anchors
|
anchors
|
||||||
@ -117,5 +108,4 @@ Item
|
|||||||
property string description: "";
|
property string description: "";
|
||||||
property string adhesion_info: "";
|
property string adhesion_info: "";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2019 Ultimaker B.V.
|
// Copyright (c) 2022 Ultimaker B.V.
|
||||||
// Uranium is released under the terms of the LGPLv3 or higher.
|
// Uranium is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
@ -14,7 +14,6 @@ Item
|
|||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
|
||||||
// Children
|
// Children
|
||||||
UM.I18nCatalog { id: catalog; name: "cura"; }
|
|
||||||
Cura.MaterialBrandsModel
|
Cura.MaterialBrandsModel
|
||||||
{
|
{
|
||||||
id: materialsModel
|
id: materialsModel
|
||||||
|
@ -5,8 +5,8 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.1
|
import QtQuick.Controls 2.1
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
import UM 1.2 as UM
|
import UM 1.5 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.5 as Cura
|
||||||
|
|
||||||
// A single material row, typically used in a MaterialsBrandSection
|
// A single material row, typically used in a MaterialsBrandSection
|
||||||
|
|
||||||
@ -19,17 +19,16 @@ Rectangle
|
|||||||
|
|
||||||
height: UM.Theme.getSize("favorites_row").height
|
height: UM.Theme.getSize("favorites_row").height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
//color: material != null ? (base.currentItem.root_material_id == material.root_material_id ? UM.Theme.getColor("favorites_row_selected") : "transparent") : "transparent"
|
|
||||||
color:
|
color:
|
||||||
{
|
{
|
||||||
if(material !== null && base.currentItem !== null)
|
if (material !== null && base.currentItem !== null)
|
||||||
{
|
{
|
||||||
if(base.currentItem.root_material_id === material.root_material_id)
|
if (base.currentItem.root_material_id === material.root_material_id)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("favorites_row_selected")
|
return UM.Theme.getColor("favorites_row_selected");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "transparent"
|
return "transparent";
|
||||||
}
|
}
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
@ -42,7 +41,7 @@ Rectangle
|
|||||||
anchors.left: materialSlot.left
|
anchors.left: materialSlot.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
Label
|
UM.Label
|
||||||
{
|
{
|
||||||
text: material != null ? material.brand + " " + material.name : ""
|
text: material != null ? material.brand + " " + material.name : ""
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2022 Ultimaker B.V.
|
||||||
// Uranium is released under the terms of the LGPLv3 or higher.
|
// Uranium is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
@ -18,14 +18,14 @@ Item
|
|||||||
property var expanded: materialList.expandedTypes.indexOf(materialBrand + "_" + materialName) > -1
|
property var expanded: materialList.expandedTypes.indexOf(materialBrand + "_" + materialName) > -1
|
||||||
property var colorsModel: materialType != null ? materialType.colors: null
|
property var colorsModel: materialType != null ? materialType.colors: null
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
width: parent ? parent.width :undefined
|
width: parent ? parent.width : undefined
|
||||||
anchors.left: parent ? parent.left : undefined
|
anchors.left: parent ? parent.left : undefined
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: material_type_header_background
|
id: material_type_header_background
|
||||||
color:
|
color:
|
||||||
{
|
{
|
||||||
if(!expanded && materialBrand + "_" + materialName == materialList.currentType)
|
if (!expanded && `${materialBrand}_${materialName}` == materialList.currentType)
|
||||||
{
|
{
|
||||||
return UM.Theme.getColor("favorites_row_selected")
|
return UM.Theme.getColor("favorites_row_selected")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user