From 04a8c1985b895b341f8be2413100d2cfad4f58bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 16 Oct 2008 18:53:58 +0000 Subject: [PATCH] fixed wxArtProvider::GetSizeHint() to return 16x16 for wxART_FRAME_ICON in non-wxGTK ports git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@56371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 4 +++- src/common/artprov.cpp | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 6d21154315..1f1d4ba26e 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -98,7 +98,8 @@ All: All (GUI): - Fixed wxHTML's pagebreaks computation in tables (D.J.Stauffer). -- Fixed wxRichTextCtrl input that uses Alt on Mac OS X, for example Polish Pro input. +- Fixed wxRichTextCtrl input that uses Alt on Mac OS X, for example + Polish Pro input. - Fixed wxHtmlWindow::SelectionToText() to correctly insert newlines after single-cell paragraphs. @@ -110,6 +111,7 @@ All (Unix): wxMSW: - Restored generation of events for accelerators when there is no menu bar. +- Fixed wxArtProvider::GetSizeHint() to return 16x16 for wxART_FRAME_ICON. wxGTK: diff --git a/src/common/artprov.cpp b/src/common/artprov.cpp index dd5cdb4bd5..6d0a4e88d9 100644 --- a/src/common/artprov.cpp +++ b/src/common/artprov.cpp @@ -30,6 +30,10 @@ #include "wx/module.h" #endif +#ifdef __WXMSW__ + #include "wx/msw/wrapwin.h" +#endif + // =========================================================================== // implementation // =========================================================================== @@ -272,7 +276,14 @@ wxArtProvider::~wxArtProvider() else if (client == wxART_MENU) return wxSize(16, 15); else if (client == wxART_FRAME_ICON) - return wxSize(16, 15); + { +#ifdef __WXMSW__ + return wxSize(::GetSystemMetrics(SM_CXSMICON), + ::GetSystemMetrics(SM_CYSMICON)); +#else + return wxSize(16, 16); +#endif // __WXMSW__/!__WXMSW__ + } else if (client == wxART_CMN_DIALOG || client == wxART_MESSAGE_BOX) return wxSize(32, 32); else if (client == wxART_HELP_BROWSER)