Fix fixed-width progress columns in generic wxDataViewCtrl.
Both native wxDVC implementations grow the progress column, the generic one didn't. This change fixes it and _seems_ not to break other things. As a consequence, progress columns no longer have a 40px minimal width, but that should be OK. Fixes #15745. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1195,7 +1195,11 @@ wxDataViewProgressRenderer::Render(wxRect rect, wxDC *dc, int WXUNUSED(state))
|
|||||||
|
|
||||||
wxSize wxDataViewProgressRenderer::GetSize() const
|
wxSize wxDataViewProgressRenderer::GetSize() const
|
||||||
{
|
{
|
||||||
return wxSize(40,12);
|
// Return -1 width because a progress bar fits any width; unlike most
|
||||||
|
// renderers, it doesn't have a "good" width for the content. This makes it
|
||||||
|
// grow to the whole column, which is pretty much always the desired
|
||||||
|
// behaviour. Keep the height fixed so that the progress bar isn't too fat.
|
||||||
|
return wxSize(-1, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user