From 437950ced1672617329ba103d1c322f5d19c0383 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Apr 2009 14:34:18 +0000 Subject: [PATCH] paint background by default to avoid unexpected sample appearance git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/image/image.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/samples/image/image.cpp b/samples/image/image.cpp index 47a2b9d3ae..fa45e38312 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -143,7 +143,8 @@ public: wxMenu *menu = new wxMenu; menu->Append(wxID_SAVE); menu->AppendSeparator(); - m_pClearBgMenu = menu->AppendCheckItem(ID_PAINT_BG, _T("&Paint background")); + menu->AppendCheckItem(ID_PAINT_BG, _T("&Paint background"), + "Uncheck this for transparent images"); menu->AppendSeparator(); menu->Append(ID_RESIZE, _T("&Fit to window\tCtrl-F")); menu->AppendSeparator(); @@ -154,6 +155,8 @@ public: mbar->Append(menu, _T("&Image")); SetMenuBar(mbar); + mbar->Check(ID_PAINT_BG, true); + CreateStatusBar(2); if ( numImages != 1 ) SetStatusText(wxString::Format("%d images", numImages), 1); @@ -176,7 +179,7 @@ public: { wxPaintDC dc(this); - if (m_pClearBgMenu->IsChecked()) + if ( GetMenuBar()->IsChecked(ID_PAINT_BG) ) ClearBackground(); const wxSize size = GetClientSize(); @@ -390,7 +393,6 @@ private: } wxBitmap m_bitmap; - wxMenuItem* m_pClearBgMenu; DECLARE_EVENT_TABLE() }; -- 2.47.2