Skip to content

Commit

Permalink
Add syncedlyrics to tags requiring multiline edit
Browse files Browse the repository at this point in the history
  • Loading branch information
phw committed Mar 23, 2024
1 parent ffa90e3 commit 647fc3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion picard/ui/edittagdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@
AUTOCOMPLETE_RELEASE_COUNTRIES = sorted(RELEASE_COUNTRIES, key=str.casefold)
AUTOCOMPLETE_RELEASE_FORMATS = sorted(RELEASE_FORMATS, key=str.casefold)

MULTILINE_TAGS = {'comment', 'lyrics', 'syncedlyrics'}


class TagEditorDelegate(QtWidgets.QItemDelegate):

def createEditor(self, parent, option, index):
if not index.isValid():
return None
tag = self.get_tag_name(index)
if tag.partition(':')[0] in {'comment', 'lyrics'}:
if tag.partition(':')[0] in MULTILINE_TAGS:
editor = QtWidgets.QPlainTextEdit(parent)
editor.setFrameStyle(editor.style().styleHint(QtWidgets.QStyle.StyleHint.SH_ItemView_DrawDelegateFrame, None, editor))
editor.setMinimumSize(QtCore.QSize(0, 80))
Expand Down

0 comments on commit 647fc3b

Please sign in to comment.