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:
@@ -165,6 +165,10 @@ public:
|
||||
static wxIconBundle GetIconBundle(const wxArtID& id,
|
||||
const wxArtClient& client = wxART_OTHER);
|
||||
|
||||
// Gets native size for given 'client' or wxDefaultSize if it doesn't
|
||||
// have native equivalent
|
||||
static wxSize GetNativeSizeHint(const wxArtClient& client);
|
||||
|
||||
// Get the size hint of an icon from a specific wxArtClient, queries
|
||||
// the topmost provider if platform_dependent = false
|
||||
static wxSize GetSizeHint(const wxArtClient& client, bool platform_dependent = false);
|
||||
@@ -222,4 +226,12 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#if !defined(__WXUNIVERSAL__) && \
|
||||
(defined(__WXGTK__) || defined(__WXMSW__) || \
|
||||
(defined(__WXMAC__) && wxOSX_USE_CARBON))
|
||||
// *some* (partial) native implementation of wxArtProvider exists; this is
|
||||
// not the same as wxArtProvider::HasNativeProvider()!
|
||||
#define wxHAS_NATIVE_ART_PROVIDER_IMPL
|
||||
#endif
|
||||
|
||||
#endif // _WX_ARTPROV_H_
|
||||
|
Reference in New Issue
Block a user