Hi-DPI Support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Hi-DPI Support

Steffen Märcker
Hi,

I'd like to ask about the state of Hi-DPI support for Pharo. I already
found two related GitHub issues which where inconclusive so far. Does the
discussion take place elsewhere? If so, where? If not:

- What is the current state?
- Does a plan exist how to get there?
- What are the missing pieces?
- How can I support this endeavor in practice?

Best, Steffen

Reply | Threaded
Open this post in threaded view
|

Re: Hi-DPI Support

tbrunz
I'm also looking forward to Hi-DPI support being fully implemented in Pharo.

Until then, there is the "Display scale factor" slider and the ability to
change the font size.  However, most have probably already noticed that
these controls don't affect the size of the mouse pointer, which can be
annoying as it's much harder to find on big screens.

I recently found this posting, which is helpful:

Scaling for HiDPI in Pharo:
1.) Evaluating "MenubarMorph reset" will fix the menu bar scaling factor.  
2.) There's a SQUEAK_FAKEBIGCURSOR env var which you can set to 1 to have
the VM
display the cursor twice as big as normal. I've no idea why the word 'FAKE'
is
part of this; from the source it looks like it just creates a normal X11
cursor
that's twice as big as normal. This should work with Cuis, Squeak, and
Pharo,
as it's part of the VM.

I found that entering "export SQUEAK_FAKEBIGCURSOR=1" will cause standalone
Pharo to have a normal-looking pointer on 4K displays, but this does not
seem to work as expected with Pharo Launcher, or images launched with Pharo
Launcher.

After some investigation, I determined that the 'pharo-launcher', 'pharo'
and 'pharo-ui' bash scripts (for Pharo Launcher and Pharo IOT) can be
modified to make this work.  

The trick is to add "env SQUEAK_FAKEBIGCURSOR=1" to the front of the command
that launches the VM/image within the above scripts.

I've fashioned a set of 'sed' one-liners to automate editing these scripts
accordingly, and am in the process of making a bash script that will use
them to add/remove/verify these edits in a user-friendly fashion.  (I also
have scripts that install Pharo Launcher and Pharo IOT in Linux, that create
& add clickable launcher icons; my plan was to modify these scripts to write
the cursor size correction scripts into their respective folders when
they're installed.)

I'll make this available when it's complete, likely in the next couple of
days.



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: Hi-DPI Support

Pharo Smalltalk Users mailing list
For the mouse pointer, if you're on Windows, you can have a look at VistaCursor

Metacello new 
	repository: 'github://astares/Pharo-VistaCursors/src';
	baseline: 'VistaCursors';
	load 	
It has scale factor available in the settings application.

Renaud


Feb. 18, 2020, 11:43 by [hidden email]:
I'm also looking forward to Hi-DPI support being fully implemented in Pharo.

Until then, there is the "Display scale factor" slider and the ability to
change the font size. However, most have probably already noticed that
these controls don't affect the size of the mouse pointer, which can be
annoying as it's much harder to find on big screens.

I recently found this posting, which is helpful:

Scaling for HiDPI in Pharo:
1.) Evaluating "MenubarMorph reset" will fix the menu bar scaling factor.
2.) There's a SQUEAK_FAKEBIGCURSOR env var which you can set to 1 to have
the VM
display the cursor twice as big as normal. I've no idea why the word 'FAKE'
is
part of this; from the source it looks like it just creates a normal X11
cursor
that's twice as big as normal. This should work with Cuis, Squeak, and
Pharo,
as it's part of the VM.

I found that entering "export SQUEAK_FAKEBIGCURSOR=1" will cause standalone
Pharo to have a normal-looking pointer on 4K displays, but this does not
seem to work as expected with Pharo Launcher, or images launched with Pharo
Launcher.

After some investigation, I determined that the 'pharo-launcher', 'pharo'
and 'pharo-ui' bash scripts (for Pharo Launcher and Pharo IOT) can be
modified to make this work.

The trick is to add "env SQUEAK_FAKEBIGCURSOR=1" to the front of the command
that launches the VM/image within the above scripts.

I've fashioned a set of 'sed' one-liners to automate editing these scripts
accordingly, and am in the process of making a bash script that will use
them to add/remove/verify these edits in a user-friendly fashion. (I also
have scripts that install Pharo Launcher and Pharo IOT in Linux, that create
& add clickable launcher icons; my plan was to modify these scripts to write
the cursor size correction scripts into their respective folders when
they're installed.)

I'll make this available when it's complete, likely in the next couple of
days.



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: Hi-DPI Support

tbrunz
In reply to this post by Steffen Märcker
I've finished the script I mentioned and put it on GitHub; it's called
'pharo-adjust-cursor'.
https://github.com/tbrunz/installer_scripts

It will edit the bash scripts that launch Pharo applications (i.e.,
pharolauncher, pharoiot, etc.) to either enable or disable enlarging the GUI
pointer.  This is useful on Linux systems with a 4K hi-DPI screen, since
currently Pharo can enlarge its fonts and other GUI features, but not the
cursor.  (I don't have a Mac, so this is maybe not applicable to hi-dpi
Macs.)

The script can edit the Pharo application scripts "in both directions", to
either enlarge the cursor or return it to normal size, depending on the
option switch included on the command line. There are no side-effects caused
by running the script multiple times in a row. Edits will create a backup
file, with a name extension appended that reflects the script version backed
up. Restoring a backup must be done manually.

If run in a Pharo application directory (such as 'pharolauncher'), it will
edit the scripts in just that directory.  If run in a directory that
contains one or more Pharo app directories, it will edit the scripts in each
of them that it finds.  (If neither situation is met, it will complain, and
will complain if the expected Pharo bash scripts aren't found.)

Comments & suggestions for improvements are welcome...



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: Hi-DPI Support

Christopher Fuhrman-4
In reply to this post by tbrunz
Hello and thanks for the info regarding the SQUEAK_FAKEBIGCURSOR=1

It works for WSL (Windows Subsystem for Linux) and I added it to my blog:


Cheers

On Tue, 18 Feb 2020 at 11:43, tbrunz <[hidden email]> wrote:
I'm also looking forward to Hi-DPI support being fully implemented in Pharo.

Until then, there is the "Display scale factor" slider and the ability to
change the font size.  However, most have probably already noticed that
these controls don't affect the size of the mouse pointer, which can be
annoying as it's much harder to find on big screens.

I recently found this posting, which is helpful:

Scaling for HiDPI in Pharo:
1.) Evaluating "MenubarMorph reset" will fix the menu bar scaling factor. 
2.) There's a SQUEAK_FAKEBIGCURSOR env var which you can set to 1 to have
the VM
display the cursor twice as big as normal. I've no idea why the word 'FAKE'
is
part of this; from the source it looks like it just creates a normal X11
cursor
that's twice as big as normal. This should work with Cuis, Squeak, and
Pharo,
as it's part of the VM.

I found that entering "export SQUEAK_FAKEBIGCURSOR=1" will cause standalone
Pharo to have a normal-looking pointer on 4K displays, but this does not
seem to work as expected with Pharo Launcher, or images launched with Pharo
Launcher.

After some investigation, I determined that the 'pharo-launcher', 'pharo'
and 'pharo-ui' bash scripts (for Pharo Launcher and Pharo IOT) can be
modified to make this work. 

The trick is to add "env SQUEAK_FAKEBIGCURSOR=1" to the front of the command
that launches the VM/image within the above scripts.

I've fashioned a set of 'sed' one-liners to automate editing these scripts
accordingly, and am in the process of making a bash script that will use
them to add/remove/verify these edits in a user-friendly fashion.  (I also
have scripts that install Pharo Launcher and Pharo IOT in Linux, that create
& add clickable launcher icons; my plan was to modify these scripts to write
the cursor size correction scripts into their respective folders when
they're installed.)

I'll make this available when it's complete, likely in the next couple of
days.



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html



--
Christopher Fuhrman, P.Eng., PhD
Professeur au Département de génie logiciel et des technologies de l'information
ÉTS (École de technologie supérieure)

http://profs.etsmtl.ca/cfuhrman
+1 514 396 8638
L'ÉTS est une constituante de l'Université du Québec
Reply | Threaded
Open this post in threaded view
|

Re: Hi-DPI Support

tbrunz
By the way, I moved the location of my script into a new repository:

https://github.com/tbrunz/pharo-support

-t




--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html