CURA-4319 material compatibility link style

This commit is contained in:
ChrisTerBeke 2017-09-12 13:24:33 +02:00
parent 9b33bc8194
commit 3a098f4b4c
2 changed files with 11 additions and 19 deletions

View File

@ -351,14 +351,12 @@ Column
rightMargin: UM.Theme.getSize("sidebar_margin").width rightMargin: UM.Theme.getSize("sidebar_margin").width
} }
Item Item {
{
height: UM.Theme.getSize("sidebar_setup").height height: UM.Theme.getSize("sidebar_setup").height
anchors.right: parent.right anchors.right: parent.right
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width
UM.RecolorImage UM.RecolorImage {
{
id: warningImage id: warningImage
anchors.right: materialInfoLabel.left anchors.right: materialInfoLabel.left
anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.rightMargin: UM.Theme.getSize("default_margin").width
@ -366,40 +364,33 @@ Column
source: UM.Theme.getIcon("warning") source: UM.Theme.getIcon("warning")
width: UM.Theme.getSize("section_icon").width width: UM.Theme.getSize("section_icon").width
height: UM.Theme.getSize("section_icon").height height: UM.Theme.getSize("section_icon").height
//sourceSize.width: width + 5
//sourceSize.height: width + 5
color: UM.Theme.getColor("material_compatibility_warning") color: UM.Theme.getColor("material_compatibility_warning")
visible: !Cura.MachineManager.isCurrentSetupSupported visible: !Cura.MachineManager.isCurrentSetupSupported
} }
Text Text {
{
id: materialInfoLabel id: materialInfoLabel
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: catalog.i18nc("@label", "Check material compatibility") text: catalog.i18nc("@label", "<a href='%1'>Check material compatibility</a>")
font: UM.Theme.getFont("default"); font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
linkColor: UM.Theme.getColor("text_link")
verticalAlignment: Text.AlignTop verticalAlignment: Text.AlignTop
anchors.top: parent.top anchors.top: parent.top
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
color: UM.Theme.getColor("text")
MouseArea MouseArea {
{
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onClicked: onClicked: {
{
// open the material URL with web browser // open the material URL with web browser
var version = UM.Application.version; var version = UM.Application.version;
var machineName = Cura.MachineManager.activeMachine.definition.id; var machineName = Cura.MachineManager.activeMachine.definition.id;
var url = "https://ultimaker.com/materialcompatibility/" + version + "/" + machineName; var url = "https://ultimaker.com/materialcompatibility/" + version + "/" + machineName;
Qt.openUrlExternally(url); Qt.openUrlExternally(url);
} }
onEntered: onEntered: {
{
var content = catalog.i18nc("@tooltip", "Click to check the material compatibility on Ultimaker.com."); var content = catalog.i18nc("@tooltip", "Click to check the material compatibility on Ultimaker.com.");
base.showTooltip( base.showTooltip(
materialInfoRow, materialInfoRow,

View File

@ -693,6 +693,7 @@ QtObject {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.margins: UM.Theme.getSize("default_margin").width / 4 anchors.margins: UM.Theme.getSize("default_margin").width / 4
radius: width / 2 radius: width / 2
color: (control.color_override !== "") ? control.color_override : control.color color: (control.color_override !== "") ? control.color_override : control.color
} }