Adjust the magic incantations to fix spacing

This is my first commit, so bear with me if I've violated any standards here!

I've bumped a few offsets to fix text clipping in the Get Info window. The proper
long-term fix is to recreate this window with the layout library, but that's
a substantially larger job.

Patch set 1
Before: https://i.imgur.com/S7Pl5Qv.png
After: https://i.imgur.com/bd3H1Kw.png

Patch set 3
French: https://i.imgur.com/rpmUb5T.png
German: https://i.imgur.com/ca9DecW.png
Portuguese: https://i.imgur.com/dE8sKFI.png

The font size in the Permissions drop-down is fixed. I had previously bumped it to
12, to be inline with the default font size present in a new Haiku install. However,
that produced text clipping for French and other locales. I reverted it back to 10,
and now longer strings fit as-is.

Change-Id: I7f4412b10074c76eb5b023a231bdb6b230c8f35a
Reviewed-on: https://review.haiku-os.org/c/1073
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Zach Dykstra 2019-02-20 23:48:51 -06:00 committed by Adrien Destugues
parent 1f0635d227
commit 579b9cd9b9

View File

@ -63,7 +63,7 @@ public:
void Draw(BRect invalidate)
{
RotateBy(-M_PI / 5);
TranslateBy(0, Bounds().Height() / 1.5);
TranslateBy(0, Bounds().Height() / 3);
BStringView::Draw(invalidate);
}
};
@ -182,7 +182,7 @@ FilePermissionsView::FilePermissionsView(BRect rect, Model* model)
}
const float kTextControlLeft = 170, kTextControlRight = 270,
kTextControlTop = kRowLabelTop - 19,
kTextControlTop = kRowLabelTop - 29,
kTextControlHeight = 14, kTextControlSpacing = 16;
strView = new BStringView(BRect(kTextControlLeft, kTextControlTop,
@ -202,9 +202,9 @@ FilePermissionsView::FilePermissionsView(BRect rect, Model* model)
AddChild(fOwnerTextControl);
strView = new BStringView(BRect(kTextControlLeft,
kTextControlTop + 5 + 2 * kTextControlSpacing,
kTextControlTop + 11 + 2 * kTextControlSpacing,
kTextControlRight,
kTextControlTop + 2 + 2 * kTextControlSpacing
kTextControlTop + 11 + 2 * kTextControlSpacing
+ kTextControlHeight),
"", B_TRANSLATE("Group"));
strView->SetAlignment(B_ALIGN_CENTER);
@ -212,9 +212,9 @@ FilePermissionsView::FilePermissionsView(BRect rect, Model* model)
AddChild(strView);
fGroupTextControl = new BTextControl(BRect(kTextControlLeft,
kTextControlTop + 3 * kTextControlSpacing,
kTextControlTop + 10 + 3 * kTextControlSpacing,
kTextControlRight,
kTextControlTop + 3 * kTextControlSpacing + kTextControlHeight),
kTextControlTop + 10 + 3 * kTextControlSpacing + kTextControlHeight),
"", "", "", new BMessage(kNewGroupEntered));
fGroupTextControl->SetDivider(0);
AddChild(fGroupTextControl);