1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Replace most hardcoded text colors the settings text color.

This commit is contained in:
MineBill 2025-01-27 17:05:10 +02:00
parent 633fb97e68
commit 7033e2c61e
No known key found for this signature in database
11 changed files with 39 additions and 24 deletions

View file

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

View file

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

View file

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

View file

@ -413,6 +413,11 @@ namespace IDE.ui
g.PushColor(DarkTheme.COLOR_MENU_FOCUSED); g.PushColor(DarkTheme.COLOR_MENU_FOCUSED);
defer:loop g.PopColor(); defer:loop g.PopColor();
} }
else
{
g.PushColor(DarkTheme.COLOR_TEXT);
defer:loop g.PopColor();
}
let str = StringView(mEntryDisplay, index, @c.NextIndex - index); let str = StringView(mEntryDisplay, index, @c.NextIndex - index);

View file

@ -877,7 +877,7 @@ namespace IDE.ui
// column header // column header
using (g.PushClip(0, 0, mWidth, GS!(mColumnHeaderHeight))) using (g.PushClip(0, 0, mWidth, GS!(mColumnHeaderHeight)))
{ {
using (g.PushColor(0xFFFFFFFF)) using (g.PushColor(DarkTheme.COLOR_TEXT))
{ {
g.SetFont(mFont); g.SetFont(mFont);
float strViewColumnStart = GS!(mColumnDisplayStart) + mBytesPerDisplayLine*GS!(mColumnDisplayStride) + GS!(mStrViewDisplayStartOffset); float strViewColumnStart = GS!(mColumnDisplayStart) + mBytesPerDisplayLine*GS!(mColumnDisplayStride) + GS!(mStrViewDisplayStartOffset);
@ -908,7 +908,7 @@ namespace IDE.ui
float displayAdj = (float)(-mShowPositionDisplayOffset * lineSpacing); float displayAdj = (float)(-mShowPositionDisplayOffset * lineSpacing);
using (g.PushTranslate(0, displayAdj)) using (g.PushTranslate(0, displayAdj))
{ {
using (g.PushColor(0xFFFFFFFF)) using (g.PushColor(DarkTheme.COLOR_TEXT))
{ {
//ulong lineStart = mCurPosition / mBytesPerDisplayLine; //ulong lineStart = mCurPosition / mBytesPerDisplayLine;
int lockSize = lineCount * mBytesPerDisplayLine; int lockSize = lineCount * mBytesPerDisplayLine;

View file

@ -652,17 +652,15 @@ namespace IDE.ui
subItem.mOnMouseClick.Add(new => ListViewItemClicked); subItem.mOnMouseClick.Add(new => ListViewItemClicked);
} }
var listViewItem = (BreakpointListViewItem)root.GetChildAtIndex(breakIdx); var listViewItem = (BreakpointListViewItem)root.GetChildAtIndex(breakIdx);
listViewItem.mTextColor = Color.White; listViewItem.mTextColor = DarkTheme.COLOR_TEXT;
listViewItem.mIsBold = breakpoint.IsActiveBreakpoint(); listViewItem.mIsBold = breakpoint.IsActiveBreakpoint();
var locString = scope String(); var locString = scope String();
breakpoint.ToString_Location(locString); breakpoint.ToString_Location(locString);
listViewItem.Label = locString; listViewItem.Label = locString;
if (breakpoint.IsBound()) if (!breakpoint.IsBound())
listViewItem.mTextColor = 0xFFFFFFFF; listViewItem.mTextColor = (0x00FFFFFF & DarkTheme.COLOR_TEXT) | 0x80000000;
else
listViewItem.mTextColor = 0x80FFFFFF;
// Condition // Condition
var subItem = listViewItem.GetSubItem(2); var subItem = listViewItem.GetSubItem(2);

View file

@ -369,6 +369,8 @@ namespace IDE.ui
{ {
base.Draw(g); base.Draw(g);
using (g.PushColor(DarkTheme.COLOR_TEXT))
{
g.DrawString("Breakpoint Condition", mConditionEdit.mX, mConditionEdit.mY - GS!(20)); g.DrawString("Breakpoint Condition", mConditionEdit.mX, mConditionEdit.mY - GS!(20));
g.DrawString("Thread Id", mThreadEdit.mX, mThreadEdit.mY - GS!(20)); g.DrawString("Thread Id", mThreadEdit.mX, mThreadEdit.mY - GS!(20));
g.DrawString("Log String", mLogEdit.mX, mLogEdit.mY - GS!(20)); g.DrawString("Log String", mLogEdit.mX, mLogEdit.mY - GS!(20));
@ -379,4 +381,5 @@ namespace IDE.ui
g.DrawString(str, mWidth - GS!(16) - GS!(8), mHitCountEdit.mY - GS!(19), .Right); g.DrawString(str, mWidth - GS!(16) - GS!(8), mHitCountEdit.mY - GS!(19), .Right);
} }
} }
}
} }

View file

@ -322,12 +322,15 @@ namespace IDE.ui
{ {
base.Draw(g); base.Draw(g);
using (g.PushColor(DarkTheme.COLOR_TEXT))
{
g.DrawString("Find what:", 6, mEditWidget.mY - GS!(18)); g.DrawString("Find what:", 6, mEditWidget.mY - GS!(18));
if (mReplaceWidget != null) if (mReplaceWidget != null)
g.DrawString("Replace with:", GS!(6), mReplaceWidget.mY - GS!(18)); g.DrawString("Replace with:", GS!(6), mReplaceWidget.mY - GS!(18));
g.DrawString("Look in:", GS!(6), mLocationCombo.mY - GS!(18)); g.DrawString("Look in:", GS!(6), mLocationCombo.mY - GS!(18));
g.DrawString("Look at these file types:", GS!(6), mFileTypesCombo.mY - GS!(18)); g.DrawString("Look at these file types:", GS!(6), mFileTypesCombo.mY - GS!(18));
} }
}
public override void Update() public override void Update()
{ {

View file

@ -140,6 +140,7 @@ namespace IDE.ui
{ {
base.Draw(g); base.Draw(g);
using (g.PushColor(DarkTheme.COLOR_TEXT))
g.DrawString((mBreakpointKind == .Memory) ? "Breakpoint Address" : "Symbol Name", mAddressEdit.mX, mAddressEdit.mY - GS!(20)); g.DrawString((mBreakpointKind == .Memory) ? "Breakpoint Address" : "Symbol Name", mAddressEdit.mX, mAddressEdit.mY - GS!(20));
//g.DrawString("Project Directory", mDialogEditWidget.mX, mDialogEditWidget.mY - 20); //g.DrawString("Project Directory", mDialogEditWidget.mX, mDialogEditWidget.mY - 20);
} }

View file

@ -4746,6 +4746,7 @@ namespace IDE.ui
case 2: lineStr.AppendF("{0}", (lineIdx + 1) % 100); case 2: lineStr.AppendF("{0}", (lineIdx + 1) % 100);
default: lineStr.AppendF("{0}", lineIdx + 1); default: lineStr.AppendF("{0}", lineIdx + 1);
} }
using (g.PushColor(DarkTheme.COLOR_TEXT))
g.DrawString(lineStr, 0, GS!(2) + ewc.mLineCoords[lineIdx], FontAlign.Right, editX - GS!(14)); g.DrawString(lineStr, 0, GS!(2) + ewc.mLineCoords[lineIdx], FontAlign.Right, editX - GS!(14));
} }
} }

View file

@ -92,6 +92,7 @@ namespace IDE.ui
} }
g.SetFont(s_Font); g.SetFont(s_Font);
using (g.PushColor(gApp.mSettings.mUISettings.mColors.mText))
g.DrawString(mPath, 10, 0, .Left, mWidth - 10); g.DrawString(mPath, 10, 0, .Left, mWidth - 10);
} }