Tidying up

This commit is contained in:
Maruno17
2024-09-09 21:31:22 +01:00
parent 2190f7c251
commit 9c95db2324
4 changed files with 49 additions and 33 deletions

View File

@@ -369,9 +369,15 @@ def get_text_colors_for_windowskin(windowskin, color, isDarkSkin)
end
# Special colour as listed above
if isDarkSkin && color != 12 # Dark background, light text
if textcolors[(2 * (color - 1))].is_a?(Color)
return textcolors[(2 * (color - 1)) + 1], textcolors[2 * (color - 1)]
end
return Color.new(*textcolors[(2 * (color - 1)) + 1]), Color.new(*textcolors[2 * (color - 1)])
end
# Light background, dark text
if textcolors[(2 * (color - 1))].is_a?(Color)
return textcolors[(2 * (color - 1))], textcolors[2 * (color - 1) + 1]
end
return Color.new(*textcolors[2 * (color - 1)]), Color.new(*textcolors[(2 * (color - 1)) + 1])
end