Disabled bitmaps of toolbar tools are now rendered at the correct position if using GTK3. Extend toolbar sample to include a button with a custom disabled bitmap.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -209,6 +209,7 @@ enum
|
||||
IDM_TOOLBAR_OTHER_1,
|
||||
IDM_TOOLBAR_OTHER_2,
|
||||
IDM_TOOLBAR_OTHER_3,
|
||||
IDM_TOOLBAR_OTHER_4,
|
||||
|
||||
// tools menu items
|
||||
IDM_TOOLBAR_ENABLEPRINT,
|
||||
@@ -300,7 +301,7 @@ bool MyApp::OnInit()
|
||||
// Create the main frame window
|
||||
MyFrame* frame = new MyFrame((wxFrame *) NULL, wxID_ANY,
|
||||
wxT("wxToolBar Sample"),
|
||||
wxPoint(100, 100), wxSize(650, 300));
|
||||
wxPoint(100, 100), wxSize(650, 350));
|
||||
|
||||
frame->Show(true);
|
||||
|
||||
@@ -739,6 +740,8 @@ void MyFrame::OnToggleAnotherToolbar(wxCommandEvent& WXUNUSED(event))
|
||||
m_tbar->AddRadioTool(IDM_TOOLBAR_OTHER_3, wxT("Third"), wxBITMAP(save));
|
||||
m_tbar->AddSeparator();
|
||||
m_tbar->AddTool(wxID_HELP, wxT("Help"), wxBITMAP(help));
|
||||
m_tbar->AddTool(IDM_TOOLBAR_OTHER_4, wxT("Disabled"), wxBITMAP(cut), wxBITMAP(paste));
|
||||
m_tbar->EnableTool(IDM_TOOLBAR_OTHER_4, false);
|
||||
|
||||
m_tbar->Realize();
|
||||
}
|
||||
|
Reference in New Issue
Block a user