Change the remove and the info buttons

Contributes to CURA-6005.
This commit is contained in:
Diego Prado Gesto 2018-12-17 13:38:41 +01:00
parent b7904d6e05
commit 02825a062f
7 changed files with 17 additions and 61 deletions

View file

@ -1,29 +0,0 @@
// Copyright (c) 2018 Ultimaker B.V.
import QtQuick 2.7
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3
import UM 1.1 as UM
ToolTip
{
id: tooltip
visible: parent.hovered
opacity: 0.9
delay: 500
background: Rectangle
{
color: UM.Theme.getColor("main_background")
border.color: UM.Theme.getColor("primary")
border.width: 1 * screenScaleFactor
}
contentItem: Label
{
text: tooltip.text
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
}
}

View file

@ -18,7 +18,7 @@ ListView
BackupListItem
{
id: backupListItem
width: parent.width
width: parent.width - UM.Theme.getSize("default_margin").width // Add a margin, otherwise the scrollbar is be on top of the right most component
}
Divider

View file

@ -18,7 +18,7 @@ RowLayout
{
id: infoButton
text: catalog.i18nc("@button", "Want more?")
iconSource: "../images/info.svg"
iconSource: UM.Theme.getIcon("info")
onClicked: Qt.openUrlExternally("https://goo.gl/forms/QACEP8pP3RV60QYG2")
visible: backupListFooter.showInfoButton
}
@ -28,7 +28,7 @@ RowLayout
id: createBackupButton
text: catalog.i18nc("@button", "Backup Now")
iconSource: "../images/backup.svg"
enabled: !CuraDrive.isCreatingBackup && !CuraDrive.isRestoringBackup
enabled: !CuraDrive.isCreatingBackup && !CuraDrive.isRestoringBackup && !backupListFooter.showInfoButton
onClicked: CuraDrive.createBackup()
busy: CuraDrive.isCreatingBackup
}

View file

@ -26,17 +26,17 @@ Item
RowLayout
{
id: dataRow
spacing: UM.Theme.getSize("default_margin").width * 2
spacing: UM.Theme.getSize("wide_margin").width
width: parent.width
height: 50 * screenScaleFactor
Cura.ActionButton
UM.SimpleButton
{
color: "transparent"
hoverColor: "transparent"
textColor: UM.Theme.getColor("text")
textHoverColor: UM.Theme.getColor("primary")
iconSource: "../images/info.svg"
width: UM.Theme.getSize("section_icon").width
height: UM.Theme.getSize("section_icon").height
color: UM.Theme.getColor("small_button_text")
hoverColor: UM.Theme.getColor("small_button_text_hover")
iconSource: UM.Theme.getIcon("info")
onClicked: backupListItem.showDetails = !backupListItem.showDetails
}
@ -65,21 +65,17 @@ Item
Cura.SecondaryButton
{
text: catalog.i18nc("@button", "Restore")
// color: "transparent"
// hoverColor: "transparent"
// textColor: UM.Theme.getColor("text")
// textHoverColor: UM.Theme.getColor("text_link")
enabled: !CuraDrive.isCreatingBackup && !CuraDrive.isRestoringBackup
onClicked: confirmRestoreDialog.visible = true
}
Cura.ActionButton
UM.SimpleButton
{
color: "transparent"
hoverColor: "transparent"
textColor: UM.Theme.getColor("setting_validation_error")
textHoverColor: UM.Theme.getColor("setting_validation_error")
iconSource: "../images/delete.svg"
width: UM.Theme.getSize("message_close").width
height: UM.Theme.getSize("message_close").height
color: UM.Theme.getColor("small_button_text")
hoverColor: UM.Theme.getColor("small_button_text_hover")
iconSource: UM.Theme.getIcon("cross1")
onClicked: confirmDeleteDialog.visible = true
}
}

View file

@ -1,7 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13" fill="red">
<switch>
<g>
<path d="M13 2.23L8.73 6.5 13 10.77l-2.135 2.134-4.269-4.269-4.27 4.269L.191 10.77l4.27-4.27-4.27-4.27L2.326.096l4.27 4.269L10.865.096z"/>
</g>
</switch>
</svg>

Before

Width:  |  Height:  |  Size: 281 B

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg">
<path d="M7.5 15C11.641 15 15 11.643 15 7.5 15 3.358 11.641 0 7.5 0 3.358 0 0 3.358 0 7.5 0 11.643 3.358 15 7.5 15ZM8.6 12.369L6.472 12.369 6.472 4.57 8.6 4.57 8.6 12.369ZM7.541 1.514C8.313 1.514 8.697 1.861 8.697 2.553 8.697 2.885 8.6 3.141 8.409 3.325 8.216 3.509 7.926 3.601 7.541 3.601 6.767 3.601 6.382 3.252 6.382 2.553 6.382 1.861 6.767 1.514 7.541 1.514Z"/>
</svg>

Before

Width:  |  Height:  |  Size: 499 B

View file

@ -55,7 +55,7 @@ Button
width: visible ? height : 0
sourceSize.width: width
sourceSize.height: height
color: button.hovered ? button.textHoverColor : button.textColor
color: button.enabled ? (button.hovered ? button.textHoverColor : button.textColor) : button.textDisabledColor
visible: source != "" && !button.isIconOnRightSide
anchors.verticalCenter: parent.verticalCenter
}