feat(ProfileShowcase): Save changes tooltip when disabled
- Replaced current `StatusButton` type to `DisabledTootipButton` to allow tooltip displayed when disabled in dirty toast message. - Added needed conditions in `MyProfileView` where the tooltip when the save changes is disabled. Closes #13334
This commit is contained in:
parent
a1c2d9a4b2
commit
edf7e82932
|
@ -57,6 +57,9 @@ SettingsContentBase {
|
|||
priv.hasAnyProfileShowcaseChanges
|
||||
saveChangesButtonEnabled: !!descriptionPanel.displayName.text && descriptionPanel.displayName.valid
|
||||
|
||||
toast.saveChangesTooltipVisible: root.dirty
|
||||
toast.saveChangesTooltipText: qsTr("Invalid changes made to Identity")
|
||||
|
||||
onResetChangesClicked: priv.reset()
|
||||
|
||||
onSaveChangesClicked: priv.save()
|
||||
|
|
|
@ -4,6 +4,8 @@ import QtGraphicalEffects 1.15
|
|||
|
||||
import utils 1.0
|
||||
|
||||
import shared.controls 1.0
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
|
@ -16,6 +18,8 @@ Rectangle {
|
|||
property bool saveChangesButtonEnabled: false
|
||||
property bool saveForLaterButtonVisible
|
||||
property alias saveChangesText: saveChangesButton.text
|
||||
property alias saveChangesTooltipText: saveChangesButton.tooltipText
|
||||
property alias saveChangesTooltipVisible: saveChangesButton.enabled
|
||||
property alias saveForLaterText: saveForLaterButton.text
|
||||
property alias cancelChangesText: cancelChangesButton.text
|
||||
property alias changesDetectedText: changesDetectedTextItem.text
|
||||
|
@ -139,11 +143,13 @@ Rectangle {
|
|||
onClicked: root.saveForLaterClicked()
|
||||
}
|
||||
|
||||
StatusButton {
|
||||
DisabledTooltipButton {
|
||||
id: saveChangesButton
|
||||
objectName: "settingsDirtyToastMessageSaveButton"
|
||||
enabled: root.active && root.saveChangesButtonEnabled
|
||||
buttonType: DisabledTooltipButton.Normal
|
||||
text: qsTr("Save changes")
|
||||
enabled: false
|
||||
interactive: root.active && root.saveChangesButtonEnabled
|
||||
onClicked: root.saveChangesClicked()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue