summaryrefslogtreecommitdiffstats
path: root/source/a/dialog/dialog.no.aspect.ratio.autoajust.patch
blob: 7bce97b80df205ef31e879f08feca5cd3fac3cf0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- ./util.c.orig	2019-11-10 17:20:58.000000000 -0600
+++ ./util.c	2019-12-07 14:40:23.404722986 -0600
@@ -1237,28 +1237,6 @@
     justify_text((WINDOW *) 0, prompt, max_y, max_x, &high, &wide);
     car = (float) (wide / high);
 
-    /*
-     * If the aspect ratio is greater than it should be, then decrease the
-     * width proportionately.
-     */
-    if (car > ar) {
-	float diff = car / (float) ar;
-	max_x = (int) ((float) wide / diff + 4);
-	justify_text((WINDOW *) 0, prompt, max_y, max_x, &high, &wide);
-	car = (float) wide / (float) high;
-    }
-
-    /*
-     * If the aspect ratio is too small after decreasing the width, then
-     * incrementally increase the width until the aspect ratio is equal to or
-     * greater than the specified aspect ratio.
-     */
-    while (car < ar && max_x < max_width) {
-	max_x += 4;
-	justify_text((WINDOW *) 0, prompt, max_y, max_x, &high, &wide);
-	car = (float) (wide / high);
-    }
-
     *height = high;
     *width = wide;
 }