mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 23:36:00 +02:00
Merge pull request #1252 from blat-blatnik/OpenTabsOnRight
[IDE] Added setting to open new tabs on right instead of left
This commit is contained in:
commit
9f57be150e
5 changed files with 29 additions and 10 deletions
|
@ -398,12 +398,12 @@ namespace Beefy.theme.dark
|
|||
func(mRightTab);
|
||||
}
|
||||
|
||||
public override TabButton AddTab(String label, float width, Widget content, bool ownsContent)
|
||||
public override TabButton AddTab(String label, float width, Widget content, bool ownsContent, int insertIdx)
|
||||
{
|
||||
float useWidth = width;
|
||||
if (useWidth == 0)
|
||||
useWidth = DarkTheme.sDarkTheme.mSmallFont.GetWidth(label) + GS!(30);
|
||||
return base.AddTab(label, useWidth, content, ownsContent);
|
||||
return base.AddTab(label, useWidth, content, ownsContent, insertIdx);
|
||||
}
|
||||
|
||||
public override void RemoveTab(TabButton tabButton, bool deleteTab = true)
|
||||
|
|
|
@ -320,7 +320,7 @@ namespace Beefy.widgets
|
|||
//tabbedView.mSharedData.mOpenNewWindowDelegate = mTabbedView.mSharedData.mOpenNewWindowDelegate;
|
||||
tabbedView.SetRequestedSize(mTabbedView.mWidth, mTabbedView.mHeight);
|
||||
mTabbedView.RemoveTab(this, false);
|
||||
tabbedView.AddTab(this);
|
||||
tabbedView.AddTab(this, 0);
|
||||
|
||||
float rootX;
|
||||
float rootY;
|
||||
|
@ -472,7 +472,7 @@ namespace Beefy.widgets
|
|||
return activeTab;
|
||||
}
|
||||
|
||||
public virtual TabButton AddTab(String label, float width, Widget content, bool ownsContent)
|
||||
public virtual TabButton AddTab(String label, float width, Widget content, bool ownsContent, int insertIdx)
|
||||
{
|
||||
TabButton aTabButton = CreateTabButton();
|
||||
aTabButton.mTabbedView = this;
|
||||
|
@ -481,7 +481,7 @@ namespace Beefy.widgets
|
|||
aTabButton.mWantWidth = width;
|
||||
aTabButton.mHeight = mTabHeight;
|
||||
aTabButton.mContent = content;
|
||||
AddTab(aTabButton);
|
||||
AddTab(aTabButton, insertIdx);
|
||||
return aTabButton;
|
||||
}
|
||||
|
||||
|
@ -501,7 +501,7 @@ namespace Beefy.widgets
|
|||
return bestIdx;
|
||||
}
|
||||
|
||||
public virtual void AddTab(TabButton tabButton, int insertIdx = 0)
|
||||
public virtual void AddTab(TabButton tabButton, int insertIdx)
|
||||
{
|
||||
AddWidget(tabButton);
|
||||
mTabs.Insert(insertIdx, tabButton);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue