Check for booleans within dimension

merge-requests/30/head
Bob Mottram 2021-12-05 21:05:51 +00:00
parent 6d8a80a0c6
commit 11fbcec55f
1 changed files with 5 additions and 4 deletions

View File

@ -271,8 +271,9 @@ def htmlThemeDesigner(cssCache: {}, baseDir: str,
'<td><input type="color" name="themeSetting_' + \
variableName + '" value="' + str(value) + \
'" title="' + variableNameStr + '"></td></tr>\n'
elif ('-width' in variableName or
'-height' in variableName):
elif (('-width' in variableName or
'-height' in variableName) and
(value.lower() != 'true' and value.lower() != 'false')):
variableNameStr = variableName.replace('-', ' ')
variableNameStr = variableNameStr.title()
dimensionStr += \
@ -282,14 +283,14 @@ def htmlThemeDesigner(cssCache: {}, baseDir: str,
'<td><input type="text" name="themeSetting_' + \
variableName + '" value="' + str(value) + \
'" title="' + variableNameStr + '"></td></tr>\n'
elif value == 'True' or value == 'False':
elif value.title() == 'True' or value.title() == 'False':
variableNameStr = variableName.replace('-', ' ')
variableNameStr = variableNameStr.title()
switchStr += \
' <tr><td><label class="labels">' + \
variableNameStr + '</label></td>'
checkedStr = ''
if value == 'True':
if value.title() == 'True':
checkedStr = ' checked'
switchStr += \
'<td><input type="checkbox" class="profilecheckbox" ' + \