Cleaned up wxArtProvider:
1. Move platform-specific code for both GetSizeHint() and GetBitmap() into platform-specific files. 2. Introduced GetNativeSizeHint() to make native sizes better accessible, without having to understand weird GetSizeHint() semantics. 3. Fixed GetNativeSizeHint() to return sensible values in non-GTK ports; it returns wxDefaultSize if it can't make a good guess instead of returning arbitrary value. 4. Use 16x16 icons on MSW instead of 16x15: it works and is more 'natural' size. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -193,11 +193,29 @@ public:
|
||||
const wxSize& size = wxDefaultSize);
|
||||
|
||||
/**
|
||||
Returns a suitable size hint for the given @e wxArtClient. If
|
||||
@a platform_default is @true, return a size based on the current platform,
|
||||
otherwise return the size from the topmost wxArtProvider. @e wxDefaultSize may
|
||||
be returned if the client doesn't have a specified size, like wxART_OTHER for
|
||||
example.
|
||||
Returns native icon size for use specified by @a client hint.
|
||||
|
||||
If the platform has no commonly used default for this use or if
|
||||
@a client is not recognized, returns wxDefaultSize.
|
||||
|
||||
@note In some cases, a platform may have @em several appropriate
|
||||
native sizes (for example, wxART_FRAME_ICON for frame icons).
|
||||
In that case, this method returns only one of them, picked
|
||||
reasonably.
|
||||
|
||||
@since 2.9.0
|
||||
*/
|
||||
static wxSize GetNativeSizeHint(const wxArtClient& client);
|
||||
|
||||
/**
|
||||
Returns a suitable size hint for the given @e wxArtClient.
|
||||
|
||||
If @a platform_default is @true, return a size based on the current
|
||||
platform using GetNativeSizeHint(), otherwise return the size from the
|
||||
topmost wxArtProvider. @e wxDefaultSize may be returned if the client
|
||||
doesn't have a specified size, like wxART_OTHER for example.
|
||||
|
||||
@see GetNativeSizeHint()
|
||||
*/
|
||||
static wxSize GetSizeHint(const wxArtClient& client,
|
||||
bool platform_default = false);
|
||||
|
Reference in New Issue
Block a user