Dialog now themeable
This commit is contained in:
@@ -149,12 +149,12 @@ class FailSafePage : public Page {
|
||||
class RegisterDialog: public Dialog {
|
||||
public:
|
||||
explicit RegisterDialog(uint8_t moduleIdx):
|
||||
Dialog(STR_REGISTER, {50, 73, LCD_W - 100, LCD_H - 146}),
|
||||
Dialog(STR_REGISTER, {50, 73, LCD_W - 100, 0}),
|
||||
moduleIdx(moduleIdx)
|
||||
{
|
||||
FormGridLayout grid(form.width());
|
||||
grid.setLabelWidth(150);
|
||||
grid.spacer(PAGE_LINE_HEIGHT + 8);
|
||||
grid.spacer(PAGE_PADDING);
|
||||
|
||||
// Register ID
|
||||
new StaticText(&form, grid.getLabelSlot(), STR_REG_ID);
|
||||
@@ -179,7 +179,12 @@ class RegisterDialog: public Dialog {
|
||||
return 0;
|
||||
});
|
||||
exitButton->setFocus();
|
||||
grid.nextLine();
|
||||
grid.spacer(PAGE_PADDING);
|
||||
|
||||
FormField::link(exitButton, edit);
|
||||
form.setHeight(grid.getWindowHeight());
|
||||
content->adjustHeight();
|
||||
|
||||
start();
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
#include "checkbox.h"
|
||||
//#include "checkbox.h"
|
||||
//#include "modal_window.h"
|
||||
|
||||
extern ThemeBase * defaultTheme;
|
||||
const BitmapBuffer * ThemeBase::asterisk = NULL;
|
||||
@@ -238,3 +239,8 @@ MenuWindowContent * createMenuWindow(Menu * menu)
|
||||
{
|
||||
return new MenuWindowContent(menu);
|
||||
}
|
||||
|
||||
ModalWindowContent * createDialogWindow(Dialog * dialog, const rect_t & rect)
|
||||
{
|
||||
return new ModalWindowContent(dialog, rect);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ constexpr coord_t INPUT_EDIT_CURVE_TOP = MENU_HEADER_HEIGHT;
|
||||
constexpr coord_t MENUS_LINE_HEIGHT = 30;
|
||||
constexpr coord_t MENUS_WIDTH = 200;
|
||||
constexpr coord_t MENUS_OFFSET_TOP = 20;
|
||||
constexpr coord_t MENUS_HEADER_HEIGHT = 30;
|
||||
constexpr coord_t POPUP_HEADER_HEIGHT = 30;
|
||||
constexpr coord_t MENUS_MIN_HEIGHT = 2 * MENUS_LINE_HEIGHT - 1;
|
||||
constexpr coord_t MENUS_MAX_HEIGHT = 7 * MENUS_LINE_HEIGHT - 1;
|
||||
constexpr coord_t MODEL_SELECT_FOOTER_HEIGHT = 24;
|
||||
|
||||
@@ -153,7 +153,7 @@ constexpr coord_t INPUT_EDIT_CURVE_TOP = MENU_HEADER_HEIGHT;
|
||||
constexpr coord_t MENUS_LINE_HEIGHT = 40;
|
||||
constexpr coord_t MENUS_WIDTH = 200;
|
||||
constexpr coord_t MENUS_OFFSET_TOP = 20;
|
||||
constexpr coord_t MENUS_HEADER_HEIGHT = 40;
|
||||
constexpr coord_t POPUP_HEADER_HEIGHT = 40;
|
||||
constexpr coord_t MENUS_MIN_HEIGHT = 2 * MENUS_LINE_HEIGHT - 1;
|
||||
constexpr coord_t MENUS_MAX_HEIGHT = 7 * MENUS_LINE_HEIGHT - 1;
|
||||
constexpr coord_t MODEL_SELECT_FOOTER_HEIGHT = 24;
|
||||
|
||||
Reference in New Issue
Block a user