Skip to content
Snippets Groups Projects
Commit 289c3e5c authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix dynamically calcluated list height bug when in T2B mode and top val given

In T2B (top to bottom centering) mode, the 'top' parametr value isn't actually
for the top of the window position (later), so just zero it here in case it
was specified (and non-zero) to correct the calcutation on the next lines:
```
	if(top+height>s_bottom)
		height=(s_bottom)-top;
```
parent c2f663c3
No related branches found
No related tags found
No related merge requests found
......@@ -713,6 +713,8 @@ int ulist(uifc_winmode_t mode, int left, int top, int width, int *cur, int *bar
if(mode&WIN_FIXEDHEIGHT) {
height=api->list_height;
}
if(mode & WIN_T2B)
top = 0; // This is overridden later, so don't use top in height calculation in T2B mode
if(top+height>s_bottom)
height=(s_bottom)-top;
if(optheight>height)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment