Skip to content
This repository was archived by the owner on Sep 3, 2019. It is now read-only.

Commit f30fb33

Browse files
committed
Merge pull request #471 from LLK/fix_ext_ui
Fixed the indicator placement and line before it
2 parents 74ab748 + 0517505 commit f30fb33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/scratch/PaletteBuilder.as

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ public class PaletteBuilder {
369369
return m;
370370
}
371371

372+
protected const pwidth:int = 215;
372373
protected function addExtensionSeparator(ext:ScratchExtension):void {
373374
function extensionMenu(ignore:*):void {
374375
var m:Menu = getExtensionMenu(ext);
@@ -386,7 +387,7 @@ public class PaletteBuilder {
386387
var indicator:IndicatorLight = new IndicatorLight(ext);
387388
indicator.addEventListener(MouseEvent.CLICK, function(e:Event):void {Scratch.app.showTip('extensions');}, false, 0, true);
388389
app.extensionManager.updateIndicator(indicator, ext);
389-
indicator.x = app.palette.width - 30;
390+
indicator.x = pwidth - 30;
390391
indicator.y = nextY + 2;
391392
app.palette.addChild(indicator);
392393

@@ -395,7 +396,7 @@ public class PaletteBuilder {
395396

396397
protected function addLineForExtensionTitle(titleButton:IconButton, ext:ScratchExtension):void {
397398
var x:int = titleButton.width + 12;
398-
addLine(x, nextY + 9, app.palette.width - x - 38);
399+
addLine(x, nextY + 9, pwidth - x - 38);
399400
}
400401

401402
private function addBlocksForExtension(ext:ScratchExtension):void {

0 commit comments

Comments
 (0)