status-desktop/ui/imports/shared/status/StatusChatInputTextFormationAction.qml
Alexandra Betouni 426c116bac refactor(desktop) Made shared a QML module
Use it as import shared 1.0, import shared.controls 1.0
etc instead of import "../../../shared"

Closes #3934
2021-10-27 18:05:45 -04:00

15 lines
477 B
QML

import QtQuick 2.13
import QtQuick.Controls 2.13
Action {
property string wrapper
// adding this signal due to a known limitation from Qt: Menu closes when Action is triggered
signal actionTriggered()
icon.width: 12
icon.height: 16
onActionTriggered: checked ?
unwrapSelection(wrapper, textFormatMenu.selectedTextWithFormationChars) :
wrapSelection(wrapper)
checked: textFormatMenu.surroundedBy(wrapper)
}