Make opacity depend on enabled

Simplifies the code a bit.

Contributes to issue CURA-5128.
This commit is contained in:
Ghostkeeper 2018-03-23 14:23:10 +01:00
parent e8491b4a83
commit 8a36f1e074
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -1,4 +1,4 @@
// Copyright (c) 2017 Ultimaker B.V. // Copyright (c) 2018 Ultimaker B.V.
// PluginBrowser is released under the terms of the LGPLv3 or higher. // PluginBrowser is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
@ -140,17 +140,7 @@ Component {
return true return true
} }
} }
opacity: opacity: enabled ? 1.0 : 0.5
{
if ( pluginList.activePlugin == model )
{
return 1.0
}
else
{
manager.isDownloading ? 0.5 : 1.0
}
}
visible: model.external && ((model.status !== "installed") || model.can_upgrade) visible: model.external && ((model.status !== "installed") || model.can_upgrade)
style: ButtonStyle { style: ButtonStyle {
background: Rectangle { background: Rectangle {