| 1 |
/* |
| 2 |
* Audacity: A Digital Audio Editor |
| 3 |
*/ |
| 4 |
import QtQuick 2.15 |
| 5 |
import QtQuick.Controls 2.15 |
| 6 |
import QtQuick.Layouts 1.15 |
| 7 |
|
| 8 |
import Muse.Ui 1.0 |
| 9 |
import Muse.UiComponents 1.0 |
| 10 |
|
| 11 |
import Audacity.Playback 1.0 |
| 12 |
|
| 13 |
ListItemBlank { |
| 14 |
id: root |
| 15 |
|
| 16 |
property var value: null |
| 17 |
property bool isEditable: false |
| 18 |
|
| 19 |
width: isEditable ? 12 : (value === " " ? 1 : symbolField.implicitWidth) |
| 20 |
height: 28 |
| 21 |
|
| 22 |
mouseArea.enabled: isEditable |
| 23 |
|
| 24 |
opacity: enabled ? 1.0 : ui.theme.itemOpacityDisabled |
| 25 |
|
| 26 |
StyledTextLabel { |
| 27 |
id: symbolField |
| 28 |
|
| 29 |
anchors.verticalCenter: parent.verticalCenter |
| 30 |
anchors.horizontalCenter: parent.horizontalCenter |
| 31 |
|
| 32 |
text: root.value |
| 33 |
opacity: root.isEditable ? 1 : 0.75 |
| 34 |
font: ui.theme.tabBoldFont |
| 35 |
color: ui.theme.fontSecondaryColor |
| 36 |
} |
| 37 |
} |