This commit is contained in:
Valeria Fadeeva 2023-11-25 03:05:59 +05:00
parent 9d6904f3a5
commit 846b740ec3
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) {
global.status = "password";
if(!global.dialog)
if (!global.dialog)
dialog_setup();
else
dialog_opacity(1);
@ -466,8 +466,8 @@ function display_password_callback(prompt_text, bullets) {
LINE_WIDTH = 100;
for(index = LINE_WIDTH; index > 0; index--) {
if((LINE_WIDTH * common_symbol.width) > (dialog.box_form.width - (padding_left_right * 2))) {
for (index = LINE_WIDTH; index > 0; index--) {
if ((LINE_WIDTH * common_symbol.width) > (dialog.box_form.width - (padding_left_right * 2))) {
LINE_WIDTH = LINE_WIDTH - 1;
}
else {
@ -481,9 +481,11 @@ function display_password_callback(prompt_text, bullets) {
line_count = i;
}
if (str_len % line_count > 0) {
if (str_len > LINE_WIDTH) {
if (str_len % LINE_WIDTH > 0) {
line_count = line_count + 1;
}
}
i = 1;
start = 0;
@ -491,7 +493,7 @@ function display_password_callback(prompt_text, bullets) {
text = "";
for(i = 1; i <= line_count; i++) {
for (i = 1; i <= line_count; i++) {
text += prompt_text.SubString(start, end);
text += "\n";

View File

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