[Lazarus] Universal FontDialog for LCL

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
I have an idea to make LCL based TFontDialog- which will be LCL form,
which can be called by TFontDialog.Execute (if Boolean variable in LCL
is set). Why make it?

- we can make all best features of FontDlgs from all WSes

- we can make additional events- e,g, OnSelectFont (called when used
selects name in listbox)

- we can make it resizable (and save/load size)

- same look on all WS

If it's good- ok to merge to Laz?

--
Regards,
Alexey

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
On 03/06/2019 07:54 PM, AlexeyT via lazarus wrote:

> I have an idea to make LCL based TFontDialog- which will be LCL form,
> which can be called by TFontDialog.Execute (if Boolean variable in LCL
> is set). Why make it?
>
> - we can make all best features of FontDlgs from all WSes
>
> - we can make additional events- e,g, OnSelectFont (called when used
> selects name in listbox)
>
> - we can make it resizable (and save/load size)
>
> - same look on all WS
>
> If it's good- ok to merge to Laz?
>

Not as default TFontDialog. Maybe as TLazFontDialog or similar.

zeljko
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
Default must be native OS dialog. I suggest to use my dialog when
boolean option in LCL (will be added) true. Here's my GH repo with
dialog which almost 100% mimics GTK2 FontDialog.
https://github.com/alexey-t/atfontdialog

It even increases preview height for big sizes >20.


On 07.03.2019 16:09, zeljko via lazarus wrote:
> Not as default TFontDialog. Maybe as TLazFontDialog or similar.

--
Regards,
Alexey

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
On Thu, Mar 7, 2019 at 2:12 PM AlexeyT via lazarus
<[hidden email]> wrote:

> Default must be native OS dialog. I suggest to use my dialog when
> boolean option in LCL (will be added) true.

Please no!

--
Bart
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
 Please no? What do other developers think, also no (lcl option for universal dialog not wanted)?
AT
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
On 07/03/2019 18:14, Alexey via lazarus wrote:
>   Please no? What do other developers think, also no (lcl option for universal dialog not wanted)?
> AT

IMHO, it should be a separate component. So no code will be pulled into
the user app, if it is not used.

While certainly useful, it is not necessarily something that needs to be
included by default.
With the online package manager, I would think that an installable
package might be useful. (And could later be extended, to contain other
dialog replacements)
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 07/03/2019 13:12, AlexeyT via lazarus wrote:
> Default must be native OS dialog. I suggest to use my dialog when
> boolean option in LCL (will be added) true.

The replies so far are not surprising at all. LCL prides itself staying
with "native components". Granted I find that has many drawbacks, but
that was LCL's design choice from the start, and will not change. I
battled the same arguments/suggestions years back. ;-)

If you want the full benefits of 100% customisability, better go with
the custom drawn toolkits out there. fpGUI and MSEgui are 100% custom
drawn and fully written in Object Pascal - no limitations with what can
be done.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 07/03/2019 13:09, zeljko via lazarus wrote:
> On 03/06/2019 07:54 PM, AlexeyT via lazarus wrote:
>> I have an idea to make LCL based TFontDialog- which will be LCL form,
>> which can be called by TFontDialog.Execute (if Boolean variable in
>> LCL is set). Why make it?

I haven't checked recently, but the system TFontDialog on a mac does not
an OK/cancel button, making the system dialog useless, so a standard
alternative might be helpful. I reported this a while back
(https://bugs.freepascal.org/view.php?id=13383) but it was closed as
expected behavior, which I am not sure is right.

Checking further, is the font dialog working at all under carbon?
Checking a couple of different versions of my program and lazarus simply
gives an access violation when it is invoked. (These versions are from
SVN a couple of months ago at least - I will check with current when I
have time)

Colin

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
Am 07.03.2019 um 14:12 schrieb AlexeyT via lazarus:
> Here's my GH repo with dialog which almost 100% mimics GTK2
> FontDialog. https://github.com/alexey-t/atfontdialog

On Windows the font dialog also allows to select the color which is
missing here.

An issue: the dialog is resizable, but the height jumps back to its
original value when I click into one of the listboxes.


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Thu, Mar 7, 2019 at 3:09 PM zeljko via lazarus
<[hidden email]> wrote:

> Not as default TFontDialog. Maybe as TLazFontDialog or similar.

+1
AlexeyT, what is wrong in having a separate component for those who need it?
If the current native dialogs have bugs (Carbon etc.) they should be
fixed obviously. That is a different issue.

Mapping to native controls has its problems but it also has benefits.
The beauty is that you can mix native LCL components with custom drawn
ones.

Juha
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
Juha, I wanted to hook new dialog (ok, separate component) into TFontDialog. Can I make a patch to allow such a hook? It must be very small diff which don’t bloat the lcl.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
On Fri, 8 Mar 2019 14:01:06 +0300
Alexey via lazarus <[hidden email]> wrote:

> Juha, I wanted to hook new dialog (ok, separate component) into
> TFontDialog. Can I make a patch to allow such a hook? It must be very
> small diff which don’t bloat the lcl.

Do you want to embed a component into the native dialog, or to
create a complete custom drawn font dialog?

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
Completely new form.

> Do you want to embed a component into the native dialog, or to
> create a complete custom drawn font dialog?
>
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Fri, Mar 8, 2019 at 1:01 PM Alexey via lazarus
<[hidden email]> wrote:
> Juha, I wanted to hook new dialog (ok, separate component) into TFontDialog.

I also feel a separate dialog, TLazFontDialog or whatever, is better.
It should be put into a package and then provided through OPM.
I think you should create a new package which can later be extended
with other components.
I remember there was a long discussion about a currency edit
component. I already then suggested a similar new package but the
author did not want to make it.
Everybody wants to include their custom components in LCL. Why? The
Online Package Manager is designed exactly for easy access to external
components. Let's use it please!

Juha
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
Okay, will do so. About lcl patch, we ll talk later.

On 08.03.2019 14:54, Juha Manninen via lazarus wrote:
> Everybody wants to include their custom components in LCL. Why? The
> Online Package Manager is designed exactly for easy access to external
> components. Let's use it please!

--
Regards,
Alexey

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Fri, Mar 8, 2019 at 12:55 PM Juha Manninen via lazarus
<[hidden email]> wrote:
> Everybody wants to include their custom components in LCL. Why?

Most likely because it is much easier to have a single "batteries
included" installer that provides everything you need out of the box
now and much more likely to be there and working in the future (since
it is part of the codebase that the Lazarus devs are compiling against
after every modification), than chase after packages provided by
others who may or may not keep them available and up to date (keeping
your own copies can solve the "available" part, but then you take
unofficial ownership of the package for the "up to date" part).

FWIW i tend to avoid anything that isn't part of Lazarus itself
personally. The only time i used an external package was with
multithreadprocs and i was very happy when i saw it become part of
Lazarus itself.

Besides, Lazarus already comes out of the box with a ton of packages,
it isn't weird to expect that you can add more to it.

Which makes me wonder, what is the goal with the bundled packages? Are
they going to transition to OPM with Lazarus only providing the "bare
bones", are they going to stay frozen in time or are they going to be
expanded and if so, what would be the criteria for expansion?

FWIW i think Python's approach sounds good here: the installers come
"batteries included" with stable APIs that you can generally rely on
being there in the future with no (or very minimal) changes (ignoring
the Python2-to-Python3 fiasco at the moment), but you can still get
more stuff through PIP and over time useful packages "migrate" from
PIP to the official distribution (as long as there aren't
functionality duplicates, but that is mainly because of Python's
"there should be only one way to do something" and Lazarus already has
several duplicates already).
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list


On Mon, 11 Mar 2019, Kostas Michalopoulos via lazarus wrote:

> On Fri, Mar 8, 2019 at 12:55 PM Juha Manninen via lazarus
> <[hidden email]> wrote:
>> Everybody wants to include their custom components in LCL. Why?
>
> Most likely because it is much easier to have a single "batteries
> included" installer that provides everything you need out of the box
> now and much more likely to be there and working in the future (since
> it is part of the codebase that the Lazarus devs are compiling against
> after every modification), than chase after packages provided by
> others who may or may not keep them available and up to date (keeping
> your own copies can solve the "available" part, but then you take
> unofficial ownership of the package for the "up to date" part).

Exactly.

Relying on packages somewhere in the cloud can lead to nasty surprises.
I've been bitten by npm ("packaging on steroids") more than once when
developing browser-based apps, and I am very reluctant to use such mechanisms.
You're constantly chasing version numbers for no good reason.

IMO Lazarus should provide a decent selection that allows someone to do most
common tasks without needing to install something extra.
(what this "decent selection" is, is up for debate, of course)

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
On 11/03/2019 14:01, Michael Van Canneyt via lazarus wrote:
>
> IMO Lazarus should provide a decent selection that allows someone to
> do most
> common tasks without needing to install something extra.
> (what this "decent selection" is, is up for debate, of course)

Well, that and where does the manpower originate from (aka "who does it?")

Adding more and more to the main product, means more resources needed to
maintain it.

The Idea that none included packages can break (be broken by changes in
the main product) or become outdated, already says it: There may be no
one to maintain it.
Once added to the core product, the core team will maintain it ("must"
maintain it), and therefore reduce efforts on other works.

Besides packages that come with Lazarus, but are not bigide have been
broken before too. (afaik)

----
My understanding is (not using it myself, only from hearsay), that at
current the OPM repository is maintained. So if there is a version that
works, then opm should know, and you need not search for it yourself.
Sure that may break sometimes, but as I said, so do packages that are in
core.

A good idea, would be to have CI. If someone would invest the time, in
setting it up, and contributing the test cases needed (start with "does
it compile") then that would be a solution.
Provided the OPM registry is part of it.

If a change to trunk, would break an opm package, the team, and the
package maintainer would know.

If the maintainer no longer exists, then the team can choose: Fix it, or
remove it from opm.
In the past, afaik, packages have been moved from core to ccr (maybe due
to similar reasons?)

----
Looking at the bugtracker, shows that core is already too big. And that
therefore it does not guarantee, that all issues will be fixed - or will
be fixed quicker than in an opm package.


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list


On Mon, 11 Mar 2019, Martin Frb via lazarus wrote:

> On 11/03/2019 14:01, Michael Van Canneyt via lazarus wrote:
>>
>> IMO Lazarus should provide a decent selection that allows someone to
>> do most
>> common tasks without needing to install something extra.
>> (what this "decent selection" is, is up for debate, of course)
>
> Well, that and where does the manpower originate from (aka "who does it?")

Obviously.
Otherwise there would be no debate: just add all available stuff ;-)

Michael.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Universal FontDialog for LCL

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 08/03/2019 09:10, Juha Manninen via lazarus wrote:

> On Thu, Mar 7, 2019 at 3:09 PM zeljko via lazarus
> <[hidden email]> wrote:
>
>> Not as default TFontDialog. Maybe as TLazFontDialog or similar.
> +1
> AlexeyT, what is wrong in having a separate component for those who need it?
> If the current native dialogs have bugs (Carbon etc.) they should be
> fixed obviously. That is a different issue.
>
> Mapping to native controls has its problems but it also has benefits.
> The beauty is that you can mix native LCL components with custom drawn
> ones.
>
> Juha

Just to confirm the carbon font dialog seems completely broken under the
current SVN with OSX fully patched.
(https://bugs.freepascal.org/view.php?id=35214) Given Carbon is on its
way out, replacing the native control with a (more or less equivalent)
substitute might be the most sensible work-around. I am not sure top
what extent the native dialog ever worked anyway, as it is not intended
to be used as a modal dialog.

Colin

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
12