Re: [EXTERNAL] Explanation of different scaling factors anywhere?

2020-01-30 Thread Mike Hearn
I'm afraid I disagree. My eyesight isn't great and I like to zoom web apps
to sizes that most designers would consider wrong/bad/absurd, at least when
possible. How far I can go depends a lot on the app. Many modern desktop
apps feel far too dense and with fonts that are uncomfortably small for me.
I much prefer desktop/JavaFX apps for various reasons, but in this regard
the web wins - I can blow the sizes up nice and big, and things mostly just
work. Hence my interest in replicating this feature.

It's annoying because it feels like it's surely possible and even easy, but
that the knowledge of how to do it probably only exists in the heads of
five people. JavaFX can scale widgets to handle variable dpi, scale
transforms and other features. This one doesn't seem like a stretch. I'd
rather get an authoritative tip before diving into Glass to try and reverse
engineer it all from the code.




On Thu, Jan 30, 2020 at 16:59:54, Michael Paus  wrote:

> I am wondering whether this kind of scaling should actually be done on an
> application basis. On desktop computers this is normally achieved via some
> system setting of the monitor scaling. I think most people just want a
> consistent scaling across all applications and so there is just no need in
> general for an individual scaling. Just for very specific cases this may be
> useful, e.g., to scale the text size of an editor window in Eclipse where
> this can be done like in a browser via Cmd+/-. In a browser you only need
> this feature because web-sites are so inconsistent in their styling, which
> is normally not the case for desktop applications.
>
> Just my two €ent
>
> Am 30.01.20 um 17:29 schrieb Mike Hearn:
>
> Yes, a scale transform doesn't affect layout. That's the issue. Browser
> zoom scales fonts, images and widgets but in a way that affects layout
> bounds, not only render bounds.
>
> As far as I can tell there's no way to do a zoom or scale that affects
> layout bounds with the public JavaFX API. Exploring why not and what could
> work is how I ended up getting a bit lost in the weeds of all the different
> scale factors. It *feels* like one of them should be applicable if only it
> was public API. But I can't quite figure out which or how exactly it'd
> work. If nobody else has ever examined this task (it seems not) then I
> guess I can just compile my own JFX and experiment with forcing the
> different factors and ratios to see what happens. I'm not sure the results
> would be stable or portable though.
>
> On Tue, Jan 28, 2020 at 11:09:04, Tom Schindl 
> wrote:
>
> I think that can not work because layouts don't take the scale factor into
> account nor does stuff like ScrollView but i could be wrong.
>
> Tom
>
> On 27.01.20 17:29, David Grieve wrote:
>
> Wouldn't this just be a scale transform?
>
> -Original Message-
> From: openjfx-dev  On Behalf Of
> Mike Hearn
> Sent: Monday, January 27, 2020 11:00 AM
> To: openjfx-dev@openjdk.java.net
> Subject: [EXTERNAL] Explanation of different scaling factors anywhere?
>
> Hello,
>
> A feature I often miss when using non-web GUIs is support for browser
> style zooming. In JavaFX it is quite easy to specify all font sizes in
> terms of "ems", relative sizes ("largest") or percentages and then adjust
> the base font size on a root node inside key handlers. This works OK but
> doesn't do much for images or other controls, and of course most JavaFX GUI
> code specifies sizes in terms of pixels.
>
> There are various scaling factors applied to pixel sizes. There is the
> per-node scaling transform, but this doesn't affect layout so isn't
> comparable to what browsers do. There's a per-screen DPI, there's a
> "platform scale", there's a
> "render scale" and then there's a "ui scale". These seem related to
> hidpi/retina support and are all internal (for the purposes of this
> question I'm happy to modify JavaFX itself).
>
> Render scale seems to affect resolution without affecting positions or
> layout, so that's not quite what I want. UI scale sounds promising but
> isn't documented and I couldn't quite figure it out by reading the code,
> though I could just fiddle with it and see what happens.
>
> It feels like someone probably explored this before now. Is there a way to
> effectively expand the size of every node without altering the size of the
> containing viewport, to get browser-style layout affecting zoom? If not,
> has anyone explored the complexity of the modifications required?
>
> thanks,
> -mike
>
> --
> Tom Schindl, CTO
> BestSolution.at <http://bestsolution.at/> <http://bestsolution.at/> EDV
> Systemhaus GmbH Salurnerstrasse 15. A-6020 Innsbruck
> Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
>
>


Re: [EXTERNAL] Explanation of different scaling factors anywhere?

2020-01-30 Thread Michael Paus

I am wondering whether this kind of scaling should actually be done on
an application basis. On desktop computers this is normally achieved via
some system setting of the monitor scaling. I think most people just want
a consistent scaling across all applications and so there is just no need
in general for an individual scaling. Just for very specific cases this may
be useful, e.g., to scale the text size of an editor window in Eclipse
where this can be done like in a browser via Cmd+/-. In a browser you
only need this feature because web-sites are so inconsistent in their
styling, which is normally not the case for desktop applications.

Just my two €ent


Am 30.01.20 um 17:29 schrieb Mike Hearn:

Yes, a scale transform doesn't affect layout. That's the issue. Browser
zoom scales fonts, images and widgets but in a way that affects layout
bounds, not only render bounds.

As far as I can tell there's no way to do a zoom or scale that affects
layout bounds with the public JavaFX API. Exploring why not and what could
work is how I ended up getting a bit lost in the weeds of all the different
scale factors. It *feels* like one of them should be applicable if only it
was public API. But I can't quite figure out which or how exactly it'd
work. If nobody else has ever examined this task (it seems not) then I
guess I can just compile my own JFX and experiment with forcing the
different factors and ratios to see what happens. I'm not sure the results
would be stable or portable though.




On Tue, Jan 28, 2020 at 11:09:04, Tom Schindl 
wrote:


I think that can not work because layouts don't take the scale factor into
account nor does stuff like ScrollView but i could be wrong.

Tom

On 27.01.20 17:29, David Grieve wrote:

Wouldn't this just be a scale transform?

-Original Message-
From: openjfx-dev  On Behalf Of
Mike Hearn
Sent: Monday, January 27, 2020 11:00 AM
To: openjfx-dev@openjdk.java.net
Subject: [EXTERNAL] Explanation of different scaling factors anywhere?

Hello,

A feature I often miss when using non-web GUIs is support for browser
style zooming. In JavaFX it is quite easy to specify all font sizes in
terms of "ems", relative sizes ("largest") or percentages and then adjust
the base font size on a root node inside key handlers. This works OK but
doesn't do much for images or other controls, and of course most JavaFX GUI
code specifies sizes in terms of pixels.

There are various scaling factors applied to pixel sizes. There is the
per-node scaling transform, but this doesn't affect layout so isn't
comparable to what browsers do. There's a per-screen DPI, there's a
"platform scale", there's a
"render scale" and then there's a "ui scale". These seem related to
hidpi/retina support and are all internal (for the purposes of this
question I'm happy to modify JavaFX itself).

Render scale seems to affect resolution without affecting positions or
layout, so that's not quite what I want. UI scale sounds promising but
isn't documented and I couldn't quite figure it out by reading the code,
though I could just fiddle with it and see what happens.

It feels like someone probably explored this before now. Is there a way to
effectively expand the size of every node without altering the size of the
containing viewport, to get browser-style layout affecting zoom? If not,
has anyone explored the complexity of the modifications required?

thanks,
-mike

--
Tom Schindl, CTO
BestSolution.at <http://bestsolution.at/> EDV Systemhaus GmbH
Salurnerstrasse 15. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck





Re: [EXTERNAL] Explanation of different scaling factors anywhere?

2020-01-30 Thread Mike Hearn
Yes, a scale transform doesn't affect layout. That's the issue. Browser
zoom scales fonts, images and widgets but in a way that affects layout
bounds, not only render bounds.

As far as I can tell there's no way to do a zoom or scale that affects
layout bounds with the public JavaFX API. Exploring why not and what could
work is how I ended up getting a bit lost in the weeds of all the different
scale factors. It *feels* like one of them should be applicable if only it
was public API. But I can't quite figure out which or how exactly it'd
work. If nobody else has ever examined this task (it seems not) then I
guess I can just compile my own JFX and experiment with forcing the
different factors and ratios to see what happens. I'm not sure the results
would be stable or portable though.




On Tue, Jan 28, 2020 at 11:09:04, Tom Schindl 
wrote:

> I think that can not work because layouts don't take the scale factor into
> account nor does stuff like ScrollView but i could be wrong.
>
> Tom
>
> On 27.01.20 17:29, David Grieve wrote:
>
> Wouldn't this just be a scale transform?
>
> -Original Message-
> From: openjfx-dev  On Behalf Of
> Mike Hearn
> Sent: Monday, January 27, 2020 11:00 AM
> To: openjfx-dev@openjdk.java.net
> Subject: [EXTERNAL] Explanation of different scaling factors anywhere?
>
> Hello,
>
> A feature I often miss when using non-web GUIs is support for browser
> style zooming. In JavaFX it is quite easy to specify all font sizes in
> terms of "ems", relative sizes ("largest") or percentages and then adjust
> the base font size on a root node inside key handlers. This works OK but
> doesn't do much for images or other controls, and of course most JavaFX GUI
> code specifies sizes in terms of pixels.
>
> There are various scaling factors applied to pixel sizes. There is the
> per-node scaling transform, but this doesn't affect layout so isn't
> comparable to what browsers do. There's a per-screen DPI, there's a
> "platform scale", there's a
> "render scale" and then there's a "ui scale". These seem related to
> hidpi/retina support and are all internal (for the purposes of this
> question I'm happy to modify JavaFX itself).
>
> Render scale seems to affect resolution without affecting positions or
> layout, so that's not quite what I want. UI scale sounds promising but
> isn't documented and I couldn't quite figure it out by reading the code,
> though I could just fiddle with it and see what happens.
>
> It feels like someone probably explored this before now. Is there a way to
> effectively expand the size of every node without altering the size of the
> containing viewport, to get browser-style layout affecting zoom? If not,
> has anyone explored the complexity of the modifications required?
>
> thanks,
> -mike
>
> --
> Tom Schindl, CTO
> BestSolution.at <http://bestsolution.at/> EDV Systemhaus GmbH
> Salurnerstrasse 15. A-6020 Innsbruck
> Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
>


Re: [EXTERNAL] Explanation of different scaling factors anywhere?

2020-01-28 Thread Tom Eugelink

One can't keep taps on everything. :-) It was part of the "One application to rule 
them all" talk I had on the JavaOne 2017.
Just tested it, but it's still doing its thing in my time registration app.

Desktop layout:

Phone layout:

This is on my desktop when I resize the window.

I'll stop spamming this list now.

Tom


On 28-1-2020 12:12, Pedro Duque Vieira wrote:

Interesting, Tom.

I didn't know about this blog post and control.

Cheers,





Re: [EXTERNAL] Explanation of different scaling factors anywhere?

2020-01-28 Thread Pedro Duque Vieira
Interesting, Tom.

I didn't know about this blog post and control.

Cheers,

-- 
Pedro Duque Vieira - https://www.pixelduke.com


Re: [EXTERNAL] Explanation of different scaling factors anywhere?

2020-01-28 Thread Tom Schindl
I think that can not work because layouts don't take the scale factor
into account nor does stuff like ScrollView but i could be wrong.

Tom

On 27.01.20 17:29, David Grieve wrote:
> Wouldn't this just be a scale transform? 
> 
>> -Original Message-
>> From: openjfx-dev  On Behalf Of
>> Mike Hearn
>> Sent: Monday, January 27, 2020 11:00 AM
>> To: openjfx-dev@openjdk.java.net
>> Subject: [EXTERNAL] Explanation of different scaling factors anywhere?
>>
>> Hello,
>>
>> A feature I often miss when using non-web GUIs is support for browser style
>> zooming. In JavaFX it is quite easy to specify all font sizes in terms of 
>> "ems",
>> relative sizes ("largest") or percentages and then adjust the base font size 
>> on a
>> root node inside key handlers. This works OK but doesn't do much for images
>> or other controls, and of course most JavaFX GUI code specifies sizes in 
>> terms
>> of pixels.
>>
>> There are various scaling factors applied to pixel sizes. There is the 
>> per-node
>> scaling transform, but this doesn't affect layout so isn't comparable to what
>> browsers do. There's a per-screen DPI, there's a "platform scale", there's a
>> "render scale" and then there's a "ui scale".
>> These seem related to hidpi/retina support and are all internal (for the
>> purposes of this question I'm happy to modify JavaFX itself).
>>
>> Render scale seems to affect resolution without affecting positions or 
>> layout,
>> so that's not quite what I want. UI scale sounds promising but isn't
>> documented and I couldn't quite figure it out by reading the code, though I
>> could just fiddle with it and see what happens.
>>
>> It feels like someone probably explored this before now. Is there a way to
>> effectively expand the size of every node without altering the size of the
>> containing viewport, to get browser-style layout affecting  zoom?  If not, 
>> has
>> anyone explored the complexity of the modifications required?
>>
>> thanks,
>> -mike

-- 
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Salurnerstrasse 15. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck


Re: [EXTERNAL] Explanation of different scaling factors anywhere?

2020-01-27 Thread Tom Eugelink

ResponsivePane is an attempt to do something in that way, but I chose a 
slightly different approach where the system automatically switches between 
different layouts and CSS files depending on the window's size. It has a common 
area (reusable nodes) and then specific layouts per size.
https://tbeernot.wordpress.com/2016/12/11/responsivepane/
https://github.com/JFXtras/jfxtras/blob/9.0/jfxtras-common/src/main/java/jfxtras/scene/layout/responsivepane/ResponsivePane.java

It worked very well, I used it to transition between desktop, tablet en phone 
screens. Except problems with higher screen DPI's, which I was not able to 
solve because the DPI info JavaFX gave me was inaccurate.



On 28-1-2020 00:02, Pedro Duque Vieira wrote:

Hi,

AFAIK, -fx-padding values are also affected as long as they're also defined
in em.

I agree, would also be nice for other things to scale automatically,
depending on the font size defined in root. I don't think other properties
besides -fx-padding also scale.

One thing that would be nice to have to be able to do responsive design as
we can do on the web, would be to have things like media queries (css rules
that only apply on specified screen sizes), being able to specify layout
through CSS, other properties responding to changes in font size in the
root when defined in em.

Cheers,





RE: [EXTERNAL] Explanation of different scaling factors anywhere?

2020-01-27 Thread Pedro Duque Vieira
Hi,

AFAIK, -fx-padding values are also affected as long as they're also defined
in em.

I agree, would also be nice for other things to scale automatically,
depending on the font size defined in root. I don't think other properties
besides -fx-padding also scale.

One thing that would be nice to have to be able to do responsive design as
we can do on the web, would be to have things like media queries (css rules
that only apply on specified screen sizes), being able to specify layout
through CSS, other properties responding to changes in font size in the
root when defined in em.

Cheers,

-- 
Pedro Duque Vieira - https://www.pixelduke.com


RE: [EXTERNAL] Explanation of different scaling factors anywhere?

2020-01-27 Thread David Grieve
Wouldn't this just be a scale transform? 

> -Original Message-
> From: openjfx-dev  On Behalf Of
> Mike Hearn
> Sent: Monday, January 27, 2020 11:00 AM
> To: openjfx-dev@openjdk.java.net
> Subject: [EXTERNAL] Explanation of different scaling factors anywhere?
> 
> Hello,
> 
> A feature I often miss when using non-web GUIs is support for browser style
> zooming. In JavaFX it is quite easy to specify all font sizes in terms of 
> "ems",
> relative sizes ("largest") or percentages and then adjust the base font size 
> on a
> root node inside key handlers. This works OK but doesn't do much for images
> or other controls, and of course most JavaFX GUI code specifies sizes in terms
> of pixels.
> 
> There are various scaling factors applied to pixel sizes. There is the 
> per-node
> scaling transform, but this doesn't affect layout so isn't comparable to what
> browsers do. There's a per-screen DPI, there's a "platform scale", there's a
> "render scale" and then there's a "ui scale".
> These seem related to hidpi/retina support and are all internal (for the
> purposes of this question I'm happy to modify JavaFX itself).
> 
> Render scale seems to affect resolution without affecting positions or layout,
> so that's not quite what I want. UI scale sounds promising but isn't
> documented and I couldn't quite figure it out by reading the code, though I
> could just fiddle with it and see what happens.
> 
> It feels like someone probably explored this before now. Is there a way to
> effectively expand the size of every node without altering the size of the
> containing viewport, to get browser-style layout affecting  zoom?  If not, has
> anyone explored the complexity of the modifications required?
> 
> thanks,
> -mike


Explanation of different scaling factors anywhere?

2020-01-27 Thread Mike Hearn
Hello,

A feature I often miss when using non-web GUIs is support for browser style
zooming. In JavaFX it is quite easy to specify all font sizes in terms of
"ems", relative sizes ("largest") or percentages and then adjust the base
font size on a root node inside key handlers. This works OK but doesn't do
much for images or other controls, and of course most JavaFX GUI code
specifies sizes in terms of pixels.

There are various scaling factors applied to pixel sizes. There is the
per-node scaling transform, but this doesn't affect layout so isn't
comparable to what browsers do. There's a per-screen DPI, there's a
"platform scale", there's a "render scale" and then there's a "ui scale".
These seem related to hidpi/retina support and are all internal (for the
purposes of this question I'm happy to modify JavaFX itself).

Render scale seems to affect resolution without affecting positions or
layout, so that's not quite what I want. UI scale sounds promising but
isn't documented and I couldn't quite figure it out by reading the code,
though I could just fiddle with it and see what happens.

It feels like someone probably explored this before now. Is there a way to
effectively expand the size of every node without altering the size of the
containing viewport, to get browser-style layout affecting  zoom?  If not,
has anyone explored the complexity of the modifications required?

thanks,
-mike