This commit is contained in:
Valeria Fadeeva 2023-11-25 03:04:54 +05:00
parent cdc3738441
commit ffc46c4960
2 changed files with 16 additions and 12 deletions

View File

@ -456,7 +456,7 @@ Plymouth.SetDisplayNormalFunction(display_normal_callback);
function display_password_callback(prompt_text, bullets) { function display_password_callback(prompt_text, bullets) {
global.status = "password"; global.status = "password";
if(!global.dialog) if (!global.dialog)
dialog_setup(); dialog_setup();
else else
dialog_opacity(1); dialog_opacity(1);
@ -466,8 +466,8 @@ function display_password_callback(prompt_text, bullets) {
LINE_WIDTH = 100; LINE_WIDTH = 100;
for(index = LINE_WIDTH; index > 0; index--) { for (index = LINE_WIDTH; index > 0; index--) {
if((LINE_WIDTH * common_symbol.width) > (dialog.box_form.width - (padding_left_right * 2))) { if ((LINE_WIDTH * common_symbol.width) > (dialog.box_form.width - (padding_left_right * 2))) {
LINE_WIDTH = LINE_WIDTH - 1; LINE_WIDTH = LINE_WIDTH - 1;
} }
else { else {
@ -481,8 +481,10 @@ function display_password_callback(prompt_text, bullets) {
line_count = i; line_count = i;
} }
if (str_len % line_count > 0) { if (str_len > LINE_WIDTH) {
line_count = line_count + 1; if (str_len % LINE_WIDTH > 0) {
line_count = line_count + 1;
}
} }
i = 1; i = 1;
@ -491,7 +493,7 @@ function display_password_callback(prompt_text, bullets) {
text = ""; text = "";
for(i = 1; i <= line_count; i++) { for (i = 1; i <= line_count; i++) {
text += prompt_text.SubString(start, end); text += prompt_text.SubString(start, end);
text += "\n"; text += "\n";

View File

@ -456,7 +456,7 @@ Plymouth.SetDisplayNormalFunction(display_normal_callback);
fun display_password_callback(prompt_text, bullets) { fun display_password_callback(prompt_text, bullets) {
global.status = "password"; global.status = "password";
if(!global.dialog) if (!global.dialog)
dialog_setup(); dialog_setup();
else else
dialog_opacity(1); dialog_opacity(1);
@ -466,8 +466,8 @@ fun display_password_callback(prompt_text, bullets) {
LINE_WIDTH = 100; LINE_WIDTH = 100;
for(index = LINE_WIDTH; index > 0; index--) { for (index = LINE_WIDTH; index > 0; index--) {
if((LINE_WIDTH * common_symbol.width) > (dialog.box_form.width - (padding_left_right * 2))) { if ((LINE_WIDTH * common_symbol.width) > (dialog.box_form.width - (padding_left_right * 2))) {
LINE_WIDTH = LINE_WIDTH - 1; LINE_WIDTH = LINE_WIDTH - 1;
} }
else { else {
@ -481,8 +481,10 @@ fun display_password_callback(prompt_text, bullets) {
line_count = i; line_count = i;
} }
if (str_len % line_count > 0) { if (str_len > LINE_WIDTH) {
line_count = line_count + 1; if (str_len % LINE_WIDTH > 0) {
line_count = line_count + 1;
}
} }
i = 1; i = 1;
@ -491,7 +493,7 @@ fun display_password_callback(prompt_text, bullets) {
text = ""; text = "";
for(i = 1; i <= line_count; i++) { for (i = 1; i <= line_count; i++) {
text += prompt_text.SubString(start, end); text += prompt_text.SubString(start, end);
text += "\n"; text += "\n";