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
This commit is contained in:
xavier
2012-02-27 18:31:47 +00:00
parent f7d27f25a1
commit ef2958eab1

View File

@@ -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();
}