mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-29 23:34:32 +08:00
Changed the installed button to be a secondary button
CURA-6006
This commit is contained in:
parent
9eb09132d6
commit
eaf413997d
@ -16,11 +16,14 @@ Column
|
|||||||
width: UM.Theme.getSize("toolbox_action_button").width
|
width: UM.Theme.getSize("toolbox_action_button").width
|
||||||
spacing: UM.Theme.getSize("narrow_margin").height
|
spacing: UM.Theme.getSize("narrow_margin").height
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
width: installButton.width
|
||||||
|
height: installButton.height
|
||||||
ToolboxProgressButton
|
ToolboxProgressButton
|
||||||
{
|
{
|
||||||
id: installButton
|
id: installButton
|
||||||
active: toolbox.isDownloading && toolbox.activePackage == model
|
active: toolbox.isDownloading && toolbox.activePackage == model
|
||||||
complete: installed
|
|
||||||
onReadyAction:
|
onReadyAction:
|
||||||
{
|
{
|
||||||
toolbox.activePackage = model
|
toolbox.activePackage = model
|
||||||
@ -28,12 +31,21 @@ Column
|
|||||||
}
|
}
|
||||||
onActiveAction: toolbox.cancelDownload()
|
onActiveAction: toolbox.cancelDownload()
|
||||||
|
|
||||||
onCompleteAction: toolbox.viewCategory = "installed"
|
|
||||||
|
|
||||||
// Don't allow installing while another download is running
|
// Don't allow installing while another download is running
|
||||||
enabled: installed || (!(toolbox.isDownloading && toolbox.activePackage != model) && !loginRequired)
|
enabled: installed || (!(toolbox.isDownloading && toolbox.activePackage != model) && !loginRequired)
|
||||||
opacity: enabled ? 1.0 : 0.5
|
opacity: enabled ? 1.0 : 0.5
|
||||||
visible: !updateButton.visible // Don't show when the update button is visible
|
visible: !updateButton.visible && !installed// Don't show when the update button is visible
|
||||||
|
}
|
||||||
|
|
||||||
|
Cura.SecondaryButton
|
||||||
|
{
|
||||||
|
visible: installed
|
||||||
|
onClicked: toolbox.viewCategory = "installed"
|
||||||
|
text: catalog.i18nc("@action:button", "Installed")
|
||||||
|
fixedWidthMode: true
|
||||||
|
width: installButton.width
|
||||||
|
height: installButton.height
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
|
@ -7,6 +7,7 @@ import QtQuick.Controls.Styles 1.4
|
|||||||
import UM 1.1 as UM
|
import UM 1.1 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
|
// TODO; This is in quite some need for refactoring.
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
|
Loading…
x
Reference in New Issue
Block a user