TotalCross is a Software Development Kit that helps cross platform application development. Currently supported platforms are: Windows, Wince, Android, iOS, Linux and Linux ARM for embedded systems.
MessageBox's gap and insideGap parameters are not working. The UI behavior does not differ from the default when I change these parameters.
Device:
System OS: Angstrom OS 2017.12
TotalCross Version: 7.1.0
Architecture: ARM32
Device description: Toradex Colibri iMX6ULL
Expected behavior
When gap parameter is set, the space between the MessageBox buttons should change.
When insideGap parameter is set, the space between the text and the button border should change.
To Reproduce
You can reproduce this bug using the default simulator or deploying the code on the cited device.
setUIStyle(Settings.FLAT_UI);
public class Dialog extends MessageBox {
public Dialog(String title, String message, String[] buttons) {
super(title, message, buttons); //gap, insideGap and allSameWidth not working
Font big_font = Font.getFont(true, MaterialConstants.TEXT_SIZE_BIG);
messageFont = big_font;
buttonsFont = big_font;
messageForeColor = MaterialConstants.DIALOG_MSG_FORE_COLOR;
buttonForeColor = MaterialConstants.DIALOG_BTN_FORE_COLOR;
setTextAlignment(CENTER);
setRect(CENTER, CENTER, SCREENSIZE + 50, SCREENSIZE);
paddingBottom = 30;
}
}
new Dialog("", "Are you ok?\n", new String[]{"YES", "NO"}).popup();
Screenshots
super(title, message, buttons); // default gap and insideGap
super(title, message, buttons, 16, UnitsConverter.toPixels(48 + DP)); // set gap and insideGap
Describe the bug
MessageBox's
gap
andinsideGap
parameters are not working. The UI behavior does not differ from the default when I change these parameters.Device:
Expected behavior
When
gap
parameter is set, the space between the MessageBox buttons should change. WheninsideGap
parameter is set, the space between the text and the button border should change.To Reproduce
You can reproduce this bug using the default simulator or deploying the code on the cited device.
Screenshots
super(title, message, buttons);
// defaultgap
andinsideGap
super(title, message, buttons, 16, UnitsConverter.toPixels(48 + DP));
// setgap
andinsideGap