mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
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:
@@ -118,8 +118,6 @@ void TitleBlockDimensionWidget::initWidgets() {
|
|||||||
spinbox_label_ = new QLabel(tr("Largeur :", "default dialog label"));
|
spinbox_label_ = new QLabel(tr("Largeur :", "default dialog label"));
|
||||||
|
|
||||||
spinbox_ = new QSpinBox();
|
spinbox_ = new QSpinBox();
|
||||||
spinbox_ -> setMinimum(5);
|
|
||||||
spinbox_ -> setMaximum(10000);
|
|
||||||
spinbox_ -> setValue(50);
|
spinbox_ -> setValue(50);
|
||||||
|
|
||||||
// extra widgets, for the user to specify whether the value is absolute, relative, etc.
|
// extra widgets, for the user to specify whether the value is absolute, relative, etc.
|
||||||
@@ -167,8 +165,12 @@ void TitleBlockDimensionWidget::initLayouts() {
|
|||||||
void TitleBlockDimensionWidget::updateSpinBoxSuffix() {
|
void TitleBlockDimensionWidget::updateSpinBoxSuffix() {
|
||||||
if (complete_ && dimension_type_ -> checkedId() != QET::Absolute) {
|
if (complete_ && dimension_type_ -> checkedId() != QET::Absolute) {
|
||||||
spinbox_ -> setSuffix(tr("%", "spinbox suffix when changing the dimension of a row/column"));
|
spinbox_ -> setSuffix(tr("%", "spinbox suffix when changing the dimension of a row/column"));
|
||||||
|
spinbox_ -> setMinimum(1);
|
||||||
|
spinbox_ -> setMaximum(100);
|
||||||
} else {
|
} else {
|
||||||
spinbox_ -> setSuffix(tr("px", "spinbox suffix when changing the dimension of a row/column"));
|
spinbox_ -> setSuffix(tr("px", "spinbox suffix when changing the dimension of a row/column"));
|
||||||
|
spinbox_ -> setMinimum(5);
|
||||||
|
spinbox_ -> setMaximum(10000);
|
||||||
}
|
}
|
||||||
spinbox_ -> selectAll();
|
spinbox_ -> selectAll();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user