mirror of
https://github.com/status-im/status-desktop.git
synced 2025-03-02 23:41:18 +00:00
Introduced Style.svg() Style.png() Style.emoji() and Style.icon() in Style.qml. Those should be used to set the source in Images instead of using relative paths. Usage: Image { source: Style.svg("check) .... Also moved all Singletons inside a new "utils" folder and made it a QML module, to use import utils 1.0 instead of relative paths Closes #3678
39 lines
1.0 KiB
QML
39 lines
1.0 KiB
QML
import QtQuick 2.13
|
|
import QtQuick.Controls 2.13
|
|
import QtQuick.Layouts 1.13
|
|
|
|
import utils 1.0
|
|
import "../../../../shared"
|
|
import "../../../../shared/status"
|
|
|
|
StatusRadioButtonRow {
|
|
property string fleetName: ""
|
|
property string newFleet: ""
|
|
text: fleetName
|
|
buttonGroup: fleetSettings
|
|
checked: profileModel.fleets.fleet === text
|
|
onRadioCheckedChanged: {
|
|
if (checked) {
|
|
if (profileModel.fleets.fleet === fleetName) return;
|
|
newFleet = fleetName;
|
|
openPopup(confirmDialogComponent)
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: confirmDialogComponent
|
|
ConfirmationDialog {
|
|
//% "Warning!"
|
|
header.title: qsTrId("close-app-title")
|
|
//% "Change fleet to %1"
|
|
confirmationText: qsTrId("change-fleet-to--1").arg(newFleet)
|
|
onConfirmButtonClicked: profileModel.fleets.setFleet(newFleet)
|
|
onClosed: {
|
|
profileModel.fleets.triggerFleetChange()
|
|
destroy();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|