File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 11master
22
33- do our own tile snapping if gtk has no snap mechanism
4+ - high-dpi support
45
56## 4.1.0 26/07/25
67
Original file line number Diff line number Diff line change @@ -444,6 +444,18 @@ imageui_get_zoom(Imageui *imageui)
444444 return zoom ;
445445}
446446
447+ double
448+ imageui_get_pixel_size (Imageui * imageui )
449+ {
450+ double pixel_size ;
451+
452+ g_object_get (imageui ,
453+ "pixel-size" , & pixel_size ,
454+ NULL );
455+
456+ return pixel_size ;
457+ }
458+
447459static gboolean
448460imageui_tick (GtkWidget * widget , GdkFrameClock * frame_clock , gpointer user_data )
449461{
@@ -566,7 +578,7 @@ imageui_magout(Imageui *imageui)
566578void
567579imageui_oneone (Imageui * imageui )
568580{
569- imageui_zoom_to_eased (imageui , 1.0 );
581+ imageui_zoom_to_eased (imageui , imageui_get_pixel_size ( imageui ) );
570582}
571583
572584static void
@@ -800,7 +812,8 @@ imageui_key_pressed(GtkEventControllerKey *self,
800812 if (state & GDK_CONTROL_MASK )
801813 zoom = 1.0 / zoom ;
802814
803- imageui_zoom_to_eased (imageui , zoom );
815+ imageui_zoom_to_eased (imageui ,
816+ zoom * imageui_get_pixel_size (imageui ));
804817
805818 handled = TRUE;
806819 break ;
You can’t perform that action at this time.
0 commit comments