diff --git a/sources/ui/inditextpropertieswidget.cpp b/sources/ui/inditextpropertieswidget.cpp index bae484752..afb2e0157 100644 --- a/sources/ui/inditextpropertieswidget.cpp +++ b/sources/ui/inditextpropertieswidget.cpp @@ -28,12 +28,14 @@ #include /** - @return width as shown in the width spin box: whole pixels, -1 for - the automatic width ("Auto"). + @return width as shown in the width spin box: whole pixels, 0 for the + automatic width ("Auto"). The box starts at 0, so no number means Auto + and the first step up is 1 px; IndependentTextItem::setTextWidth() + treats 0 as -1, the automatic width, so the two never disagree. */ static int spinBoxWidth(qreal width) { - return width > 0 ? qRound(width) : -1; + return width > 0 ? qRound(width) : 0; } /** diff --git a/sources/ui/inditextpropertieswidget.ui b/sources/ui/inditextpropertieswidget.ui index 6bdb94422..1572b1a34 100644 --- a/sources/ui/inditextpropertieswidget.ui +++ b/sources/ui/inditextpropertieswidget.ui @@ -148,13 +148,13 @@ px - -1 + 0 10000 - -1 + 0