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:
parent
43a3d8de3f
commit
66a207d9bd
@ -251,6 +251,7 @@ PageSetupWindow::PageSetupWindow(BMessage *msg, const char *printerName)
|
||||
for (num = 0; num <= 9; num++) {
|
||||
fScaleControl->TextView()->AllowChar('0' + num);
|
||||
}
|
||||
fScaleControl->TextView()->SetMaxBytes(3);
|
||||
|
||||
panel->AddChild(fScaleControl);
|
||||
|
||||
@ -302,6 +303,9 @@ PageSetupWindow::UpdateSetupMessage()
|
||||
if (scale <= 0.0) { // sanity check
|
||||
scale = 100.0;
|
||||
}
|
||||
if (scale > 1000.0) {
|
||||
scale = 1000.0;
|
||||
}
|
||||
SetFloat(fSetupMsg, "scale", scale);
|
||||
|
||||
float scaleR = 100.0 / scale;
|
||||
|
Loading…
Reference in New Issue
Block a user