Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix code generating when wxWidgets 3.1 is set #1330

Merged
merged 6 commits into from
Dec 10, 2023

Conversation

Randalphwa
Copy link
Collaborator

This PR fixes a number of problems when generating code with wxWidgets 3.1 selected, mostly related to how images are loaded (wxImage versus wxBitmapBundle).

Support was already in place for a wxWizard that had a bitmap, but not
for creating one without.
The problem with using BitmapBundle() is it requires including bmpbndl.h just
to get the BitmapBundle() declaration even though it might not be used
anywhere else in the generated code. That requires conditionals around both
the header file and the Create() function. Using wxNullBitmap works fine
as an alternative to BitmapBundle() as far as wxWidgets 3.2 and beyond is
concerned.
Weight() and using a float for a point size were not supported until 3.1.2.
This will likely get replaced in a future wxWidgets code update, but in the
meantime it shuts off a non-stop assert while doing some testing on
wxUE code generation.
This is primarily for the wxRibbon toolbar -- under 3.2, this generates a
bundle and then extracts a bitmap that matches the DPI size. Under 3.1,
there is no DPI scaling and no wxBitmapBundle, so only a simple bitmap
is needed.
This fixes problems with code generation for bundles/bitmaps when a
conditional for 3.1.6 is in place.
@Randalphwa Randalphwa merged commit 109607b into main Dec 10, 2023
@Randalphwa Randalphwa deleted the wxWidgets_3_1_conditionals branch December 10, 2023 00:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant