Make wxTextCtrl horizontal margins proportional to DPI
Add more FromDIP() calls.
This commit is contained in:
parent
50aee9a0b3
commit
a38176c67a
1 changed files with 2 additions and 2 deletions
|
|
@ -2429,7 +2429,7 @@ wxSize wxTextCtrl::DoGetSizeFromTextSize(int xlen, int ylen) const
|
|||
int cx, cy;
|
||||
wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
|
||||
|
||||
DWORD wText = 1;
|
||||
DWORD wText = FromDIP(1);
|
||||
::SystemParametersInfo(SPI_GETCARETWIDTH, 0, &wText, 0);
|
||||
wText += xlen;
|
||||
|
||||
|
|
@ -2464,7 +2464,7 @@ wxSize wxTextCtrl::DoGetSizeFromTextSize(int xlen, int ylen) const
|
|||
// stand out).
|
||||
if ( !HasFlag(wxBORDER_NONE) )
|
||||
{
|
||||
wText += 9; // borders and inner margins
|
||||
wText += FromDIP(9); // borders and inner margins
|
||||
|
||||
// we have to add the adjustments for the control height only once, not
|
||||
// once per line, so do it after multiplication above
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue