commit b1d23469a80132e9a749ebe7f832ff8520a14e88
parent fad92ea274a9800a3892636599c64cc2d59f2a76
Author: lumidify <nobody@lumidify.org>
Date:   Thu,  9 Apr 2020 10:37:36 +0200
Account for window padding in image size calculation
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/viewer2.pl b/viewer2.pl
@@ -135,7 +135,8 @@ sub gui {
 	my $image_back_h = 0;
 	$window->signal_connect(configure_event => sub {
 		my ($window, $event) = @_;
-		$window_w = $event->width;
+		# subtract 20 to account for window border width
+		$window_w = $event->width - 20;
 		return FALSE;
 	});
 	$window->set_border_width(10);