mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
Adjust width of Copy/Move dialog depending on initial screen width.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
6cd26f8385
commit
d3735c6c10
@ -823,7 +823,7 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation,
|
|||||||
{
|
{
|
||||||
const size_t FMDY = 13;
|
const size_t FMDY = 13;
|
||||||
const size_t FMDX = 68;
|
const size_t FMDX = 68;
|
||||||
size_t fmd_xlen = FMDX;
|
size_t fmd_xlen;
|
||||||
|
|
||||||
/* buttons */
|
/* buttons */
|
||||||
const size_t gap = 1;
|
const size_t gap = 1;
|
||||||
@ -883,6 +883,8 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation,
|
|||||||
i18n = TRUE;
|
i18n = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmd_xlen = max (FMDX, COLS * 2/3);
|
||||||
|
|
||||||
/* buttons */
|
/* buttons */
|
||||||
for (i = 0; i <= 2 - OFFSET; i++)
|
for (i = 0; i <= 2 - OFFSET; i++)
|
||||||
fmd_widgets[i].u.button.text = _(fmd_widgets[i].u.button.text);
|
fmd_widgets[i].u.button.text = _(fmd_widgets[i].u.button.text);
|
||||||
@ -908,7 +910,7 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation,
|
|||||||
#endif
|
#endif
|
||||||
b0_len = str_term_width1 (fmd_widgets[0].u.button.text) + 4; /* Cancel */
|
b0_len = str_term_width1 (fmd_widgets[0].u.button.text) + 4; /* Cancel */
|
||||||
len = b0_len + b1_len + b2_len;
|
len = b0_len + b1_len + b2_len;
|
||||||
fmd_xlen = max (fmd_xlen, len + 6);
|
fmd_xlen = min (max (fmd_xlen, len + 6), COLS);
|
||||||
|
|
||||||
if (only_one) {
|
if (only_one) {
|
||||||
int flen;
|
int flen;
|
||||||
|
Loading…
Reference in New Issue
Block a user