Add a class derived from GtkImage to support HiDPI bitmaps

And use it to get HiDPI support wherever we use GtkImage. This extends and
consolidates support for custom drawing of images which has already been added
somewhat redundantly in several places.
This commit is contained in:
Paul Cornett
2020-09-15 11:52:03 -07:00
parent cb04c35365
commit 85d63c3150
14 changed files with 314 additions and 134 deletions

View File

@@ -19,6 +19,7 @@
#include "wx/gtk/private.h"
#include "wx/gtk/private/list.h"
#include "wx/gtk/private/image.h"
// ----------------------------------------------------------------------------
// GTK callbacks
@@ -98,7 +99,7 @@ bool wxButton::Create(wxWindow *parent,
{
m_widget = gtk_button_new();
GtkWidget *image = gtk_image_new();
GtkWidget* image = wxGtkImage::New(this);
gtk_widget_show(image);
gtk_container_add(GTK_CONTAINER(m_widget), image);
}