From d9232f2f1c054c2b4e4df016fc9b040899f6c18b Mon Sep 17 00:00:00 2001 From: David Runge Date: Mon, 25 Jul 2016 19:40:09 +0200 Subject: classes/BowelyzerGUI.sc: Make width of controlsGroupButton dependant on its amount of letters in the name. --- classes/BowelyzerGUI.sc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/BowelyzerGUI.sc b/classes/BowelyzerGUI.sc index fc5444b..162f26a 100644 --- a/classes/BowelyzerGUI.sc +++ b/classes/BowelyzerGUI.sc @@ -392,7 +392,7 @@ BowelyzerGUI{ // setup a Button for a control group by name setupControlsGroupButton{ arg group, parent; - Button(parent: parent, bounds: Rect(0, 0, buttonWidth, buttonHeight)) + Button(parent: parent, bounds: Rect(0, 0, (8*group.asString.size), buttonHeight)) .states_([ [group.asString, Color.black, Color.fromHexString("#99FF99")] ]) @@ -400,7 +400,6 @@ BowelyzerGUI{ arg controlUnit; this.showControlsByType(controlUnit.string, controlUnit.parent.children, controlUnit.parent.parent); }) - .maxSize_(buttonWidth@buttonHeight) .name_(group.asString++"Button") ; } -- cgit v1.2.3-70-g09d2