mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
GUI: Some text and UI fixes
This commit is contained in:
@@ -351,17 +351,19 @@ MomentumApp* momentum_app_alloc() {
|
||||
app->dolphin_angry = stats.butthurt;
|
||||
furi_record_close(RECORD_DOLPHIN);
|
||||
|
||||
app->version_tag = furi_string_alloc_printf("%s ", version_get_version(NULL));
|
||||
if(furi_string_start_with(app->version_tag, "mntm-dev")) {
|
||||
furi_string_set(app->version_tag, "MNTM-DEV ");
|
||||
const char* sha = version_get_githash(NULL);
|
||||
const uint8_t sha_len = strlen(sha) <= 7 ? strlen(sha) : 7;
|
||||
for(size_t i = 0; i < sha_len; ++i) {
|
||||
furi_string_push_back(app->version_tag, toupper(sha[i]));
|
||||
app->version_tag = furi_string_alloc_set(version_get_version(NULL));
|
||||
size_t sha_pos = furi_string_search_char(app->version_tag, '-', strlen("mntm-"));
|
||||
if(sha_pos != FURI_STRING_FAILURE) {
|
||||
// Change second "-" to " " and make uppercase
|
||||
furi_string_replace_at(app->version_tag, sha_pos, 1, " ");
|
||||
for(size_t i = 0; i < furi_string_size(app->version_tag); ++i) {
|
||||
furi_string_set_char(
|
||||
app->version_tag, i, toupper(furi_string_get_char(app->version_tag, i)));
|
||||
}
|
||||
} else {
|
||||
// Make uppercase and add build date after space
|
||||
furi_string_replace(app->version_tag, "mntm", "MNTM");
|
||||
furi_string_cat(app->version_tag, version_get_builddate(NULL));
|
||||
furi_string_cat_printf(app->version_tag, " %s", version_get_builddate(NULL));
|
||||
}
|
||||
|
||||
return app;
|
||||
|
||||
@@ -103,7 +103,7 @@ bool momentum_app_scene_protocols_on_event(void* context, SceneManagerEvent even
|
||||
bool change = !value; // Change without confirm if going from ON to OFF
|
||||
if(value) {
|
||||
DialogMessage* msg = dialog_message_alloc();
|
||||
dialog_message_set_header(msg, "Are you sure?", 64, 0, AlignCenter, AlignTop);
|
||||
dialog_message_set_header(msg, "Are you sure?", 64, 4, AlignCenter, AlignTop);
|
||||
dialog_message_set_buttons(msg, "No", NULL, "Yes");
|
||||
dialog_message_set_text(
|
||||
msg,
|
||||
@@ -116,7 +116,7 @@ bool momentum_app_scene_protocols_on_event(void* context, SceneManagerEvent even
|
||||
"Use at own risk, may\n"
|
||||
"damage Flipper",
|
||||
64,
|
||||
32,
|
||||
36,
|
||||
AlignCenter,
|
||||
AlignCenter);
|
||||
if(dialog_message_show(app->dialogs, msg) == DialogMessageButtonRight) {
|
||||
|
||||
Reference in New Issue
Block a user