mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Documentation scroll fixes
This commit is contained in:
parent
c53c7b4157
commit
fafd6a7550
3 changed files with 78 additions and 53 deletions
|
@ -155,9 +155,17 @@ namespace IDE.ui
|
|||
curDocStr = new String(pragma, Math.Min(splitEnum.MatchPos + 1, pragma.Length));
|
||||
curDocStr.Trim();
|
||||
|
||||
mParamInfo[new String(paramName)] = curDocStr;
|
||||
if (mParamInfo.TryAddAlt(paramName, var keyPtr, var valuePtr))
|
||||
{
|
||||
*keyPtr = new String(paramName);
|
||||
*valuePtr = curDocStr;
|
||||
lineHadContent = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
defer:: delete curDocStr;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pragmaName == "brief")
|
||||
{
|
||||
|
|
|
@ -411,6 +411,9 @@ namespace IDE.ui
|
|||
return;
|
||||
}
|
||||
|
||||
if ((!mListViews.IsEmpty) && (mListViews[0].mVertScrollbar != null))
|
||||
return;
|
||||
|
||||
if (evt.mSender != mWidgetWindow)
|
||||
{
|
||||
var widgetWindow = evt.mSender as BFWindow;
|
||||
|
@ -1195,6 +1198,8 @@ namespace IDE.ui
|
|||
float height = childHeights + GS!(6);
|
||||
|
||||
float maxHeight = font.GetLineSpacing() * 12 + 6.001f;
|
||||
void CheckScrollbar()
|
||||
{
|
||||
if (height > maxHeight)
|
||||
{
|
||||
if (listView.mVertScrollbar == null)
|
||||
|
@ -1206,6 +1211,8 @@ namespace IDE.ui
|
|||
HandleEditLostFocus(mEditWidget);
|
||||
});
|
||||
var thumb = listView.mVertScrollbar.mThumb;
|
||||
if (!wantWordWrap)
|
||||
{
|
||||
thumb.mOnDrag.Add(new (deltaX, deltaY) =>
|
||||
{
|
||||
// Only allow size to grow between what it is current at and what we want it to be at.
|
||||
|
@ -1247,9 +1254,12 @@ namespace IDE.ui
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
height = maxHeight;
|
||||
wantWidth += GS!(20);
|
||||
}
|
||||
}
|
||||
CheckScrollbar();
|
||||
|
||||
int workspaceX;
|
||||
int workspaceY;
|
||||
|
@ -1273,6 +1283,9 @@ namespace IDE.ui
|
|||
maxWidth = Math.Min(maxWidth, mTextPanel.mWidgetWindow.mWindowWidth);
|
||||
}
|
||||
|
||||
if (wantWordWrap)
|
||||
maxWidth -= GS!(20);
|
||||
|
||||
var useWidth = Math.Min(wantWidth, maxWidth);
|
||||
|
||||
if (!listView.mIsReversed)
|
||||
|
@ -1318,6 +1331,10 @@ namespace IDE.ui
|
|||
useWidth = actualMaxWidth + GS!(32);
|
||||
|
||||
listView.mColumns[0].mWidth = useWidth - GS!(2);
|
||||
|
||||
CheckScrollbar();
|
||||
if (listView.mVertScrollbar != null)
|
||||
useWidth += GS!(20);
|
||||
}
|
||||
|
||||
height += GS!(2);
|
||||
|
|
|
@ -5678,7 +5678,7 @@ namespace IDE.ui
|
|||
}
|
||||
|
||||
// Display all parameters on hover
|
||||
if (docParser.mParamInfo.Count > 0)
|
||||
if (docParser.mParamInfo?.Count > 0)
|
||||
{
|
||||
debugExpr.Append("\n");
|
||||
debugExpr.Append("Parameters:");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue