diff --git a/dialogs.cpp b/dialogs.cpp index 354ee2b7..0890c643 100644 --- a/dialogs.cpp +++ b/dialogs.cpp @@ -380,7 +380,7 @@ EX namespace dialog { return y; } - EX int tothei, dialogwidth, dfsize, dfspace, leftwidth, rightwidth, innerwidth, itemx, keyx, valuex, top, list_starts_at, list_ends_at, list_full_size, list_actual_size, list_skip, fwidth; + EX int tothei, dialogwidth, dfsize, dfspace, odfspace, leftwidth, rightwidth, innerwidth, itemx, keyx, valuex, top, list_starts_at, list_ends_at, list_full_size, list_actual_size, list_skip, fwidth; EX string highlight_text; EX int highlight_key; @@ -404,7 +404,7 @@ EX namespace dialog { list_starts_at = tothei; else if(items[i].type == diListEnd) { list_full_size = tothei - list_starts_at; - list_actual_size = min(dfspace * list_size_max / 100, max(dfsize * list_size_min / 100, list_full_size)); + list_actual_size = min(odfspace * list_size_max / 100, max(odfspace * list_size_min / 100, list_full_size)); if(list_full_size < list_actual_size) list_full_size = list_actual_size; tothei = list_ends_at = list_starts_at + list_actual_size; } @@ -552,6 +552,7 @@ EX namespace dialog { dfsize *= 3; #endif dfspace = dfsize * 5/4; + odfspace = dfspace; dcenter = vid.xres/2; dwidth = vid.xres; @@ -567,13 +568,16 @@ EX namespace dialog { int adfsize = int(dfsize * sqrt((vid.yres - 5. * vid.fsize) / tothei)); if(adfsize < dfsize-1) dfsize = adfsize + 1; else dfsize--; - dfspace = dfsize * 5/4; + odfspace = dfspace = dfsize * 5/4; measure(); } while(dialogwidth > dwidth) { int adfsize = int(dfsize * sqrt(vid.xres * 1. / dialogwidth)); if(adfsize < dfsize-1) dfsize = adfsize + 1; - else dfsize--; // keep dfspace + else dfsize--; + // usually we want to keep dfspace, but with NARROW_LINES, just odfspace + if(cmode & sm::NARROW_LINES) + dfspace = (dfsize + 3) * 5 / 4; measure(); } diff --git a/expansion.cpp b/expansion.cpp index 92b6fe8e..00943315 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -711,7 +711,7 @@ void expansion_analyzer::view_distances_dialog() { dynamicval dv(distcolors[0], forecolor); dialog::init(""); - cmode |= sm::DIALOG_STRICT_X | sm::EXPANSION | sm::AUTO_VALUES; + cmode |= sm::DIALOG_STRICT_X | sm::EXPANSION | sm::AUTO_VALUES | sm::NARROW_LINES; int maxlen = last_distance; vector qty(maxlen); diff --git a/graph.cpp b/graph.cpp index 49bcb303..8421f8b8 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5689,6 +5689,7 @@ namespace sm { static const int DARKEN = (1<<21); // darken the game background static const int NOSCR = (1<<22); // do not show the game background static const int AUTO_VALUES = (1<<23); // automatic place for values + static const int NARROW_LINES = (1<<24); // do make the lines narrower if we needed to reduce width } #endif