Fl_Native_File_Chooser_GTK: improve preview of text files on HiDPI

This commit is contained in:
ManoloFLTK 2024-03-18 18:12:50 +01:00
parent 478e724c5f
commit aac5e48875

View File

@ -576,7 +576,7 @@ static void update_preview_cb(GtkFileChooser *file_chooser, GtkImage* gtkimg)
img->scale(width, height);
width = img->w(), height = img->h();
}
Fl_Image_Surface *surf = new Fl_Image_Surface(width, height, 1);
Fl_Image_Surface *surf = new Fl_Image_Surface(width, height);
Fl_Surface_Device::push_current(surf);
fl_color(FL_WHITE);
fl_rectf(0, 0, width, height);