use client size to avoid gdk_window_get_frame_extents, which returns the full width of the screen for wxTaskBarIconArea
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -132,7 +132,7 @@ wxTaskBarIconArea::wxTaskBarIconArea(wxTaskBarIcon *icon, const wxBitmap &bmp)
|
||||
|
||||
// Set initial size to bitmap size (tray manager may and often will
|
||||
// change it):
|
||||
SetSize(wxSize(bmp.GetWidth(), bmp.GetHeight()));
|
||||
SetClientSize(wxSize(bmp.GetWidth(), bmp.GetHeight()));
|
||||
|
||||
SetTrayIcon(bmp);
|
||||
|
||||
@@ -149,7 +149,7 @@ void wxTaskBarIconArea::SetTrayIcon(const wxBitmap& bmp)
|
||||
m_bmp = bmp;
|
||||
|
||||
// determine suitable bitmap size:
|
||||
wxSize winsize(GetSize());
|
||||
wxSize winsize(GetClientSize());
|
||||
wxSize bmpsize(m_bmp.GetWidth(), m_bmp.GetHeight());
|
||||
wxSize iconsize(wxMin(winsize.x, bmpsize.x), wxMin(winsize.y, bmpsize.y));
|
||||
|
||||
|
Reference in New Issue
Block a user