Recent

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

fedkad

  • Full Member
  • ***
  • Posts: 140
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 »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1684
  • 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?
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 x86_64 Xcode 13.1
Lazarus 2.3, FPC 3.3.1 macOS 12.0.1 aarch64 Xcode 13.1
Lazarus 2.3, FPC 3.2.2 FreeBSD 13.0 amd64 VM
Lazarus 2.3, FPC 3.2.2 FreeBSD 12.2 amd64 VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 VM
Lazarus 2.0.10 FPC 3.2.0 Win10 VM

fedkad

  • Full Member
  • ***
  • Posts: 140
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 »

zeljko

  • Hero Member
  • *****
  • Posts: 1191
    • 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: 3502
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