Set upper bound for scaling factor.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10615 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -251,6 +251,7 @@ PageSetupWindow::PageSetupWindow(BMessage *msg, const char *printerName)
|
|||||||
for (num = 0; num <= 9; num++) {
|
for (num = 0; num <= 9; num++) {
|
||||||
fScaleControl->TextView()->AllowChar('0' + num);
|
fScaleControl->TextView()->AllowChar('0' + num);
|
||||||
}
|
}
|
||||||
|
fScaleControl->TextView()->SetMaxBytes(3);
|
||||||
|
|
||||||
panel->AddChild(fScaleControl);
|
panel->AddChild(fScaleControl);
|
||||||
|
|
||||||
@@ -302,6 +303,9 @@ PageSetupWindow::UpdateSetupMessage()
|
|||||||
if (scale <= 0.0) { // sanity check
|
if (scale <= 0.0) { // sanity check
|
||||||
scale = 100.0;
|
scale = 100.0;
|
||||||
}
|
}
|
||||||
|
if (scale > 1000.0) {
|
||||||
|
scale = 1000.0;
|
||||||
|
}
|
||||||
SetFloat(fSetupMsg, "scale", scale);
|
SetFloat(fSetupMsg, "scale", scale);
|
||||||
|
|
||||||
float scaleR = 100.0 / scale;
|
float scaleR = 100.0 / scale;
|
||||||
|
|||||||
Reference in New Issue
Block a user