Backgrounds: right-align X and Y position boxes
Change-Id: Ice9e51ca30235a6ec28a8a07cf3fea3da43f1414 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3051 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
788899a8c2
commit
2eb1389dc1
@ -99,9 +99,15 @@ BackgroundsView::BackgroundsView()
|
||||
fYPlacementText = new BTextControl(B_TRANSLATE("Y:"), NULL,
|
||||
new BMessage(kMsgImagePlacement));
|
||||
|
||||
// right-align text view
|
||||
fXPlacementText->TextView()->SetAlignment(B_ALIGN_RIGHT);
|
||||
fYPlacementText->TextView()->SetAlignment(B_ALIGN_RIGHT);
|
||||
|
||||
// max 5 characters allowed
|
||||
fXPlacementText->TextView()->SetMaxBytes(5);
|
||||
fYPlacementText->TextView()->SetMaxBytes(5);
|
||||
|
||||
// limit to numbers only
|
||||
for (int32 i = 0; i < 256; i++) {
|
||||
if ((i < '0' || i > '9') && i != '-') {
|
||||
fXPlacementText->TextView()->DisallowChar(i);
|
||||
|
Loading…
Reference in New Issue
Block a user