Base PollButtons on TileGroup instead of HGroup.

This commit is contained in:
Ghazi Triki 2018-03-28 19:56:27 +01:00
parent 032abb8539
commit 897bb88cbd
2 changed files with 8 additions and 5 deletions

View File

@ -65,7 +65,7 @@ package org.bigbluebutton.air.main.views {
_webcamDock.bottom = _menuButtons.height;
_pollButton.bottom = _menuButtons.height + getStyle("pollPadding");;
_pollButton.bottom = getStyle("pollPadding");;
}
}
}

View File

@ -1,10 +1,15 @@
package org.bigbluebutton.air.poll.views {
import spark.components.Button;
import spark.components.HGroup;
import spark.components.TileGroup;
import spark.layouts.ColumnAlign;
import org.bigbluebutton.air.poll.models.PollVO;
public class PollButtons extends HGroup {
public class PollButtons extends TileGroup {
public function PollButtons() {
columnAlign = ColumnAlign.JUSTIFY_USING_GAP;
}
public function addButtons(poll:PollVO):void {
var voteBtn:Button;
var numBtns:int = poll.answers.length;
@ -12,7 +17,6 @@ package org.bigbluebutton.air.poll.views {
for (var i:int = 0; i < numBtns; i++) {
voteBtn = new Button();
voteBtn.percentWidth = btnWidth;
voteBtn.height = 70;
voteBtn.styleName = "voteButton";
// To be localised
voteBtn.label = poll.answers[i].key;
@ -24,7 +28,6 @@ package org.bigbluebutton.air.poll.views {
override protected function updateDisplayList(w:Number, h:Number):void {
super.updateDisplayList(w, h);
this.gap = getStyle("gap");
this.padding = getStyle("padding");
}
}