2021-04-21 14:18:52 -04:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
|
|
|
|
Action {
|
|
|
|
property string wrapper
|
2021-08-24 18:34:24 +02:00
|
|
|
// adding this signal due to a known limitation from Qt: Menu closes when Action is triggered
|
|
|
|
signal actionTriggered()
|
2021-04-21 14:18:52 -04:00
|
|
|
icon.width: 12
|
|
|
|
icon.height: 16
|
2021-08-24 18:34:24 +02:00
|
|
|
onActionTriggered: checked ?
|
2021-04-21 15:46:58 -04:00
|
|
|
unwrapSelection(wrapper, textFormatMenu.selectedTextWithFormationChars) :
|
|
|
|
wrapSelection(wrapper)
|
2021-04-21 14:18:52 -04:00
|
|
|
checked: textFormatMenu.surroundedBy(wrapper)
|
|
|
|
}
|