Bigger menu for 4k (or bigger) displays

Detects screen size based on $xdisplay data.
If 4k or bigger uses Nimbus 14 for the menu.

Fixes #136.
This commit is contained in:
Gerardo Esteban Malazdrewicz 2023-01-04 05:24:00 -04:00
parent e11cc83620
commit 00d8aa0ebd

View file

@ -1276,10 +1276,16 @@ sub setup_repeat() {
sub create_windows() {
my ($self) = @_;
my ($screen_height) = $xdisplay->{height_in_pixels};
my ($screen_width) = $xdisplay->{width_in_pixels};
$self->debug( 2, "create_windows: started" );
$windows{main_window}
= MainWindow->new( -title => "ClusterSSH", -class => 'cssh', );
if ($screen_height * $screen_width >= 8294400) # display 4k or bigger
{
$windows{main_window}->optionAdd('*font', 'Nimbus 14'); # better for 4k displays
}
$windows{main_window}->withdraw; # leave withdrawn until needed
if ( defined( $self->config->{console_position} )