Recent

Author Topic: Why is the TFontDialog different in Windows and Linux  (Read 2314 times)

fedkad

  • Full Member
  • ***
  • Posts: 176
Why is the TFontDialog different in Windows and Linux
« 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?
« Last Edit: July 25, 2021, 02:48:37 pm by fedkad »
Lazarus 2.2.6 / FPC 3.2.2 on x86_64-linux-gtk2 (Ubuntu/GNOME) and x86_64-win64-win32/win64 (Windows 11)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Why is the TFontDialog different in Windows and Linux
« Reply #1 on: July 25, 2021, 02:28:52 pm »
Is it a widgetset restriction? Is it listed in the Object Inspector's  restriction browser?

fedkad

  • Full Member
  • ***
  • Posts: 176
Re: Why is the TFontDialog different in Windows and Linux
« Reply #2 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
« Last Edit: July 25, 2021, 02:39:05 pm by fedkad »
Lazarus 2.2.6 / FPC 3.2.2 on x86_64-linux-gtk2 (Ubuntu/GNOME) and x86_64-win64-win32/win64 (Windows 11)

zeljko

  • Hero Member
  • *****
  • Posts: 1591
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Why is the TFontDialog different in Windows and Linux
« Reply #3 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.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6647
Re: Why is the TFontDialog different in Windows and Linux
« Reply #4 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
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018