Wide status bars can afford to give the text more room.
This commit is contained in:
parent
4b63c7012d
commit
32461c91e9
|
@ -191,7 +191,12 @@ wxString KIUI::EllipsizeStatusText( wxWindow* aWindow, const wxString& aString )
|
||||||
msg.Replace( wxT( "\t" ), wxT( " " ) );
|
msg.Replace( wxT( "\t" ), wxT( " " ) );
|
||||||
|
|
||||||
wxClientDC dc( aWindow );
|
wxClientDC dc( aWindow );
|
||||||
return wxControl::Ellipsize( msg, dc, wxELLIPSIZE_END, aWindow->GetSize().GetWidth() / 3 );
|
int statusWidth = aWindow->GetSize().GetWidth();
|
||||||
|
|
||||||
|
// 30% of the first 800 pixels plus 60% of the remaining width
|
||||||
|
int textWidth = std::min( statusWidth, 800 ) * 0.3 + std::max( statusWidth - 800, 0 ) * 0.6;
|
||||||
|
|
||||||
|
return wxControl::Ellipsize( msg, dc, wxELLIPSIZE_END, textWidth );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue