mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Added a new 'TextDisabled' color option for disabled text.
This commit is contained in:
parent
7033e2c61e
commit
aaa7509700
3 changed files with 9 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -197,6 +197,7 @@ namespace Beefy.theme.dark
|
|||
};
|
||||
|
||||
public static uint32 COLOR_TEXT = 0xFFFFFFFF;
|
||||
public static uint32 COLOR_TEXT_DISABLED = 0xFFA8A8A8;
|
||||
public static uint32 COLOR_WINDOW = 0xFF595962;
|
||||
public static uint32 COLOR_BKG = 0xFF26262A;
|
||||
public static uint32 COLOR_SELECTED_OUTLINE = 0xFFCFAE11;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue