armory3d / armortools

3D Content Creation Tools
https://armorpaint.org
Other
3.23k stars 334 forks source link

button widget colour dissapeared with theme change #1223

Open Mylowpolygon opened 2 years ago

Mylowpolygon commented 2 years ago

ArmorPaint version:

ArmorPaint.org - v0.9 (2021-11-22) - 9610765 Windows - Direct3D11 NVIDIA GeForce RTX 2060, Intel(R) UHD Graphics

ArmorPaint.org - v0.9 (2021-12-24) - 65d247f Windows - Direct3D11 NVIDIA GeForce RTX 2060, Intel(R) UHD Graphics

OS/device including version:

Windows - Direct3D11 NVIDIA GeForce RTX 2060, Intel(R) UHD Graphics

Issue description:

when editing the button widget colour with a theme the button dissapears

Steps to reproduce:

edit button widget in theme image

Mylowpolygon commented 2 years ago

dracula theme.zip theme example

MathemanFlo commented 2 years ago

I can reproduce the problem. I think the issue is that the BUTTON_COL color can not be changed like all other colors. The user can pick this color but it is not really "selected".

MathemanFlo commented 2 years ago

I identified the problem. The color picker is shown inside of a UIMenu.draw. The menu itself will be rendered in the rendermethod later on. The render method changes the BUTTON_COL before calling the callback menuCommands() that changes the BUTTON_COL in the preferences dialog. At the end of the render function the BUTTON_COL is restored to the value it had BEFORE it was changed by the rendermethod itself. Therefore all changes by the user are overwritten.