Fixed: RCC export file format incorrect #44

This commit is contained in:
Yeison Cardona 2021-12-20 12:05:36 -05:00
parent 9708d4a9d2
commit 21fda8a692
3 changed files with 77 additions and 67 deletions

View File

@ -11,6 +11,9 @@ extra = {
'font_family': 'monoespace',
'font_size': '14px',
'line_height': '14px',
# Density Scale
'density_scale': '0',
}

View File

@ -1,77 +1,81 @@
<RCC>
<qresource prefix="icon">
<file>theme/disabled/float.svg</file>
<file>theme/disabled/base.svg</file>
<file>theme/disabled/close.svg</file>
<file>theme/disabled/checklist_indeterminate.svg</file>
<file>theme/disabled/downarrow.svg</file>
<file>theme/disabled/checklist_invert.svg</file>
<file>theme/disabled/uparrow2.svg</file>
<file>theme/disabled/vline.svg</file>
<file>theme/disabled/tab_close.svg</file>
<file>theme/disabled/branch-end.svg</file>
<file>theme/disabled/checkbox_indeterminate.svg</file>
<file>theme/disabled/rightarrow2.svg</file>
<file>theme/disabled/radiobutton_unchecked.svg</file>
<file>theme/disabled/branch-closed.svg</file>
<file>theme/disabled/splitter-horizontal.svg</file>
<file>theme/disabled/checklist_indeterminate_invert.svg</file>
<file>theme/disabled/toolbar-handle-horizontal.svg</file>
<file>theme/disabled/uparrow.svg</file>
<file>theme/disabled/splitter-vertical.svg</file>
<file>theme/disabled/checkbox_indeterminate_invert.svg</file>
<file>theme/disabled/downarrow2.svg</file>
<file>theme/disabled/leftarrow.svg</file>
<file>theme/disabled/toolbar-handle-vertical.svg</file>
<file>theme/disabled/checkbox_unchecked.svg</file>
<file>theme/disabled/radiobutton_checked.svg</file>
<file>theme/disabled/rightarrow.svg</file>
<file>theme/disabled/checkbox_checked.svg</file>
<file>theme/disabled/checkbox_checked_invert.svg</file>
<file>theme/disabled/sizegrip.svg</file>
<file>theme/disabled/branch-more.svg</file>
<file>theme/disabled/checklist.svg</file>
<file>theme/disabled/branch-open.svg</file>
<file>theme/disabled/leftarrow2.svg</file>
<file>theme/disabled/checkbox_unchecked_invert.svg</file>
<file>theme/disabled/slider.svg</file>
<file>theme/primary/float.svg</file>
<file>theme/primary/base.svg</file>
<file>theme/primary/close.svg</file>
<file>theme/primary/checklist_indeterminate.svg</file>
<file>theme/primary/downarrow.svg</file>
<file>theme/primary/checklist_invert.svg</file>
<file>theme/primary/uparrow2.svg</file>
<file>theme/primary/vline.svg</file>
<file>theme/primary/tab_close.svg</file>
<file>theme/primary/branch-end.svg</file>
<file>theme/primary/checkbox_indeterminate.svg</file>
<file>theme/primary/rightarrow2.svg</file>
<file>theme/primary/radiobutton_unchecked.svg</file>
<file>theme/primary/branch-closed.svg</file>
<file>theme/primary/splitter-horizontal.svg</file>
<file>theme/primary/checklist_indeterminate_invert.svg</file>
<file>theme/primary/toolbar-handle-horizontal.svg</file>
<file>theme/primary/uparrow.svg</file>
<file>theme/primary/splitter-vertical.svg</file>
<file>theme/primary/checkbox_indeterminate_invert.svg</file>
<file>theme/disabled/checkbox_indeterminate.svg</file>
<file>theme/disabled/branch-closed.svg</file>
<file>theme/disabled/base.svg</file>
<file>theme/disabled/branch-end.svg</file>
<file>theme/disabled/uparrow2.svg</file>
<file>theme/disabled/rightarrow.svg</file>
<file>theme/disabled/branch-open.svg</file>
<file>theme/disabled/splitter-horizontal.svg</file>
<file>theme/disabled/checkbox_checked.svg</file>
<file>theme/disabled/vline.svg</file>
<file>theme/disabled/leftarrow.svg</file>
<file>theme/disabled/branch-more.svg</file>
<file>theme/disabled/toolbar-handle-horizontal.svg</file>
<file>theme/disabled/tab_close.svg</file>
<file>theme/disabled/radiobutton_checked.svg</file>
<file>theme/disabled/float.svg</file>
<file>theme/disabled/radiobutton_unchecked.svg</file>
<file>theme/disabled/checkbox_checked_invert.svg</file>
<file>theme/disabled/close.svg</file>
<file>theme/disabled/downarrow.svg</file>
<file>theme/disabled/rightarrow2.svg</file>
<file>theme/disabled/splitter-vertical.svg</file>
<file>theme/disabled/uparrow.svg</file>
<file>theme/disabled/checklist_invert.svg</file>
<file>theme/disabled/checkbox_indeterminate_invert.svg</file>
<file>theme/disabled/radiobutton_unchecked_invert.svg</file>
<file>theme/disabled/toolbar-handle-vertical.svg</file>
<file>theme/disabled/checklist_indeterminate_invert.svg</file>
<file>theme/disabled/radiobutton_checked_invert.svg</file>
<file>theme/disabled/checklist_indeterminate.svg</file>
<file>theme/disabled/checkbox_unchecked_invert.svg</file>
<file>theme/disabled/checklist.svg</file>
<file>theme/disabled/sizegrip.svg</file>
<file>theme/primary/downarrow2.svg</file>
<file>theme/primary/leftarrow.svg</file>
<file>theme/primary/toolbar-handle-vertical.svg</file>
<file>theme/primary/checkbox_unchecked.svg</file>
<file>theme/primary/radiobutton_checked.svg</file>
<file>theme/primary/rightarrow.svg</file>
<file>theme/primary/checkbox_checked.svg</file>
<file>theme/primary/checkbox_checked_invert.svg</file>
<file>theme/primary/sizegrip.svg</file>
<file>theme/primary/branch-more.svg</file>
<file>theme/primary/checklist.svg</file>
<file>theme/primary/branch-open.svg</file>
<file>theme/primary/leftarrow2.svg</file>
<file>theme/primary/checkbox_unchecked_invert.svg</file>
<file>theme/primary/slider.svg</file>
</qresource
<file>theme/primary/checkbox_indeterminate.svg</file>
<file>theme/primary/branch-closed.svg</file>
<file>theme/primary/base.svg</file>
<file>theme/primary/branch-end.svg</file>
<file>theme/primary/uparrow2.svg</file>
<file>theme/primary/rightarrow.svg</file>
<file>theme/primary/branch-open.svg</file>
<file>theme/primary/splitter-horizontal.svg</file>
<file>theme/primary/checkbox_checked.svg</file>
<file>theme/primary/vline.svg</file>
<file>theme/primary/leftarrow.svg</file>
<file>theme/primary/branch-more.svg</file>
<file>theme/primary/toolbar-handle-horizontal.svg</file>
<file>theme/primary/tab_close.svg</file>
<file>theme/primary/radiobutton_checked.svg</file>
<file>theme/primary/float.svg</file>
<file>theme/primary/radiobutton_unchecked.svg</file>
<file>theme/primary/checkbox_checked_invert.svg</file>
<file>theme/primary/close.svg</file>
<file>theme/primary/downarrow.svg</file>
<file>theme/primary/rightarrow2.svg</file>
<file>theme/primary/splitter-vertical.svg</file>
<file>theme/primary/uparrow.svg</file>
<file>theme/primary/checklist_invert.svg</file>
<file>theme/primary/checkbox_indeterminate_invert.svg</file>
<file>theme/primary/radiobutton_unchecked_invert.svg</file>
<file>theme/primary/toolbar-handle-vertical.svg</file>
<file>theme/primary/checklist_indeterminate_invert.svg</file>
<file>theme/primary/radiobutton_checked_invert.svg</file>
<file>theme/primary/checklist_indeterminate.svg</file>
<file>theme/primary/checkbox_unchecked_invert.svg</file>
<file>theme/primary/checklist.svg</file>
<file>theme/primary/sizegrip.svg</file>
</qresource>
<qresource prefix="file">
<file>dark_teal.qss</file>
</qresource
</qresource>
</RCC>

View File

@ -69,12 +69,12 @@ def export_theme(theme='', qss=None, rcc=None, invert_secondary=False, extra={},
file.write(
f' <file>{output}/{subfolder}/{filename}</file>\n')
file.write(' </qresource\n')
file.write(' </qresource>\n')
file.write(f' <qresource prefix="file">\n')
if qss:
file.write(f' <file>{qss}</file>\n')
file.write(' </qresource\n')
file.write(' </qresource>\n')
file.write('</RCC>\n')
@ -82,7 +82,10 @@ def export_theme(theme='', qss=None, rcc=None, invert_secondary=False, extra={},
# ----------------------------------------------------------------------
def build_stylesheet(theme='', invert_secondary=False, extra={}, parent='theme'):
""""""
add_fonts()
try:
add_fonts()
except Exception as e:
logging.warning(e)
theme = get_theme(theme, invert_secondary)
if theme is None: