From ef2958eab19ddf3569008cd1b1ffaa49b5a03b42 Mon Sep 17 00:00:00 2001 From: xavier Date: Mon, 27 Feb 2012 18:31:47 +0000 Subject: [PATCH] Title block template editor: percentage are now bound within 1-100 range git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1539 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/titleblock/dimensionwidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/titleblock/dimensionwidget.cpp b/sources/titleblock/dimensionwidget.cpp index 02ccef912..32757ad33 100644 --- a/sources/titleblock/dimensionwidget.cpp +++ b/sources/titleblock/dimensionwidget.cpp @@ -118,8 +118,6 @@ void TitleBlockDimensionWidget::initWidgets() { spinbox_label_ = new QLabel(tr("Largeur :", "default dialog label")); spinbox_ = new QSpinBox(); - spinbox_ -> setMinimum(5); - spinbox_ -> setMaximum(10000); spinbox_ -> setValue(50); // extra widgets, for the user to specify whether the value is absolute, relative, etc. @@ -167,8 +165,12 @@ void TitleBlockDimensionWidget::initLayouts() { void TitleBlockDimensionWidget::updateSpinBoxSuffix() { if (complete_ && dimension_type_ -> checkedId() != QET::Absolute) { spinbox_ -> setSuffix(tr("%", "spinbox suffix when changing the dimension of a row/column")); + spinbox_ -> setMinimum(1); + spinbox_ -> setMaximum(100); } else { spinbox_ -> setSuffix(tr("px", "spinbox suffix when changing the dimension of a row/column")); + spinbox_ -> setMinimum(5); + spinbox_ -> setMaximum(10000); } spinbox_ -> selectAll(); }