1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Merge pull request #2114 from MineBill/expose-more-colors

Remove some hardcoded colors to make the IDE more friendly to light themes.
This commit is contained in:
Brian Fiete 2025-01-29 11:27:47 -08:00 committed by GitHub
commit 852d29d770
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 82 additions and 44 deletions

View file

@ -121,7 +121,8 @@ namespace Beefy.theme.dark
{
g.SetFont(mFont);
DarkTheme.DrawUnderlined(g, mLabel, GS!(22), GS!(-1));
using(g.PushColor(DarkTheme.COLOR_TEXT))
DarkTheme.DrawUnderlined(g, mLabel, GS!(22), GS!(-1));
/*int underlinePos = mLabel.IndexOf('&');
if ((underlinePos != -1) && (underlinePos < mLabel.Length - 1))

View file

@ -119,7 +119,8 @@ namespace Beefy.theme.dark
g.SetFont(mFont);
if (mText != null)
g.DrawString(mText, mTextInsets.mLeft, mTextInsets.mTop, FontAlign.Left, mWidth - mTextInsets.Horz, FontOverflowMode.Wrap);
using (g.PushColor(DarkTheme.COLOR_TEXT))
g.DrawString(mText, mTextInsets.mLeft, mTextInsets.mTop, FontAlign.Left, mWidth - mTextInsets.Horz, FontOverflowMode.Wrap);
}
}
}

View file

@ -79,6 +79,8 @@ namespace Beefy.theme.dark
mHeight = GS!(24);
mHorzJumpSize = GS!(40);
mFont = DarkTheme.sDarkTheme?.mSmallFont;
mTextColors[0] = DarkTheme.COLOR_TEXT;
mHiliteColor = DarkTheme.COLOR_TEXT_SELECTED;
}
protected override EditWidgetContent.Data CreateEditData()

View file

@ -32,7 +32,7 @@ namespace Beefy.theme.dark
let darkMenuWidget = (DarkMenuWidget)mMenuWidget;
g.SetFont(mMenuItem.mBold ? darkMenuWidget.mBoldFont : darkMenuWidget.mFont);
using (g.PushColor(mMenuItem.mDisabled ? 0xFFA8A8A8 : 0xFFFFFFFF))
using (g.PushColor(mMenuItem.mDisabled ? DarkTheme.COLOR_TEXT_DISABLED : DarkTheme.COLOR_TEXT))
{
StringView leftStr = mMenuItem.mLabel;
StringView rightStr = default;
@ -43,12 +43,9 @@ namespace Beefy.theme.dark
leftStr.RemoveToEnd(barIdx);
}
using (g.PushColor(DarkTheme.COLOR_TEXT))
{
g.DrawString(leftStr, GS!(36), 0);
if (!rightStr.IsEmpty)
g.DrawString(rightStr, mWidth - GS!(8), 0, .Right);
}
g.DrawString(leftStr, GS!(36), 0);
if (!rightStr.IsEmpty)
g.DrawString(rightStr, mWidth - GS!(8), 0, .Right);
}
if (mMenuItem.mIconImage != null)
@ -57,7 +54,7 @@ namespace Beefy.theme.dark
if (mMenuItem.IsParent)
{
using (g.PushColor(mMenuItem.mDisabled ? 0xFFA8A8A8 : 0xFFFFFFFF))
using (g.PushColor(mMenuItem.mDisabled ? DarkTheme.COLOR_TEXT_DISABLED : DarkTheme.COLOR_TEXT))
g.Draw(DarkTheme.sDarkTheme.GetImage(DarkTheme.ImageIdx.RightArrow), mWidth - GS!(16), 0);
}
}

View file

@ -197,6 +197,8 @@ namespace Beefy.theme.dark
};
public static uint32 COLOR_TEXT = 0xFFFFFFFF;
public static uint32 COLOR_TEXT_DISABLED = 0xFFA8A8A8;
public static uint32 COLOR_TEXT_SELECTED = 0xFF2f5c88;
public static uint32 COLOR_WINDOW = 0xFF595962;
public static uint32 COLOR_BKG = 0xFF26262A;
public static uint32 COLOR_SELECTED_OUTLINE = 0xFFCFAE11;