Recent

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

fedkad

  • Full Member
  • ***
  • Posts: 138
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: 1589
  • 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 2021-08-10 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.3 r65500 FPC 3.3.1 r49634 macOS 11.6 aarch64 Xcode 13
Lazarus 2.3 2021-08-11 FPC 3.2.2 FreeBSD 13.0 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

fedkad

  • Full Member
  • ***
  • Posts: 138
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: 1188
    • 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: 3078
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
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and 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