Commit bf7646a6 authored by Sergey Galin's avatar Sergey Galin

Remove pointless word "logical"

parent 5be30c1b
......@@ -182,9 +182,9 @@ QAndroidDisplayMetrics::QAndroidDisplayMetrics(
, density_(1.0f)
, densityDpi_(160)
, scaledDensity_(1.0f)
, logicalDensityFromCurrentTheme_(1.0f)
, densityFromCurrentTheme_(1.0f)
, scaledDensityFromCurrentTheme_(1.0f)
, logicalDensityFromHardwareDpiTheme_(1.0f)
, densityFromHardwareDpiTheme_(1.0f)
, scaledDensityFromHardwareDpiTheme_(1.0f)
, physicalXDpi_(160.0f)
, physicalYDpi_(160.0f)
......@@ -219,13 +219,13 @@ QAndroidDisplayMetrics::QAndroidDisplayMetrics(
themeFromDensityDpi_ = themeFromLogicalDensity(densityDpi_, allow_intermediate_densities);
themeFromHardwareDpi_ = themeFromHardwareDensity(realisticPhysicalDpi_, allow_intermediate_densities);
logicalDensityFromCurrentTheme_ = densityFromTheme(themeFromDensityDpi_);
logicalDensityFromHardwareDpiTheme_ = densityFromTheme(themeFromHardwareDpi_);
densityFromCurrentTheme_ = densityFromTheme(themeFromDensityDpi_);
densityFromHardwareDpiTheme_ = densityFromTheme(themeFromHardwareDpi_);
const float scale = (density_ > 0.0f) ? (scaledDensity_ / density_) : 1.0f;
scaledDensityFromCurrentTheme_ = logicalDensityFromCurrentTheme_ * scale;
scaledDensityFromHardwareDpiTheme_ = logicalDensityFromHardwareDpiTheme_ * scale;
scaledDensityFromCurrentTheme_ = densityFromCurrentTheme_ * scale;
scaledDensityFromHardwareDpiTheme_ = densityFromHardwareDpiTheme_ * scale;
qDebug()
<< "QAndroidDisplayMetrics: DP =" << density()
......@@ -236,11 +236,11 @@ QAndroidDisplayMetrics::QAndroidDisplayMetrics(
<< "/ W =" << widthPixels() << "/ H =" << heightPixels()
<< "/ SYSTEM THEME:" << static_cast<int>(themeFromDensityDpi_) << themeDirectoryName()
<< "/ density =" << logicalDensityFromCurrentTheme_
<< "/ density =" << densityFromCurrentTheme_
<< "/ scaled =" << scaledDensityFromCurrentTheme_
<< "/ HARDWARE THEME:" << static_cast<int>(themeFromHardwareDpi_) << themeDirectoryName(themeFromHardwareDpi_)
<< "/ density =" << logicalDensityFromHardwareDpiTheme_
<< "/ density =" << densityFromHardwareDpiTheme_
<< "/ scale =" << scaledDensityFromHardwareDpiTheme_;
}
......
......@@ -74,9 +74,9 @@ private:
Q_PROPERTY(float density READ density)
Q_PROPERTY(int densityDpi READ densityDpi)
Q_PROPERTY(float scaledDensity READ scaledDensity)
Q_PROPERTY(float logicalDensityFromCurrentTheme READ logicalDensityFromCurrentTheme)
Q_PROPERTY(float densityFromCurrentTheme READ densityFromCurrentTheme)
Q_PROPERTY(float scaledDensityFromCurrentTheme READ scaledDensityFromCurrentTheme)
Q_PROPERTY(float logicalDensityFromHardwareDpiTheme READ logicalDensityFromHardwareDpiTheme)
Q_PROPERTY(float densityFromHardwareDpiTheme READ densityFromHardwareDpiTheme)
Q_PROPERTY(float scaledDensityFromHardwareDpiTheme READ scaledDensityFromHardwareDpiTheme)
Q_PROPERTY(float xdpi READ xdpi)
Q_PROPERTY(float ydpi READ ydpi)
......@@ -126,7 +126,7 @@ public:
// This is the number used to scale layout designed for a device with default (medium)
// resolution (160 DPI) to match the current device.
// Note: some devices have wrong density value based on wrong physical DPI value.
// It is safer to use logicalDensityFromCurrentTheme() or scaledDensityFromCurrentTheme(),
// It is safer to use densityFromCurrentTheme() or scaledDensityFromCurrentTheme(),
// especially when supporting older Androids.
float density() const { return density_; }
......@@ -162,11 +162,11 @@ public:
// This is more reliable as some older devices have wrong density value, but
// logical DPI is always correct.
// Old name: densityFromDpi().
float logicalDensityFromCurrentTheme() const { return logicalDensityFromCurrentTheme_; }
float densityFromCurrentTheme() const { return densityFromCurrentTheme_; }
// Get screen density for the theme based on the hardware parameters rather than
// the the manufacturer's choice.
float logicalDensityFromHardwareDpiTheme() const { return logicalDensityFromHardwareDpiTheme_; }
float densityFromHardwareDpiTheme() const { return densityFromHardwareDpiTheme_; }
// Workaround function: get screen densityFromDpi() and apply user setting
// for UI scaling.
......@@ -203,9 +203,9 @@ private:
float density_;
int densityDpi_;
float scaledDensity_;
float logicalDensityFromCurrentTheme_;
float densityFromCurrentTheme_;
float scaledDensityFromCurrentTheme_;
float logicalDensityFromHardwareDpiTheme_;
float densityFromHardwareDpiTheme_;
float scaledDensityFromHardwareDpiTheme_;
float physicalXDpi_;
float physicalYDpi_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment