mirror of
https://github.com/scratchfoundation/scratch-flash.git
synced 2024-12-13 09:31:15 -05:00
Merge pull request #277 from nathan/procedure-editor-label-overflow
Fixed overlap of labels in procedure editor in certain languages
This commit is contained in:
commit
6242cbd14e
1 changed files with 9 additions and 3 deletions
|
@ -350,12 +350,18 @@ public class ProcedureSpecEditor extends Sprite {
|
||||||
moreLabel.x = 10;
|
moreLabel.x = 10;
|
||||||
moreLabel.y = moreButton.y - 4;
|
moreLabel.y = moreButton.y - 4;
|
||||||
|
|
||||||
|
var labelX:int = blockShape.x + 45;
|
||||||
|
var buttonX:int = 240;
|
||||||
|
for each (var l:TextField in buttonLabels) {
|
||||||
|
buttonX = Math.max(buttonX, labelX + l.textWidth + 10);
|
||||||
|
}
|
||||||
|
|
||||||
var rowY:int = blockShape.y + blockShape.height + 30;
|
var rowY:int = blockShape.y + blockShape.height + 30;
|
||||||
for (var i:int = 0; i < buttons.length; i++) {
|
for (var i:int = 0; i < buttons.length; i++) {
|
||||||
var label:TextField = buttonLabels[i];
|
var label:TextField = buttonLabels[i];
|
||||||
buttonLabels[i].x = blockShape.x + 45;
|
buttonLabels[i].x = labelX;
|
||||||
buttonLabels[i].y = rowY;
|
buttonLabels[i].y = rowY;
|
||||||
buttons[i].x = 240;
|
buttons[i].x = buttonX;
|
||||||
buttons[i].y = rowY - 4;
|
buttons[i].y = rowY - 4;
|
||||||
rowY += 30;
|
rowY += 30;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue