mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +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;
|
let darkMenuWidget = (DarkMenuWidget)mMenuWidget;
|
||||||
g.SetFont(mMenuItem.mBold ? darkMenuWidget.mBoldFont : darkMenuWidget.mFont);
|
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 leftStr = mMenuItem.mLabel;
|
||||||
StringView rightStr = default;
|
StringView rightStr = default;
|
||||||
|
@ -43,12 +43,9 @@ namespace Beefy.theme.dark
|
||||||
leftStr.RemoveToEnd(barIdx);
|
leftStr.RemoveToEnd(barIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
using (g.PushColor(DarkTheme.COLOR_TEXT))
|
g.DrawString(leftStr, GS!(36), 0);
|
||||||
{
|
if (!rightStr.IsEmpty)
|
||||||
g.DrawString(leftStr, GS!(36), 0);
|
g.DrawString(rightStr, mWidth - GS!(8), 0, .Right);
|
||||||
if (!rightStr.IsEmpty)
|
|
||||||
g.DrawString(rightStr, mWidth - GS!(8), 0, .Right);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mMenuItem.mIconImage != null)
|
if (mMenuItem.mIconImage != null)
|
||||||
|
@ -57,7 +54,7 @@ namespace Beefy.theme.dark
|
||||||
|
|
||||||
if (mMenuItem.IsParent)
|
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);
|
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 = 0xFFFFFFFF;
|
||||||
|
public static uint32 COLOR_TEXT_DISABLED = 0xFFA8A8A8;
|
||||||
public static uint32 COLOR_WINDOW = 0xFF595962;
|
public static uint32 COLOR_WINDOW = 0xFF595962;
|
||||||
public static uint32 COLOR_BKG = 0xFF26262A;
|
public static uint32 COLOR_BKG = 0xFF26262A;
|
||||||
public static uint32 COLOR_SELECTED_OUTLINE = 0xFFCFAE11;
|
public static uint32 COLOR_SELECTED_OUTLINE = 0xFFCFAE11;
|
||||||
|
|
|
@ -311,6 +311,7 @@ namespace IDE
|
||||||
public class Colors
|
public class Colors
|
||||||
{
|
{
|
||||||
public Color mText = 0xFFFFFFFF;
|
public Color mText = 0xFFFFFFFF;
|
||||||
|
public Color mTextDisabled = 0xFFA8A8A8;
|
||||||
public Color mWindow = 0xFF44444D;
|
public Color mWindow = 0xFF44444D;
|
||||||
public Color mBackground = 0xFF1C1C24;
|
public Color mBackground = 0xFF1C1C24;
|
||||||
public Color mSelectedOutline = 0xFFCFAE11;
|
public Color mSelectedOutline = 0xFFCFAE11;
|
||||||
|
@ -364,6 +365,7 @@ namespace IDE
|
||||||
}
|
}
|
||||||
|
|
||||||
GetColor("Text", ref mText);
|
GetColor("Text", ref mText);
|
||||||
|
GetColor("TextDisabled", ref mTextDisabled);
|
||||||
GetColor("Window", ref mWindow);
|
GetColor("Window", ref mWindow);
|
||||||
GetColor("Background", ref mBackground);
|
GetColor("Background", ref mBackground);
|
||||||
GetColor("SelectedOutline", ref mSelectedOutline);
|
GetColor("SelectedOutline", ref mSelectedOutline);
|
||||||
|
@ -450,6 +452,7 @@ namespace IDE
|
||||||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.VisibleWhiteSpace] = mVisibleWhiteSpace;
|
SourceEditWidgetContent.sTextColors[(.)SourceElementType.VisibleWhiteSpace] = mVisibleWhiteSpace;
|
||||||
|
|
||||||
DarkTheme.COLOR_TEXT = mText;
|
DarkTheme.COLOR_TEXT = mText;
|
||||||
|
DarkTheme.COLOR_TEXT_DISABLED = mTextDisabled;
|
||||||
DarkTheme.COLOR_WINDOW = mWindow;
|
DarkTheme.COLOR_WINDOW = mWindow;
|
||||||
DarkTheme.COLOR_BKG = mBackground;
|
DarkTheme.COLOR_BKG = mBackground;
|
||||||
DarkTheme.COLOR_SELECTED_OUTLINE = mSelectedOutline;
|
DarkTheme.COLOR_SELECTED_OUTLINE = mSelectedOutline;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue