Document that FromDIP() is not needed with SetToolBitmapSize()
wxMSW wxToolBar adjusts the bitmap size to DPI automatically.
This commit is contained in:
@@ -860,6 +860,11 @@ public:
|
|||||||
Sets the default size of each tool bitmap. The default bitmap size is 16
|
Sets the default size of each tool bitmap. The default bitmap size is 16
|
||||||
by 15 pixels.
|
by 15 pixels.
|
||||||
|
|
||||||
|
Note that @a size does @e not need to be multiplied by the
|
||||||
|
DPI-dependent factor even under MSW, where it would normally be
|
||||||
|
necessary, as the toolbar adjusts this size to the current DPI
|
||||||
|
automatically.
|
||||||
|
|
||||||
@param size
|
@param size
|
||||||
The size of the bitmaps in the toolbar.
|
The size of the bitmaps in the toolbar.
|
||||||
|
|
||||||
|
@@ -410,6 +410,9 @@ void MyFrame::PopulateToolbar(wxToolBarBase* toolBar)
|
|||||||
h *= 2;
|
h *= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note that there is no need for FromDIP() here, wxMSW will adjust the
|
||||||
|
// size on its own and under the other platforms there is no need for
|
||||||
|
// scaling the coordinates anyhow.
|
||||||
toolBar->SetToolBitmapSize(wxSize(w, h));
|
toolBar->SetToolBitmapSize(wxSize(w, h));
|
||||||
|
|
||||||
toolBar->AddTool(wxID_NEW, "New",
|
toolBar->AddTool(wxID_NEW, "New",
|
||||||
|
Reference in New Issue
Block a user