fix(ViperQtProject): indicator 加透明占位背景使 QSS 接管图标绘制

This commit is contained in:
TermiNexus committed 2026-09-03 11:33:31 +08:00
1 parent b12873d513
commit 07f16ae1a6
1 file changed
+2 -2
+2 -2
View File
@@ -474,8 +474,8 @@ def ApplyIndicatorIcons(ptr: t.CPtr, is_tree: int):
uon: bytes = stdlib.malloc(640)
vqt6.vqt6_asset_url_utf8(uoff, 640, "assets/check_off.png")
vqt6.vqt6_asset_url_utf8(uon, 640, "assets/check_on.png")
buf: bytes = stdlib.malloc(1500)
viperlib.snprintf(buf, 1500, "%s::indicator { width: 16px; height: 16px; } %s::indicator:unchecked { image: url(%s); } %s::indicator:checked { image: url(%s); }", sel, sel, uoff, sel, uon)
buf: bytes = stdlib.malloc(1600)
viperlib.snprintf(buf, 1600, "%s::indicator { width: 16px; height: 16px; background-color: transparent; background-repeat: no-repeat; background-position: center; } %s::indicator:unchecked { image: url(%s); } %s::indicator:checked { image: url(%s); }", sel, sel, uoff, sel, uon)
vqt6.vqt6_qwidget_set_stylesheet_utf8(ptr, buf)
stdlib.free(uoff)
stdlib.free(uon)