Lazarus

Programming => General => Topic started by: fedkad on July 25, 2021, 12:14:39 pm

Title: Why is the TFontDialog different in Windows and Linux
Post by: fedkad on July 25, 2021, 12:14:39 pm
The TFontDialog provides some options to the program user for font properties. One of them is the Font.Color property. The Windows version of this dialog allows the user to change this property. However, the Linux version of the same dialog does not. See the screenshots below.

Why is this difference and what is the simplest way to allow the Linux user to set a font and its color in the same dialog?
Title: Re: Why is the TFontDialog different in Windows and Linux
Post by: trev on July 25, 2021, 02:28:52 pm
Is it a widgetset restriction? Is it listed in the Object Inspector's  restriction browser?
Title: Re: Why is the TFontDialog different in Windows and Linux
Post by: fedkad on July 25, 2021, 02:36:38 pm
Honestly I don't know.

However, please find below screenshots of the Object Inspector. As the second screenshot shows, the Restricted tab is empty.

Lazarus Version #: 2.0.12
Date: 2021-02-21
FPC Version: 3.2.0
x86 64-linux-gtk2
Running under Ubuntu 21.04
Title: Re: Why is the TFontDialog different in Windows and Linux
Post by: zeljko on July 25, 2021, 02:57:49 pm
The TFontDialog provides some options to the program user for font properties. One of them is the Font.Color property. The Windows version of this dialog allows the user to change this property. However, the Linux version of the same dialog does not. See the screenshots below.

Why is this difference and what is the simplest way to allow the Linux user to set a font and its color in the same dialog?

TFontDialog is native implementation of widgetset, so that's why it have differences. See Restrictions tab for TFontDialog. There are some suggestions to make unified LCL TFontDialog which could look same on all widgetsets.
Title: Re: Why is the TFontDialog different in Windows and Linux
Post by: MarkMLl on July 25, 2021, 03:11:55 pm
TFontDialog is native implementation of widgetset, so that's why it have differences. See Restrictions tab for TFontDialog. There are some suggestions to make unified LCL TFontDialog which could look same on all widgetsets.

Could I have a reality check here please. From what you're saying and from OP's screenshots, the restrictions info applies to the control (dialogue etc.) currently being edited or placed on the form, rather than the control referenced by a property displayed by the Object Inspector.

If that is the case, and again considering OP's screenshots, I think that could possibly be made a bit clearer in that section of the Object Inspector.

MarkMLl
TinyPortal © 2005-2018