mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed more scaling issues
This commit is contained in:
parent
d9a820f5a1
commit
990d092274
7 changed files with 15 additions and 7 deletions
|
@ -38,7 +38,8 @@ namespace Beefy.theme.dark
|
|||
mDragMarginSize = GS!(64);
|
||||
mDragWindowMarginSize = GS!(10);
|
||||
|
||||
mWindowMargin = 0;
|
||||
if (mParentDockingFrame == null)
|
||||
mWindowMargin = GS!(1);
|
||||
mSplitterSize = GS!(6.0f);
|
||||
mWindowSpacing = GS!(2.0f);
|
||||
}
|
||||
|
|
|
@ -506,7 +506,7 @@ namespace Beefy.theme.dark
|
|||
if (tabIdx < mTabs.Count - 1)
|
||||
{
|
||||
tabButton.mWidth = (float)Math.Round(Math.Min(tabButton.mWantWidth, showWidth + GS!(8)));
|
||||
tabButton.mCloseButton.mVisible = tabButton.mWidth >= tabButton.mWantWidth;
|
||||
tabButton.mCloseButton.mVisible = tabButton.mWidth + 1 >= tabButton.mWantWidth;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -431,7 +431,7 @@ namespace Beefy.theme.dark
|
|||
{
|
||||
DarkDockingFrame dockingFrame = new DarkDockingFrame();
|
||||
if (parent == null)
|
||||
dockingFrame.mWindowMargin = 1;
|
||||
dockingFrame.mWindowMargin = GS!(1);
|
||||
else if (var darkParent = parent as DarkDockingFrame)
|
||||
{
|
||||
dockingFrame.mDrawBkg = darkParent.mDrawBkg;
|
||||
|
|
|
@ -6771,7 +6771,7 @@ namespace IDE
|
|||
OutputSmart(useStr);
|
||||
}
|
||||
|
||||
public void SetScale(float scale, bool force = false)
|
||||
public void PhysSetScale(float scale, bool force = false)
|
||||
{
|
||||
var prevScale = DarkTheme.sScale;
|
||||
float useScale = Math.Clamp(scale, 0.5f, 4.0f);
|
||||
|
@ -6818,6 +6818,12 @@ namespace IDE
|
|||
}
|
||||
}
|
||||
|
||||
public void SetScale(float scale, bool force = false)
|
||||
{
|
||||
PhysSetScale(scale, force);
|
||||
gApp.mSettings.mEditorSettings.mUIScale = DarkTheme.sScale * 100.0f;
|
||||
}
|
||||
|
||||
void SysKeyDown(KeyDownEvent evt)
|
||||
{
|
||||
if (evt.mHandled)
|
||||
|
|
|
@ -792,7 +792,7 @@ namespace IDE
|
|||
gApp.mSettings.mEditorSettings.mFontSize = Math.Clamp(gApp.mSettings.mEditorSettings.mFontSize, 6.0f, 72.0f);
|
||||
|
||||
Font.ClearFontNameCache();
|
||||
gApp.SetScale(gApp.mSettings.mEditorSettings.mUIScale / 100.0f, true);
|
||||
gApp.PhysSetScale(gApp.mSettings.mEditorSettings.mUIScale / 100.0f, true);
|
||||
|
||||
DeleteAndNullify!(gApp.mKeyChordState);
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ namespace IDE.ui
|
|||
public override void RehupScale(float oldScale, float newScale)
|
||||
{
|
||||
base.RehupScale(oldScale, newScale);
|
||||
Utils.SnapScale(ref mLabelOffset, newScale / oldScale);
|
||||
if (mLabelOffset != 0)
|
||||
mLabelOffset = GS!(-16);
|
||||
}
|
||||
|
||||
protected override float GetLabelOffset()
|
||||
|
|
|
@ -1624,8 +1624,8 @@ namespace IDE.ui
|
|||
|
||||
public override void RehupScale(float oldScale, float newScale)
|
||||
{
|
||||
SetScaleData();
|
||||
base.RehupScale(oldScale, newScale);
|
||||
SetScaleData();
|
||||
}
|
||||
|
||||
public void Serialize(StructuredData data, bool includeItems)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue