1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-25 19:18:01 +02:00

Fixed ability to colorize ui elements

This commit is contained in:
Brian Fiete 2020-08-09 07:14:21 -07:00
parent b7b065855d
commit b18385e427
2 changed files with 12 additions and 15 deletions

View file

@ -187,11 +187,11 @@ namespace Beefy.theme.dark
};
public static uint32 COLOR_TEXT = 0xFFFFFFFF;
public static uint32 COLOR_WINDOW = 0xFF595959;
public static uint32 COLOR_BKG = 0xFF262626;
public static uint32 COLOR_SELECTED_OUTLINE = 0xFFE6A800;
public static uint32 COLOR_MENU_FOCUSED = 0xFFFFA000;
public static uint32 COLOR_MENU_SELECTED = 0xFFD0A070;
public static uint32 COLOR_WINDOW = 0xFF595962;
public static uint32 COLOR_BKG = 0xFF26262A;
public static uint32 COLOR_SELECTED_OUTLINE = 0xFFCFAE11;
public static uint32 COLOR_MENU_FOCUSED = 0xFFE5A910;
public static uint32 COLOR_MENU_SELECTED = 0xFFCB9B80;
public static float sScale = 1.0f;
public static int32 sSrcImgScale = 1;
@ -322,16 +322,6 @@ namespace Beefy.theme.dark
delete mWindowTopImage;
}
Image themeImg = Image.LoadFromFile(scope String()..Append(tempStr, BFApp.sApp.mInstallDir, "images/DarkTheme.png"), .AllowRead);
defer delete themeImg;
uint32[5] bits = ?;
themeImg.GetBits(0, 0, bits.Count, 1, bits.Count, &bits);
COLOR_WINDOW = Color.FromNative(bits[0]);
COLOR_BKG = Color.FromNative(bits[1]);
COLOR_SELECTED_OUTLINE = Color.FromNative(bits[2]);
COLOR_MENU_FOCUSED = Color.FromNative(bits[3]);
COLOR_MENU_SELECTED = Color.FromNative(bits[4]);
int scaleIdx = 0;
String uiFileName = null;

View file

@ -296,6 +296,12 @@ namespace IDE
}
GetColor("Text", ref mText);
GetColor("Window", ref mWindow);
GetColor("Background", ref mBackground);
GetColor("SelectedOutline", ref mSelectedOutline);
GetColor("MenuFocused", ref mMenuFocused);
GetColor("MenuSelected", ref mMenuSelected);
GetColor("Code", ref mCode);
GetColor("Keyword", ref mKeyword);
GetColor("Literal", ref mLiteral);
@ -332,6 +338,7 @@ namespace IDE
SourceEditWidgetContent.sTextColors[14] = mVisibleWhiteSpace;
DarkTheme.COLOR_TEXT = mText;
DarkTheme.COLOR_WINDOW = mWindow;
DarkTheme.COLOR_BKG = mBackground;
DarkTheme.COLOR_SELECTED_OUTLINE = mSelectedOutline;
DarkTheme.COLOR_MENU_FOCUSED = mMenuFocused;