Recent

Author Topic: Are TPanel/TForm/TFrame getting dark OS theme?  (Read 785 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 1957
    • UVviewsoft
Are TPanel/TForm/TFrame getting dark OS theme?
« on: February 25, 2022, 07:37:24 pm »
Because of this user report
https://github.com/Alexey-T/CudaText/issues/3975
I am asking:

- is TPanel automatically getting OS dark theme? Seems not yet
- is TForm also getting it? Seems yes.
- what about TFrame?
- what about TButton/TSpeedButton? screenshot from user shows that buttons are not getting dark theme, but button's font becomes light.


PS. I don't have modern Mac to test it..
« Last Edit: February 25, 2022, 07:44:19 pm by Alextp »

jwdietrich

  • Hero Member
  • *****
  • Posts: 1198
    • formatio reticularis
Re: Are TPanel/TForm/TFrame getting dark OS theme?
« Reply #1 on: February 25, 2022, 08:07:11 pm »
It depends on the settings of certain properties in the object inspector. If colours are set to default then the dark theme is supported.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.12 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux

AlexTP

  • Hero Member
  • *****
  • Posts: 1957
    • UVviewsoft
Re: Are TPanel/TForm/TFrame getting dark OS theme?
« Reply #2 on: February 25, 2022, 08:13:15 pm »
Quote
If colours are set to default then the dark theme is supported.
i am seeing the opposite for TPanel. in my project TPanel has default color (code don't change the BG color at all) and Panel is light on dark theme.

EDIT. i see the opposite for __TForm__.
« Last Edit: February 25, 2022, 08:15:36 pm by Alextp »

 

TinyPortal © 2005-2018