Style: double instead of qreal

This commit is contained in:
Klaus Basan
2018-08-13 23:43:46 +02:00
parent 755455e8a4
commit c0ea2d4c14
2 changed files with 7 additions and 7 deletions

View File

@@ -260,7 +260,7 @@ namespace BlackGui
CApplication::exit(retcode);
}
void CGuiApplication::highDpiScreenSupport(qreal scaleFactor)
void CGuiApplication::highDpiScreenSupport(double scaleFactor)
{
if (scaleFactor < 0)
{
@@ -318,8 +318,8 @@ namespace BlackGui
{
// setMinimumSizeInCharacters sets m_minHeightChars/m_minWidthChars
QSize cs = mw->size();
if (m_minWidthChars > 0) { cs.setWidth(fontMetricEstSize.width()); }
if (m_minHeightChars > 0) { cs.setHeight(fontMetricEstSize.height()); }
if (m_minWidthChars > 0) { cs.setWidth(qRound(fontMetricEstSize.width())); }
if (m_minHeightChars > 0) { cs.setHeight(qRound(fontMetricEstSize.height())); }
mw->resize(cs);
}
}
@@ -381,7 +381,7 @@ namespace BlackGui
return html;
}
qreal CGuiApplication::parseScaleFactor(int argc, char *argv[])
double CGuiApplication::parseScaleFactor(int argc, char *argv[])
{
for (int i = 1; i < argc; ++i)
{
@@ -390,7 +390,7 @@ namespace BlackGui
if (i + 1 >= argc) { return -1.0; } // no value
const QString factor(argv[i + 1]);
bool ok;
qreal f = factor.toFloat(&ok);
const double f = factor.toDouble(&ok);
return ok ? f : -1.0;
}
}

View File

@@ -236,13 +236,13 @@ namespace BlackGui
//! Support for high DPI screens
//! \note Needs to be at the beginning of main
static void highDpiScreenSupport(qreal scaleFactor = -1);
static void highDpiScreenSupport(double scaleFactor = -1);
//! Uses the high DPI support?
static bool isUsingHighDpiScreenSupport();
//! Parse scale factor if any
static qreal parseScaleFactor(int argc, char *argv[]);
static double parseScaleFactor(int argc, char *argv[]);
signals:
//! Style sheet changed