mirror of
https://github.com/shadoll/moma.git
synced 2026-08-28 11:33:25 +00:00
fix: Refactor resolution highlighting in MomaApp to improve label rendering
This commit is contained in:
+4
-4
@@ -256,11 +256,11 @@ class MomaApp(App):
|
|||||||
# Highlight the exact resolution token (e.g. "1080p") in the filename
|
# Highlight the exact resolution token (e.g. "1080p") in the filename
|
||||||
m = re.search(re.escape(frame_class), name, re.IGNORECASE)
|
m = re.search(re.escape(frame_class), name, re.IGNORECASE)
|
||||||
if m:
|
if m:
|
||||||
label.append(escape(name[:m.start()]))
|
label.append(name[:m.start()])
|
||||||
label.append(escape(name[m.start():m.end()]), style=color)
|
label.append(name[m.start():m.end()], style=color)
|
||||||
label.append(escape(name[m.end():]))
|
label.append(name[m.end():])
|
||||||
return label
|
return label
|
||||||
label.append(escape(name))
|
label.append(name)
|
||||||
return label
|
return label
|
||||||
|
|
||||||
def build_tree(self, path: Path, node):
|
def build_tree(self, path: Path, node):
|
||||||
|
|||||||
Reference in New Issue
Block a user