Changed character used for width to be an X instead of 0

This commit is contained in:
mjbudd77 2020-08-03 20:20:48 -04:00
parent b0529d564a
commit 0fdf8cec14
1 changed files with 3 additions and 3 deletions

View File

@ -37,12 +37,12 @@ GuiCheatsDialog_t::GuiCheatsDialog_t(QWidget *parent)
QGroupBox *groupBox;
QFrame *frame;
QScreen *screen = QGuiApplication::primaryScreen();
int devPixRatio = 1;
double devPixRatio = 1.0f;
if ( screen != NULL )
{
devPixRatio = (int)( screen->devicePixelRatio() + 0.50f);
printf("Pix Ratio: %i \n", devPixRatio );
printf("Pix Ratio: %f \n", devPixRatio );
}
font.setStyle( QFont::StyleNormal );
@ -50,7 +50,7 @@ GuiCheatsDialog_t::GuiCheatsDialog_t(QWidget *parent)
QFontMetrics fm(font);
fontCharWidth = fm.boundingRect('0').width() * devPixRatio;
fontCharWidth = fm.boundingRect('X').width() * devPixRatio;
setWindowTitle("Cheat Search");