1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Lost changes

This commit is contained in:
Brian Fiete 2021-02-25 10:14:22 -08:00
parent e6c4a95ccd
commit 8e9d7ed4c4
56 changed files with 1579 additions and 794 deletions

View file

@ -796,6 +796,13 @@ namespace Beefy.theme.dark
mDragKind = .None;
}
if (Math.Abs(dY) < mSelfHeight * 0.21f)
{
mDragKind = .None;
mDragTarget = null;
return;
}
delete mCurDragEvent;
mCurDragEvent = new DragEvent();
mCurDragEvent.mX = x;

View file

@ -106,6 +106,24 @@ namespace Beefy.widgets
extension KeyCode
{
public bool IsModifier
{
get
{
switch (this)
{
case .LWin,
.RWin,
.Alt,
.Control,
.Command:
return true;
default:
return false;
}
}
}
public static Result<KeyCode> Parse(StringView str)
{
if (str.Length == 1)

View file

@ -200,7 +200,8 @@ namespace Beefy.widgets
{
return (mTabbedView.mParentDockingFrame.mParentDockingFrame == null) &&
(mTabbedView.mParentDockingFrame.GetDockedWindowCount() == 1) &&
(mTabbedView.GetTabCount() == 1);
(mTabbedView.GetTabCount() == 1) &&
mTabbedView.mAutoClose;
}
void WindowDragLostFocusHandler(BFWindow window, BFWindow newFocus)
@ -237,7 +238,7 @@ namespace Beefy.widgets
300, 500,
BFWindowBase.Flags.Border | BFWindowBase.Flags.ThickFrame | BFWindowBase.Flags.Resizable | BFWindowBase.Flags.SysMenu |
BFWindowBase.Flags.Caption | BFWindowBase.Flags.Minimize | BFWindowBase.Flags.ToolWindow | BFWindowBase.Flags.TopMost |
BFWindowBase.Flags.UseParentMenu,
BFWindowBase.Flags.UseParentMenu | BFWindowBase.Flags.Maximize,
subFrame);
Dock(subFrame, null, DockingFrame.WidgetAlign.Top);
//subFrame.AddDockedWidget(fourthTabbedView, null, DockingFrame.WidgetAlign.Left, false);
@ -288,7 +289,7 @@ namespace Beefy.widgets
if ((refWidget != null) && (refWidget.mWidgetWindow != mWidgetWindow) && (mWidgetWindow != null))
mWidgetWindow.SetForeground();
if (mTabbedView.GetTabCount() == 1)
if ((mTabbedView.GetTabCount() == 1) && mTabbedView.mAutoClose)
{
mTabbedView.Dock(frame, refWidget, align);
return;
@ -327,7 +328,7 @@ namespace Beefy.widgets
tabbedView.Dock(frame, refWidget, align);
}
if (prevTabbedView.GetTabCount() == 0)
if ((prevTabbedView.GetTabCount() == 0) && prevTabbedView.mAutoClose)
{
prevTabbedView.mParentDockingFrame.RemoveDockedWidget(prevTabbedView);
}

View file

@ -746,7 +746,7 @@ namespace SDL2
public static extern int32 GetDisplayMode(int32 displayIndex, int32 modeIndex, out SDL_DisplayMode mode);
/* Available in 2.0.5 or higher */
[LinkName("SDL_GetDisplayMode")]
[LinkName("SDL_GetDisplayUsableBounds")]
public static extern int SDL_GetDisplayUsableBounds(int displayIndex, out Rect rect);
[LinkName("SDL_GetNumDisplayModes")]

View file

@ -315,4 +315,4 @@ namespace SDL2
int index
);
}
}
}

View file

@ -119,7 +119,8 @@ namespace System.IO
DeleteAndNullify!(mTitle);
DeleteAndNullify!(mInitialDir);
DeleteAndNullify!(mDefaultExt);
DeleteAndNullify!(mFileNames);
DeleteContainerAndItems!(mFileNames);
mFileNames = null;
DeleteAndNullify!(mFilter);
mFilterIndex = 1;
mSupportMultiDottedExtensions = false;