mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 21:34:11 +02:00
UI fixes
This commit is contained in:
parent
6303ad0c53
commit
9a9ad47d2a
3 changed files with 7 additions and 5 deletions
|
@ -339,7 +339,7 @@ namespace Beefy.widgets
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (item.Selected)
|
if ((item.Selected) && (item.mMouseOver))
|
||||||
{
|
{
|
||||||
item.mOnMouseUp.AddFront(new => ItemMouseUpHandler);
|
item.mOnMouseUp.AddFront(new => ItemMouseUpHandler);
|
||||||
|
|
||||||
|
|
|
@ -103,13 +103,13 @@ namespace Beefy.widgets
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HorzScrollTo(double horzPos)
|
public bool HorzScrollTo(double horzPos, bool immediate = false)
|
||||||
{
|
{
|
||||||
double aHorzPos = Math.Max(0, Math.Min(horzPos, mScrollContent.mWidth - mScrollContentContainer.mWidth));
|
double aHorzPos = Math.Max(0, Math.Min(horzPos, mScrollContent.mWidth - mScrollContentContainer.mWidth));
|
||||||
if (aHorzPos == mHorzPos.mDest)
|
if (aHorzPos == mHorzPos.mDest)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
mHorzPos.Set(aHorzPos);
|
mHorzPos.Set(aHorzPos, immediate);
|
||||||
if (mHorzScrollbar != null)
|
if (mHorzScrollbar != null)
|
||||||
{
|
{
|
||||||
mHorzScrollbar.mContentPos = mHorzPos.v;
|
mHorzScrollbar.mContentPos = mHorzPos.v;
|
||||||
|
|
|
@ -162,7 +162,7 @@ namespace Beefy.widgets
|
||||||
if ((mSrcDraggingWindow != null) && (mSrcDraggingWindow.mCaptureWidget != null))
|
if ((mSrcDraggingWindow != null) && (mSrcDraggingWindow.mCaptureWidget != null))
|
||||||
mSrcDraggingWindow.ReleaseMouseCaptures();
|
mSrcDraggingWindow.ReleaseMouseCaptures();
|
||||||
|
|
||||||
mTabbedView.mParentDockingFrame.GetRootDockingFrame().HideDragTarget(this, !mDragHelper.mAborted);
|
mTabbedView.mParentDockingFrame?.GetRootDockingFrame().HideDragTarget(this, !mDragHelper.mAborted);
|
||||||
if (mNewDraggingWindow != null)
|
if (mNewDraggingWindow != null)
|
||||||
{
|
{
|
||||||
mNewDraggingWindow.mOnWindowLostFocus.Remove(scope => WindowDragLostFocusHandler, true);
|
mNewDraggingWindow.mOnWindowLostFocus.Remove(scope => WindowDragLostFocusHandler, true);
|
||||||
|
@ -176,7 +176,7 @@ namespace Beefy.widgets
|
||||||
|
|
||||||
public void MouseDrag(float x, float y, float dX, float dY)
|
public void MouseDrag(float x, float y, float dX, float dY)
|
||||||
{
|
{
|
||||||
mTabbedView.mParentDockingFrame.GetRootDockingFrame().ShowDragTarget(this);
|
mTabbedView.mParentDockingFrame?.GetRootDockingFrame().ShowDragTarget(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void MouseUp(float x, float y, int32 btn)
|
public override void MouseUp(float x, float y, int32 btn)
|
||||||
|
@ -198,6 +198,8 @@ namespace Beefy.widgets
|
||||||
|
|
||||||
public virtual bool IsTotalWindowContent()
|
public virtual bool IsTotalWindowContent()
|
||||||
{
|
{
|
||||||
|
if (mTabbedView.mParentDockingFrame == null)
|
||||||
|
return false;
|
||||||
return (mTabbedView.mParentDockingFrame.mParentDockingFrame == null) &&
|
return (mTabbedView.mParentDockingFrame.mParentDockingFrame == null) &&
|
||||||
(mTabbedView.mParentDockingFrame.GetDockedWindowCount() == 1) &&
|
(mTabbedView.mParentDockingFrame.GetDockedWindowCount() == 1) &&
|
||||||
(mTabbedView.GetTabCount() == 1) &&
|
(mTabbedView.GetTabCount() == 1) &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue