Certain char sequence in input dialogs changes font

Things you’d like to miss in the future...
Post Reply
jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Certain char sequence in input dialogs changes font

Post by jupe »

I have noticed that when using some of the small input dialogs like Selection Filter/Set Visual Filter etc. that when entering |> or prefix with > into the dialog the font changes to Edit Text immediately.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Certain char sequence in input dialogs changes font

Post by admin »

It's a feature. > is the XY-specific prefix for Regular Expressions, and the fixed width font makes it easier to code.

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Certain char sequence in input dialogs changes font

Post by jupe »

At first that is exactly what I thought it was, but then when I realized that it activated not just on a prefix but |> anywhere in the string it seemed bizarre, then also the dialogs I thought it would be most useful in like QS it didn't do it, so I became unsure.

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Certain char sequence in input dialogs changes font

Post by jupe »

I just tested a random old XY version 20.40, and in that version the text input field doesn't jump around in height when changing font, it looks a lot better being much less noticeable, both versions have fresh settings so the fonts seem like they are the same in both, not sure if it is the same at 100dpi.

eg. it wasn't like this in earlier versions:
xyfont.gif
xyfont.gif (40.32 KiB) Viewed 422 times

Anyway I am not asking for change just mentioning it while on the subject, I was mainly just wondering how I hadn't noticed it before.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Certain char sequence in input dialogs changes font

Post by admin »

Yes, this looks confusing indeed.

Actually, I wonder if I should just drop this auto-font-switching feature. After all it's not only Regular Expressions that are "code", also the other types of terms need some degree of exactness.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Certain char sequence in input dialogs changes font

Post by highend »

Like e.g. in the search window as well? No, please not^^

Just don't switch the font if ">" is somewhere inside a string, but only if it is the first char
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Certain char sequence in input dialogs changes font

Post by admin »

Why not?

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Certain char sequence in input dialogs changes font

Post by highend »

Better readable font
You'll immediately see (by the font change) what you're doing there (working with a regex pattern)
It's the default since years, I've got used to it since the first day it got implemented
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Certain char sequence in input dialogs changes font

Post by admin »

Oh well, the traditionalists. :roll: I'll remove |> action. The edit box height changes cannot be helped.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Certain char sequence in input dialogs changes font

Post by admin »

jupe wrote: 25 Mar 2023 18:59 ... then also the dialogs I thought it would be most useful in like QS it didn't do it...
Indeed. Any others apart from QS that you noted?

PS: Okay, Live Filter Box, but it might look weird in 125%? Let me know...
No, cannot be done here. Breaks layout on 125%+.

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Certain char sequence in input dialogs changes font

Post by jupe »

I'll keep an eye out for other dialogs.
I had always just left my font settings same as default, so never paid much attention to the font config, anyway I just got around to noticing that there is a separate "Regular Expression" setting for these fields, and I was able to adjust the font independently from Edit Text to make it so the edit field height stayed the same on font switch, but I had to set the point size directly in the ini file, which made be wonder if it would be possible to enable ctrl+wheel zoom over the 4 font size edit fields (or alternately Choose button if other not possible) in the config dialog, so point sizes can be set there directly?

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Certain char sequence in input dialogs changes font

Post by admin »

jupe wrote: 26 Mar 2023 21:44 ... but I had to set the point size directly in the ini file...
Why? Did "Configuration | Colors and Styles | Fonts | Regular Expressions" not work?

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Certain char sequence in input dialogs changes font

Post by jupe »

You can't set fractional sizes.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Certain char sequence in input dialogs changes font

Post by admin »

Ah yes. Good idea, but I put it on my lo-prio list (coding this is not a one-liner).

Post Reply