Index: sources/gui/qml/components/USBButton.qml =================================================================== diff -u -r1a8e9578b27bb3877116675d0b2361ce4f5b5539 -r6c6f1f5d466badd9b4fd67be7c907234c342b2a2 --- sources/gui/qml/components/USBButton.qml (.../USBButton.qml) (revision 1a8e9578b27bb3877116675d0b2361ce4f5b5539) +++ sources/gui/qml/components/USBButton.qml (.../USBButton.qml) (revision 6c6f1f5d466badd9b4fd67be7c907234c342b2a2) @@ -1,15 +1,15 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2019-2023 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * - * \file USBButton.qml - * \author (last) Behrouz NematiPour - * \date (last) 08-Jan-2020 - * \author (original) Behrouz NematiPour - * \date (original) 23-Dec-2019 + * \file USBButton.qml + * \author (last) Behrouz NematiPour + * \date (last) 28-Sep-2022 + * \author (original) Behrouz NematiPour + * \date (original) 23-Dec-2019 * */ @@ -21,26 +21,23 @@ import "qrc:/components" TouchRect { id : _root + + property bool disabled : false + width: 50 height: width x: width - 10 Image { id: _image width : Variables.iconsDiameter height : Variables.iconsDiameter anchors.centerIn: parent - source : "qrc:/images/iEject" + source : disabled ? "qrc:/images/iEjectDisabled" + : "qrc:/images/iEjectEnabled" } text.font.pixelSize: Fonts.fontPixelButton * 0.75 onPressed : { _GuiView.doUSBDriveUmount() } - fading: ! _GuiView.usbReady && ! _GuiView.usbRemoved - - Connections { target: _GuiView - onDidUSBDriveRemove : _root.enabled = false - onDidUSBDriveMount : _root.enabled = true - onDidExportLog : _root.enabled = false - onDidExport : _root.enabled = true - } + fading: ! _GuiView.usbIsReady && ! _GuiView.usbIsRemoved }