| 121 | } |
| 122 | |
| 123 | MainScreen::MainScreen(void) : hid(rowlen * collen, collen) |
| 124 | { |
| 125 | selectionTimer = 0; |
| 126 | transferEnabled = Configuration::getInstance().transferEnabled(); |
| 127 | |
| 128 | // Detail action row. Backup is the primary (accent), Restore secondary, and |
| 129 | // Send sits between them while wireless transfer is enabled; |
| 130 | // layoutActionButtons() sizes the pair for whichever arrangement is current. |
| 131 | buttonBackupAL = |
| 132 | std::make_unique<Clickable>(ACTION_X, ACTION_Y, ACTION_W3, ACTION_H, COLOR_ACCENT, COLOR_WHITE, i18n::t("main.backup_short"), true); |
| 133 | buttonRestoreAL = |
| 134 | std::make_unique<Clickable>(ACTION_X, ACTION_Y, ACTION_W3, ACTION_H, COLOR_RAISED, COLOR_TEXT, i18n::t("main.restore_short"), true); |
| 135 | // Full-width batch-backup button shown only while multi-selecting. |
| 136 | buttonBackupAll = |
| 137 | std::make_unique<Clickable>(ACTION_X, ACTION_Y, ACTION_W, ACTION_H, COLOR_ACCENT, COLOR_WHITE, i18n::t("main.backup_selected"), true); |
| 138 | buttonSend = std::make_unique<Clickable>( |
| 139 | ACTION_X + ACTION_W3 + ACTION_GAP, ACTION_Y, ACTION_W3, ACTION_H, COLOR_RAISED, COLOR_TEXT, i18n::t("transfer.send"), true); |
| 140 | layoutActionButtons(); |
| 141 | directoryList = std::make_unique<BackupList>(12, 70, 296, 106, 5); |
| 142 | buttonBackupAll->canChangeColorWhenSelected(true); |
| 143 | buttonBackupAL->canChangeColorWhenSelected(true); |
| 144 | buttonRestoreAL->canChangeColorWhenSelected(true); |
| 145 | buttonSend->canChangeColorWhenSelected(true); |
| 146 | |
| 147 | ver = StringUtils::versionString(); |
| 148 | |
| 149 | C2D_PlainImageTint(&flagTint, COLOR_TEAL, 1.0f); |
| 150 | C2D_PlainImageTint(&checkboxTint, COLOR_BLUE, 1.0f); // blue check on the white selection chip |
| 151 | C2D_PlainImageTint(&starTint, COLOR_BLACK, 1.0f); // black star on the gold favorite chip |
| 152 | } |
| 153 | |
| 154 | // Sizes Backup/Restore for the current action-row arrangement: thirds while Send |
| 155 | // shares the row, halves of it otherwise. Called whenever transferEnabled |
nothing calls this directly
no test coverage detected