merge beru's changes
This commit is contained in:
@@ -509,20 +509,25 @@ namespace nana{
|
||||
#endif
|
||||
}
|
||||
|
||||
bool native_interface::window_icon(native_window_type wd, const nana::paint::image& img)
|
||||
bool native_interface::window_icon(native_window_type wd, const nana::paint::image& sml_icon, const ::nana::paint::image& big_icon)
|
||||
{
|
||||
#if defined(NANA_WINDOWS)
|
||||
HICON ico = paint::image_accessor::icon(img);
|
||||
if(ico)
|
||||
HICON sml_handle = paint::image_accessor::icon(sml_icon);
|
||||
HICON big_handle = paint::image_accessor::icon(big_icon);
|
||||
if(sml_handle || big_handle)
|
||||
{
|
||||
nana::detail::platform_spec::instance().keep_window_icon(wd, img);
|
||||
::SendMessage(reinterpret_cast<HWND>(wd), WM_SETICON, ICON_BIG, reinterpret_cast<LPARAM>(ico));
|
||||
::SendMessage(reinterpret_cast<HWND>(wd), WM_SETICON, ICON_SMALL, reinterpret_cast<WPARAM>(ico));
|
||||
nana::detail::platform_spec::instance().keep_window_icon(wd, sml_icon, big_icon);
|
||||
if (sml_handle)
|
||||
::SendMessage(reinterpret_cast<HWND>(wd), WM_SETICON, ICON_SMALL, reinterpret_cast<WPARAM>(sml_handle));
|
||||
|
||||
if (big_handle)
|
||||
::SendMessage(reinterpret_cast<HWND>(wd), WM_SETICON, ICON_BIG, reinterpret_cast<LPARAM>(big_handle));
|
||||
return true;
|
||||
}
|
||||
#elif defined(NANA_X11)
|
||||
if(wd && (false == img.empty()))
|
||||
if(wd && (!sml_icon.empty() || !big_icon.empty()))
|
||||
{
|
||||
auto & img = (sml_icon.empty() ? big_icon : sml_icon);
|
||||
|
||||
const nana::paint::graphics & graph = restrict::spec.keep_window_icon(wd, img);
|
||||
XWMHints hints;
|
||||
@@ -537,7 +542,8 @@ namespace nana{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool native_interface::window_icon(native_window_type wd, const paint::image& big_icon, const paint::image& small_icon)
|
||||
/*
|
||||
bool native_interface::window_icon(native_window_type wd, const paint::image& big_icon, const paint::image& small_icon) //deprecated
|
||||
{
|
||||
#if defined(NANA_WINDOWS)
|
||||
HICON h_big_icon = paint::image_accessor::icon(big_icon);
|
||||
@@ -558,6 +564,7 @@ namespace nana{
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user