From aa2780b4729ada4d4b8f39113145731e7176c277 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 20 Oct 2021 16:19:41 +0100 Subject: [PATCH 1/3] Set wxUSE_DPI_AWARE_MANIFEST=2 for all samples, not just toolbar This is required for high resolution bitmaps support and it will be needed in other samples too, so use it for all of them. This probably will result in some problems due to remaining bugs with high DPI support, but it should make them more noticeable and so should help with finding and fixing them. --- samples/sample.rc | 3 +++ samples/toolbar/toolbar.rc | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/sample.rc b/samples/sample.rc index b214b99b23..8d8636a72d 100644 --- a/samples/sample.rc +++ b/samples/sample.rc @@ -25,6 +25,9 @@ sample ICON "sample.ico" // for more information) #define wxUSE_NO_MANIFEST 0 +// To get DPI change events, we need to opt in into per monitor DPI support. +#define wxUSE_DPI_AWARE_MANIFEST 2 + // this is not always needed but doesn't hurt (except making the executable // very slightly larger): this file contains the standard icons, cursors, ... #include "wx/msw/wx.rc" diff --git a/samples/toolbar/toolbar.rc b/samples/toolbar/toolbar.rc index 8eac324424..52bbc440c4 100644 --- a/samples/toolbar/toolbar.rc +++ b/samples/toolbar/toolbar.rc @@ -1,6 +1,3 @@ -// To get DPI change events, we need to opt in into per monitor DPI support. -#define wxUSE_DPI_AWARE_MANIFEST 2 - #include "../sample.rc" new RCDATA "bitmaps/new.png" From 16f2c7bb89f237339e41da0773e6778738c288a6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 20 Oct 2021 16:34:38 +0100 Subject: [PATCH 2/3] Remove unused samples resource files These resource files didn't appear in the .bkl ones and so were not used at all and were not worth being used anyhow, as they didn't differ significantly from sample.rc. --- samples/calendar/calendar.rc | 2 -- samples/xti/xti.rc | 3 --- 2 files changed, 5 deletions(-) delete mode 100644 samples/calendar/calendar.rc delete mode 100644 samples/xti/xti.rc diff --git a/samples/calendar/calendar.rc b/samples/calendar/calendar.rc deleted file mode 100644 index 82bdf07561..0000000000 --- a/samples/calendar/calendar.rc +++ /dev/null @@ -1,2 +0,0 @@ -#include "wx/msw/wx.rc" - diff --git a/samples/xti/xti.rc b/samples/xti/xti.rc deleted file mode 100644 index b862bd2de8..0000000000 --- a/samples/xti/xti.rc +++ /dev/null @@ -1,3 +0,0 @@ -mondrian ICON "sample.ico" -#include "wx/msw/wx.rc" - From 5341bf5b60ca38630f215425239168dd98f6a5a2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 20 Oct 2021 17:47:47 +0200 Subject: [PATCH 3/3] Remove unnecessary win32-res tags from samples bakefiles Don't specify sample.rc as the resource file for the samples, it is used by default anyhow, so this is unnecessary. --- samples/animate/anitest.bkl | 1 - samples/collpane/collpane.bkl | 1 - samples/dataview/dataview.bkl | 1 - samples/popup/popup.bkl | 1 - samples/propgrid/propgrid.bkl | 1 - samples/ribbon/ribbon.bkl | 1 - samples/richtext/richtext.bkl | 1 - samples/splash/splash.bkl | 1 - samples/treectrl/treectrl.bkl | 1 - samples/validate/validate.bkl | 1 - samples/webview/webview.bkl | 1 - samples/widgets/widgets.bkl | 1 - 12 files changed, 12 deletions(-) diff --git a/samples/animate/anitest.bkl b/samples/animate/anitest.bkl index e7e4ae2d6b..12bac6ae6b 100644 --- a/samples/animate/anitest.bkl +++ b/samples/animate/anitest.bkl @@ -8,7 +8,6 @@ anitest.h core base - ../sample.rc diff --git a/samples/collpane/collpane.bkl b/samples/collpane/collpane.bkl index 631dfd905e..c83d473cbc 100644 --- a/samples/collpane/collpane.bkl +++ b/samples/collpane/collpane.bkl @@ -7,7 +7,6 @@ collpane.cpp core base - ../sample.rc diff --git a/samples/dataview/dataview.bkl b/samples/dataview/dataview.bkl index 56ad8f320b..b63aa4d2d0 100644 --- a/samples/dataview/dataview.bkl +++ b/samples/dataview/dataview.bkl @@ -8,7 +8,6 @@ mymodels.h core base - ../sample.rc diff --git a/samples/popup/popup.bkl b/samples/popup/popup.bkl index 794779dd1f..ad4669b3b7 100644 --- a/samples/popup/popup.bkl +++ b/samples/popup/popup.bkl @@ -6,6 +6,5 @@ popup.cpp core base - ../sample.rc diff --git a/samples/propgrid/propgrid.bkl b/samples/propgrid/propgrid.bkl index 71c103781c..c49cb3676a 100644 --- a/samples/propgrid/propgrid.bkl +++ b/samples/propgrid/propgrid.bkl @@ -17,7 +17,6 @@ propgrid core base - ../sample.rc diff --git a/samples/ribbon/ribbon.bkl b/samples/ribbon/ribbon.bkl index 31f4e93baf..3f20649021 100644 --- a/samples/ribbon/ribbon.bkl +++ b/samples/ribbon/ribbon.bkl @@ -10,7 +10,6 @@ ribbon core base - ../sample.rc diff --git a/samples/richtext/richtext.bkl b/samples/richtext/richtext.bkl index beb5b1c834..c68aa7b9bf 100644 --- a/samples/richtext/richtext.bkl +++ b/samples/richtext/richtext.bkl @@ -12,7 +12,6 @@ core xml base - ../sample.rc diff --git a/samples/splash/splash.bkl b/samples/splash/splash.bkl index 45f581b765..056594258f 100644 --- a/samples/splash/splash.bkl +++ b/samples/splash/splash.bkl @@ -9,7 +9,6 @@ media core base - ../sample.rc diff --git a/samples/treectrl/treectrl.bkl b/samples/treectrl/treectrl.bkl index 3caf1ea120..807544b6fc 100644 --- a/samples/treectrl/treectrl.bkl +++ b/samples/treectrl/treectrl.bkl @@ -8,7 +8,6 @@ treetest.h core base - ../sample.rc diff --git a/samples/validate/validate.bkl b/samples/validate/validate.bkl index bc72569d92..bbd8fdc68e 100644 --- a/samples/validate/validate.bkl +++ b/samples/validate/validate.bkl @@ -8,7 +8,6 @@ validate.h core base - ../sample.rc diff --git a/samples/webview/webview.bkl b/samples/webview/webview.bkl index b41f263b27..ac8f7a3f12 100644 --- a/samples/webview/webview.bkl +++ b/samples/webview/webview.bkl @@ -12,7 +12,6 @@ stc core base - ../sample.rc $(LIB_SCINTILLA) diff --git a/samples/widgets/widgets.bkl b/samples/widgets/widgets.bkl index fae2281674..5c85f3aa40 100644 --- a/samples/widgets/widgets.bkl +++ b/samples/widgets/widgets.bkl @@ -59,7 +59,6 @@ widgets.h itemcontainer.h core base - ../sample.rc