1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-06 16:25:59 +02:00

Change to allow working in installer

This commit is contained in:
Brian Fiete 2019-09-10 11:25:53 -07:00
parent 5c813f31ec
commit 463e26ff75
19 changed files with 571 additions and 57 deletions

View file

@ -35,7 +35,7 @@ namespace Beefy.theme.dark
mWidth = GS!(100);
mHeight = GS!(24);
mHorzJumpSize = GS!(40);
mFont = DarkTheme.sDarkTheme.mSmallFont;
mFont = DarkTheme.sDarkTheme?.mSmallFont;
}
public override void GetTextData()
@ -484,22 +484,24 @@ namespace Beefy.theme.dark
if (mEditWidget.mVertPos.IsMoving)
brightness = 0; // When we animate a pgup or pgdn, it's weird seeing the cursor scrolling around
Color cursorColor = mTextColors[0];
if (mOverTypeMode)
{
if (mCharWidth <= 2)
{
using (g.PushColor(Color.Get(brightness * 0.75f)))
using (g.PushColor(Color.Mult(cursorColor, Color.Get(brightness * 0.75f))))
g.FillRect(aX, curY, GS!(2), lineSpacing);
}
else
{
using (g.PushColor(Color.Get(brightness * 0.30f)))
using (g.PushColor(Color.Mult(cursorColor, Color.Get(brightness * 0.30f))))
g.FillRect(aX, curY, mCharWidth, lineSpacing);
}
}
else
{
using (g.PushColor(Color.Get(brightness)))
using (g.PushColor(Color.Mult(cursorColor, Color.Get(brightness))))
g.FillRect(aX, curY, Math.Max(1.0f, GS!(1)), lineSpacing);
}
drewCursor = true;

View file

@ -67,20 +67,28 @@ namespace Beefy.widgets
if (mHorzScrollbar == null)
{
mHorzScrollbar = ThemeFactory.mDefault.CreateScrollbar(Scrollbar.Orientation.Horz);
mHorzScrollbar.Init();
mHorzScrollbar.mOnScrollEvent.Add(new => ScrollEventHandler);
AddWidgetAtIndex(0, mHorzScrollbar);
}
if (mHorzScrollbar.mParent == null)
{
mHorzScrollbar.Init();
mHorzScrollbar.mOnScrollEvent.Add(new => ScrollEventHandler);
AddWidgetAtIndex(0, mHorzScrollbar);
}
}
if (wantVert)
{
if (mVertScrollbar == null)
{
mVertScrollbar = ThemeFactory.mDefault.CreateScrollbar(Scrollbar.Orientation.Vert);
mVertScrollbar.Init();
mVertScrollbar.mOnScrollEvent.Add(new => ScrollEventHandler);
AddWidgetAtIndex(0, mVertScrollbar);
}
if (mVertScrollbar.mParent == null)
{
mVertScrollbar.Init();
mVertScrollbar.mOnScrollEvent.Add(new => ScrollEventHandler);
AddWidgetAtIndex(0, mVertScrollbar);
}
}
else
{

View file

@ -429,7 +429,7 @@ namespace Beefy.widgets
var result = mOnHitTest(x, y);
if (result != HitTestResult.NotHandled)
{
if (result == .Transparent)
if ((result == .Transparent) || (result == .Caption))
{
if (mHasMouseInside)
MouseLeave();