summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-05-12 16:27:01 +0200
committerhjk <hjk@qt.io>2023-05-12 14:54:01 +0000
commit4c1a161abd946b4bf51c6cc573728cf25f47876e (patch)
treee11a23b1bf3bf6c644e14feb08000a8af21adc2e
parent2b54ef80d18f84e628ae0c38c8f67dee1c059f18 (diff)
downloadqt-creator-4c1a161abd946b4bf51c6cc573728cf25f47876e.tar.gz
Utils: Fix some IntegerAspect value display issue
... when a display scale factor was set. Change-Id: I764db99e444f9cc70871c3dbec101d0b65542c4a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/libs/utils/aspects.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp
index 1eecb1de17..8aa1f77bee 100644
--- a/src/libs/utils/aspects.cpp
+++ b/src/libs/utils/aspects.cpp
@@ -1913,7 +1913,7 @@ void IntegerAspect::addToLayout(Layouting::LayoutItem &parent)
if (isAutoApply()) {
connect(d->m_spinBox.data(), &QSpinBox::valueChanged,
- this, [this] { setValue(d->m_spinBox->value()); });
+ this, [this] { setValue(d->m_spinBox->value() * d->m_displayScaleFactor); });
}
}
@@ -1940,7 +1940,7 @@ void IntegerAspect::setValue(qint64 value)
{
if (BaseAspect::setValueQuietly(value)) {
if (d->m_spinBox)
- d->m_spinBox->setValue(value);
+ d->m_spinBox->setValue(value / d->m_displayScaleFactor);
//qDebug() << "SetValue: Changing" << labelText() << " to " << value;
emit changed();
//QTC_CHECK(!labelText().isEmpty());