mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +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
|
||||
{
|
||||
if (item.Selected)
|
||||
if ((item.Selected) && (item.mMouseOver))
|
||||
{
|
||||
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));
|
||||
if (aHorzPos == mHorzPos.mDest)
|
||||
return false;
|
||||
|
||||
mHorzPos.Set(aHorzPos);
|
||||
mHorzPos.Set(aHorzPos, immediate);
|
||||
if (mHorzScrollbar != null)
|
||||
{
|
||||
mHorzScrollbar.mContentPos = mHorzPos.v;
|
||||
|
|
|
@ -162,7 +162,7 @@ namespace Beefy.widgets
|
|||
if ((mSrcDraggingWindow != null) && (mSrcDraggingWindow.mCaptureWidget != null))
|
||||
mSrcDraggingWindow.ReleaseMouseCaptures();
|
||||
|
||||
mTabbedView.mParentDockingFrame.GetRootDockingFrame().HideDragTarget(this, !mDragHelper.mAborted);
|
||||
mTabbedView.mParentDockingFrame?.GetRootDockingFrame().HideDragTarget(this, !mDragHelper.mAborted);
|
||||
if (mNewDraggingWindow != null)
|
||||
{
|
||||
mNewDraggingWindow.mOnWindowLostFocus.Remove(scope => WindowDragLostFocusHandler, true);
|
||||
|
@ -176,7 +176,7 @@ namespace Beefy.widgets
|
|||
|
||||
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)
|
||||
|
@ -198,6 +198,8 @@ namespace Beefy.widgets
|
|||
|
||||
public virtual bool IsTotalWindowContent()
|
||||
{
|
||||
if (mTabbedView.mParentDockingFrame == null)
|
||||
return false;
|
||||
return (mTabbedView.mParentDockingFrame.mParentDockingFrame == null) &&
|
||||
(mTabbedView.mParentDockingFrame.GetDockedWindowCount() == 1) &&
|
||||
(mTabbedView.GetTabCount() == 1) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue