Lazarus
Programming => General => Topic started by: bonmario on December 09, 2019, 07:36:25 pm
-
Hi,
step to reproduce (Windows only):
- create a new project
- put a TMemo on form
- Memo1.Font.Color is "clDefault" (this is correct)
- on property "Font", click on the button "..."
- the color is clBlack
so, if you change for example ONLY the font name, when you click on the ok button "Ok", the property "Memo1.Font.Color" is changed in "clBlack"
If you save the project, compile it on Linux and run with dark theme, the "Memo1.Font.Color" is black, unreadable with dark theme !!!
This is a bug?
Thanks in advance, Mario
-
This is a bug?
Yes, but your bug. When you mix hard-coded colors with system, theme-dependent colors that's what is to be expected. In general, be very careful when changing colors because it is not clear what will happen (depending on the widgetset colors may not change at all - look at the Restrictions page of the object inspector or the Restriction Browser)
-
Ok, thanks.
So, if i want change ONLY font name (for example setting it to "Courier new") without change their color i must:
- Click on the "..." button
- Change font to "Courier new"
- Click on the "Ok" button
- change property "Memo1.Font.Color" in clDefault
It's correct?
Thanks, Mario
-
An example patch is included. This patch fixes the assignment for Name, Height, Color, CharSet if it's were set to "default".
-
An example patch is included. This patch fixes the assignment for Name, Height, Color, CharSet if it's were set to "default".
Thanks! I applied it in r62369. Please test everybody.
-
An example patch is included. This patch fixes the assignment for Name, Height, Color, CharSet if it's were set to "default".
Tried now, for me it's Ok.
Thanks, Mario