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