X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c067fe3c1e752658c63b4d556eb6a5468213860..e779b609386a67e2ea0ab62d4ed5d6d9d41fc933:/src/univ/topluniv.cpp diff --git a/src/univ/topluniv.cpp b/src/univ/topluniv.cpp index e14b122ab5..a7c87890d6 100644 --- a/src/univ/topluniv.cpp +++ b/src/univ/topluniv.cpp @@ -18,18 +18,19 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif +#include "wx/toplevel.h" + #ifndef WX_PRECOMP #include "wx/dcclient.h" #include "wx/settings.h" + #include "wx/bitmap.h" + #include "wx/image.h" #endif -#include "wx/toplevel.h" #include "wx/univ/renderer.h" -#include "wx/bitmap.h" -#include "wx/image.h" #include "wx/cshelp.h" #include "wx/evtloop.h" @@ -96,8 +97,7 @@ bool wxTopLevelWindow::Create(wxWindow *parent, wxSYSTEM_MENU | wxRESIZE_BORDER | wxFRAME_TOOL_WINDOW | wxRESIZE_BORDER); style |= wxSIMPLE_BORDER; - SetExtraStyle(exstyleOrig & - ~(wxFRAME_EX_CONTEXTHELP | wxDIALOG_EX_CONTEXTHELP)); + SetExtraStyle(exstyleOrig & ~wxWS_EX_CONTEXTHELP); } if ( !wxTopLevelWindowNative::Create(parent, id, title, pos, @@ -153,7 +153,7 @@ long wxTopLevelWindow::GetDecorationsStyle() const style |= wxTOPLEVEL_BUTTON_MAXIMIZE; } #if wxUSE_HELP - if ( m_exStyle & (wxFRAME_EX_CONTEXTHELP | wxDIALOG_EX_CONTEXTHELP)) + if ( m_exStyle & wxWS_EX_CONTEXTHELP) style |= wxTOPLEVEL_BUTTON_HELP; #endif } @@ -239,12 +239,7 @@ void wxTopLevelWindow::OnNcPaint(wxNcPaintEvent& event) else { // get the window rect - wxRect rect; - wxSize size = GetSize(); - rect.x = - rect.y = 0; - rect.width = size.x; - rect.height = size.y; + wxRect rect(GetSize()); wxWindowDC dc(this); m_renderer->DrawFrameTitleBar(dc, rect, @@ -309,12 +304,14 @@ void wxTopLevelWindow::SetIcons(const wxIconBundle& icons) m_titlebarIcon = wxNullIcon; else if ( bmp1.GetWidth() == size.x && bmp1.GetHeight() == size.y ) m_titlebarIcon = icon; +#if wxUSE_IMAGE else { wxImage img = bmp1.ConvertToImage(); img.Rescale(size.x, size.y); m_titlebarIcon.CopyFromBitmap(wxBitmap(img)); } +#endif // wxUSE_IMAGE } } }