1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed popup location clipping

This commit is contained in:
Brian Fiete 2020-03-30 12:17:24 -07:00
parent d635b8e67f
commit 757464db3e
12 changed files with 21 additions and 13 deletions

View file

@ -28,7 +28,7 @@ namespace IDE.ui
public this()
{
mWindowFlags = BFWindow.Flags.ClientSized | BFWindow.Flags.TopMost | BFWindow.Flags.Caption |
BFWindow.Flags.Border | BFWindow.Flags.SysMenu | BFWindow.Flags.Resizable;
BFWindow.Flags.Border | BFWindow.Flags.SysMenu | BFWindow.Flags.Resizable | .PopupPosition;
AddOkCancelButtons(new (evt) => { Attach(); }, null, 0, 1);
//mApplyButton = AddButton("Apply", (evt) => { evt.mCloseDialog = false; ApplyChanges(); });

View file

@ -1044,9 +1044,12 @@ namespace IDE.ui
mTargetEditWidget.Content.GetTextCoordAtCursor(var cursorX, var cursorY);
if (!mInvokeWidget.mIsAboveText)
if (mInvokeWidget?.mIsAboveText != true)
y = Math.Max(y, cursorY + gApp.mCodeFont.GetHeight() * 0.0f);
/*if (cursorY > y + gApp.mCodeFont.GetHeight() * 2.5f)
y = cursorY;*/
float screenX;
float screenY;
mTargetEditWidget.Content.SelfToRootTranslate(x, y, out screenX, out screenY);

View file

@ -28,7 +28,7 @@ namespace IDE.ui
mIsReplace = isReplace;
mWindowFlags = BFWindow.Flags.ClientSized | BFWindow.Flags.TopMost | BFWindow.Flags.Caption |
BFWindow.Flags.Border | BFWindow.Flags.SysMenu | BFWindow.Flags.Resizable;
BFWindow.Flags.Border | BFWindow.Flags.SysMenu | BFWindow.Flags.Resizable | .PopupPosition;
AddOkCancelButtons(new (evt) => { DoFind(); }, null, 0, 1);

View file

@ -10,7 +10,7 @@ namespace IDE.ui
public this()
{
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable;
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable | .PopupPosition;
AddOkCancelButtons(new (evt) => { GotoClass(); }, null, 0, 1);

View file

@ -32,7 +32,7 @@ namespace IDE.ui
public this()
{
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable;
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable | .PopupPosition;
AddOkCancelButtons(new (evt) => { DoImport(); }, null, 0, 1);
//mApplyButton = AddButton("Apply", (evt) => { evt.mCloseDialog = false; ApplyChanges(); });

View file

@ -31,7 +31,7 @@ namespace IDE.ui
mSettingHistoryManager = gApp.mLaunchHistoryManager;
mTitle = new .("Launch Executable");
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable;
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable | .PopupPosition;
AddOkCancelButtons(new (evt) => { evt.mCloseDialog = false; Launch(); }, null, 0, 1);

View file

@ -67,7 +67,7 @@ namespace IDE.ui
public this()
{
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable;
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable | .PopupPosition;
AddOkCancelButtons(new (evt) => { GotoFile(); }, null, 0, 1);
//mApplyButton = AddButton("Apply", (evt) => { evt.mCloseDialog = false; ApplyChanges(); });

View file

@ -11,7 +11,7 @@ namespace IDE.ui
class PanelPopup : Widget
{
public Panel mPanel;
public BFWindowBase.Flags mWindowFlags = .ClientSized | .NoActivate | .NoMouseActivate | .DestAlpha;
public BFWindowBase.Flags mWindowFlags = .ClientSized | .NoActivate | .NoMouseActivate | .DestAlpha | .PopupPosition;
Widget mRelativeWidget;
bool mReverse;
float mMinContainerWidth = 32;

View file

@ -25,7 +25,7 @@ namespace IDE.ui
AddDialogComponent(mThreadCombo);
mWindowFlags = BFWindow.Flags.ClientSized | BFWindow.Flags.TopMost | BFWindow.Flags.Caption |
BFWindow.Flags.Border | BFWindow.Flags.SysMenu | BFWindow.Flags.Resizable;
BFWindow.Flags.Border | BFWindow.Flags.SysMenu | BFWindow.Flags.Resizable | .PopupPosition;
mSampleRateEdit = AddEdit(scope String()..AppendF("{0}", gApp.mSettings.mDebuggerSettings.mProfileSampleRate));

View file

@ -497,7 +497,7 @@ namespace IDE.ui
{
//mMinWidth = GS!(320);
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable;
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable | .PopupPosition;
mButtonBottomMargin = GS!(6);
mButtonRightMargin = GS!(6);