wxMaxima
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
test_ArtProviderSizeHint.cpp File Reference

Regression test for GH #2483: wxMaxima built against wxQt 3.2 aborted on startup. More...

#include <wx/app.h>
#include <wx/artprov.h>
#include <wx/bmpbndl.h>
#include <wx/frame.h>
#include <wx/log.h>
#include "wxMaximaArtProvider.h"
#include <catch2/catch.hpp>
Include dependency graph for test_ArtProviderSizeHint.cpp:

Data Structures

class  TestApp
 

Functions

 SCENARIO ("Toolbar icons have pixels even if the port knows no size hint")
 
 wxDECLARE_APP (TestApp)
 
int main (int argc, char **argv)
 

Detailed Description

Regression test for GH #2483: wxMaxima built against wxQt 3.2 aborted on startup.

wxQt 3.2 has no native art provider, so wxArtProvider::GetSizeHint() answers wxDefaultSize there for every client, including wxART_TOOLBAR. Our SVG toolbar icons were then created with that "size", which gave bitmaps without any pixels: invisible icons, and the disabled "follow" button failed an assertion on every repaint when wxAUI tried to grey it out.

This test reproduces the port's behaviour on every port by pushing an art provider that knows no size hint and no images on top of ours, as wxQt 3.2's default provider does.