@@ -90,8 +90,8 @@ void GridColumn::UpdateWidth(const agi::Context *c, WidthHelper &helper) {
9090void GridColumn::Paint (wxDC &dc, int x, int y, const AssDialogue *d, const agi::Context *c) const {
9191 wxString str = Value (d, c);
9292 if (Centered ())
93- x += (width - 6 - dc.GetTextExtent (str).GetWidth ()) / 2 ;
94- dc.DrawText (str, x + 4 , y + 2 );
93+ x += (width - dc. FromDIP ( 6 ) - dc.GetTextExtent (str).GetWidth ()) / 2 ;
94+ dc.DrawText (str, x + dc. FromDIP ( 4 ) , y + dc. FromDIP ( 2 ) );
9595}
9696
9797namespace {
@@ -335,12 +335,12 @@ class GridColumnCPS final : public GridColumn {
335335 double alpha = std::min ((double )(cps - cps_min + 1 ) / (cps_max - cps_min + 1 ), 1.0 );
336336 dc.SetBrush (wxBrush (blend (to_wx (bg_color->GetColor ()), dc.GetBrush ().GetColour (), alpha)));
337337 dc.SetPen (*wxTRANSPARENT_PEN);
338- dc.DrawRectangle (x, y + 1 , width, ext.GetHeight () + 3 );
338+ dc.DrawRectangle (x, y + 1 , width, ext.GetHeight () + dc. FromDIP ( 4 ) - 1 );
339339 dc.SetTextForeground (blend (*wxBLACK, tc, alpha));
340340 }
341341
342- x += (width + 2 - ext.GetWidth ()) / 2 ;
343- dc.DrawText (str, x, y + 2 );
342+ x += (width + dc. FromDIP ( 2 ) - ext.GetWidth ()) / 2 ;
343+ dc.DrawText (str, x, y + dc. FromDIP ( 2 ) );
344344 dc.SetTextForeground (tc);
345345 }
346346};
0 commit comments