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
This commit is contained in:
@@ -143,7 +143,8 @@ public:
|
|||||||
wxMenu *menu = new wxMenu;
|
wxMenu *menu = new wxMenu;
|
||||||
menu->Append(wxID_SAVE);
|
menu->Append(wxID_SAVE);
|
||||||
menu->AppendSeparator();
|
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->AppendSeparator();
|
||||||
menu->Append(ID_RESIZE, _T("&Fit to window\tCtrl-F"));
|
menu->Append(ID_RESIZE, _T("&Fit to window\tCtrl-F"));
|
||||||
menu->AppendSeparator();
|
menu->AppendSeparator();
|
||||||
@@ -154,6 +155,8 @@ public:
|
|||||||
mbar->Append(menu, _T("&Image"));
|
mbar->Append(menu, _T("&Image"));
|
||||||
SetMenuBar(mbar);
|
SetMenuBar(mbar);
|
||||||
|
|
||||||
|
mbar->Check(ID_PAINT_BG, true);
|
||||||
|
|
||||||
CreateStatusBar(2);
|
CreateStatusBar(2);
|
||||||
if ( numImages != 1 )
|
if ( numImages != 1 )
|
||||||
SetStatusText(wxString::Format("%d images", numImages), 1);
|
SetStatusText(wxString::Format("%d images", numImages), 1);
|
||||||
@@ -176,7 +179,7 @@ public:
|
|||||||
{
|
{
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
|
|
||||||
if (m_pClearBgMenu->IsChecked())
|
if ( GetMenuBar()->IsChecked(ID_PAINT_BG) )
|
||||||
ClearBackground();
|
ClearBackground();
|
||||||
|
|
||||||
const wxSize size = GetClientSize();
|
const wxSize size = GetClientSize();
|
||||||
@@ -390,7 +393,6 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxBitmap m_bitmap;
|
wxBitmap m_bitmap;
|
||||||
wxMenuItem* m_pClearBgMenu;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user