mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Theme update
This commit is contained in:
parent
9650e10e88
commit
1523000e80
16 changed files with 80 additions and 30 deletions
|
@ -346,7 +346,7 @@ namespace Beefy.theme.dark
|
|||
{
|
||||
base.Resize(x, y, width, height);
|
||||
if (mMenuButton != null)
|
||||
mMenuButton.Resize(mWidth - GS!(30), GS!(3), GS!(14), GS!(12));
|
||||
mMenuButton.Resize(mWidth - GS!(20), GS!(3), GS!(14), GS!(12));
|
||||
}
|
||||
|
||||
public override bool IsTotalWindowContent()
|
||||
|
|
|
@ -31,6 +31,7 @@ namespace Beefy.theme.dark
|
|||
CheckboxOver,
|
||||
CheckboxDown,
|
||||
Check,
|
||||
|
||||
Close,
|
||||
CloseOver,
|
||||
DownArrow,
|
||||
|
@ -51,6 +52,7 @@ namespace Beefy.theme.dark
|
|||
VertScrollbarThumbOver,
|
||||
VertScrollbarThumb,
|
||||
VertScrollbarArrow,
|
||||
|
||||
VertShortButton,
|
||||
VertShortButtonDown,
|
||||
Grabber,
|
||||
|
@ -60,7 +62,6 @@ namespace Beefy.theme.dark
|
|||
MenuSepHorz,
|
||||
MenuSelect,
|
||||
TreeArrow,
|
||||
|
||||
UIPointer,
|
||||
UIImage,
|
||||
UIComposition,
|
||||
|
@ -78,10 +79,8 @@ namespace Beefy.theme.dark
|
|||
EditPathNode,
|
||||
EditPathNodeSelected,
|
||||
EditAnchor,
|
||||
|
||||
UIBone,
|
||||
UIBoneJoint,
|
||||
|
||||
VisibleIcon,
|
||||
LockIcon,
|
||||
LeftArrow,
|
||||
|
@ -94,20 +93,18 @@ namespace Beefy.theme.dark
|
|||
TimelineBracket,
|
||||
KeyframeOff,
|
||||
KeyframeOn,
|
||||
|
||||
LinkedIcon,
|
||||
|
||||
CheckboxLarge,
|
||||
ComboBox,
|
||||
ComboEnd,
|
||||
ComboSelectedIcon,
|
||||
|
||||
LinePointer,
|
||||
RedDot,
|
||||
Document,
|
||||
ReturnPointer,
|
||||
RefreshArrows,
|
||||
MoveDownArrow,
|
||||
|
||||
IconObject,
|
||||
IconObjectDeleted,
|
||||
IconObjectAppend,
|
||||
|
@ -117,8 +114,8 @@ namespace Beefy.theme.dark
|
|||
IconType,
|
||||
IconError,
|
||||
IconBookmark,
|
||||
|
||||
ProjectFolder,
|
||||
|
||||
Project,
|
||||
ArrowMoveDown,
|
||||
Workspace,
|
||||
|
@ -142,7 +139,6 @@ namespace Beefy.theme.dark
|
|||
|
||||
RedDotUnbound,
|
||||
MoreInfo,
|
||||
|
||||
Interface,
|
||||
Property,
|
||||
Field,
|
||||
|
@ -182,6 +178,7 @@ namespace Beefy.theme.dark
|
|||
CodeError,
|
||||
CodeWarning,
|
||||
ComboBoxFrameless,
|
||||
PanelHeader,
|
||||
|
||||
COUNT
|
||||
};
|
||||
|
|
|
@ -114,7 +114,7 @@ int main()
|
|||
else
|
||||
fileName = "DarkUI_4.psd";
|
||||
|
||||
if (!FileExists(fileName))
|
||||
if ((!FileExists(fileName)) && (size == 0))
|
||||
{
|
||||
isThemeDir = true;
|
||||
fileName = "../../images/" + fileName;
|
||||
|
@ -213,8 +213,8 @@ int main()
|
|||
{
|
||||
int srcX = xStart + xOfs;
|
||||
int srcY = yStart + yOfs;
|
||||
auto color = srcImage->mBits[(srcX - srcImage->mX) + (srcY - srcImage->mY)*srcImage->mWidth];
|
||||
if (color != 0)
|
||||
auto color = srcImage->mBits[(srcX - srcImage->mX) + (srcY - srcImage->mY)*srcImage->mWidth];
|
||||
if ((color & 0xFF000000) != 0)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -248,6 +248,12 @@ int main()
|
|||
int srcY = yStart + yOfs;
|
||||
auto color0 = srcImage0->mBits[(srcX - srcImage0->mX) + (srcY - srcImage0->mY)*srcImage0->mWidth];
|
||||
auto color1 = srcImage1->mBits[(srcX - srcImage1->mX) + (srcY - srcImage1->mY)*srcImage1->mWidth];
|
||||
|
||||
if ((color0 & 0xFF000000) == 0)
|
||||
color0 = 0;
|
||||
if ((color1 & 0xFF000000) == 0)
|
||||
color1 = 0;
|
||||
|
||||
if (color0 != color1)
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -142,6 +142,31 @@ void ImageData::PremultiplyAlpha()
|
|||
packedColor->g = (packedColor->g * packedColor->a) / 255;
|
||||
packedColor->b = (packedColor->b * packedColor->a) / 255;
|
||||
|
||||
if (mIsAdditive)
|
||||
packedColor->a = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ImageData::UnPremultiplyAlpha()
|
||||
{
|
||||
if (mBits == NULL)
|
||||
return;
|
||||
|
||||
if (mAlphaPremultiplied)
|
||||
{
|
||||
mAlphaPremultiplied = false;
|
||||
int size = mWidth * mHeight;
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
PackedColor* packedColor = (PackedColor*)(mBits + i);
|
||||
if (packedColor->a != 0)
|
||||
{
|
||||
packedColor->r = BF_MIN((packedColor->r * 255) / packedColor->a, 255);
|
||||
packedColor->g = BF_MIN((packedColor->g * 255) / packedColor->a, 255);
|
||||
packedColor->b = BF_MIN((packedColor->b * 255) / packedColor->a, 255);
|
||||
}
|
||||
|
||||
if (mIsAdditive)
|
||||
packedColor->a = 0;
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ public:
|
|||
virtual bool LoadFromFile(const StringImpl& path);
|
||||
virtual bool ReadData() { return false; }
|
||||
virtual void PremultiplyAlpha();
|
||||
virtual void UnPremultiplyAlpha();
|
||||
};
|
||||
|
||||
NS_BF_END;
|
||||
|
|
|
@ -1485,6 +1485,19 @@ ImageData* PSDReader::ReadImageData()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < aSize; i++)
|
||||
{
|
||||
PackedColor& packedColor = *(PackedColor*)(&imageData->mBits[i]);
|
||||
|
||||
if (packedColor.a != 0)
|
||||
{
|
||||
packedColor.r = BF_CLAMP((packedColor.r - (0xFF - packedColor.a)) * 0xFF / packedColor.a, 0, 0xFF);
|
||||
packedColor.g = BF_CLAMP((packedColor.g - (0xFF - packedColor.a)) * 0xFF / packedColor.a, 0, 0xFF);
|
||||
packedColor.b = BF_CLAMP((packedColor.b - (0xFF - packedColor.a)) * 0xFF / packedColor.a, 0, 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
if (rowLengths != NULL)
|
||||
{
|
||||
for (int i = 0; i < mChannels; i++)
|
||||
|
|
BIN
IDE/dist/images/DarkUI.png
vendored
BIN
IDE/dist/images/DarkUI.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 30 KiB |
BIN
IDE/dist/images/DarkUI.psd
vendored
BIN
IDE/dist/images/DarkUI.psd
vendored
Binary file not shown.
BIN
IDE/dist/images/DarkUI_2.png
vendored
BIN
IDE/dist/images/DarkUI_2.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 49 KiB |
BIN
IDE/dist/images/DarkUI_4.png
vendored
BIN
IDE/dist/images/DarkUI_4.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 88 KiB |
BIN
IDE/dist/images/DarkUI_4.psd
vendored
BIN
IDE/dist/images/DarkUI_4.psd
vendored
Binary file not shown.
BIN
IDE/dist/images/ImgCreate.exe
vendored
BIN
IDE/dist/images/ImgCreate.exe
vendored
Binary file not shown.
|
@ -266,11 +266,18 @@ namespace IDE
|
|||
public class Colors
|
||||
{
|
||||
public Color mText = 0xFFFFFFFF;
|
||||
public Color mWindow = 0xFF595962;
|
||||
public Color mBackground = 0xFF26262A;
|
||||
public Color mWindow = 0xFF44444D;
|
||||
public Color mBackground = 0xFF1C1C24;
|
||||
public Color mSelectedOutline = 0xFFCFAE11;
|
||||
public Color mMenuFocused = 0xFFE5A910;
|
||||
public Color mMenuSelected = 0xFFCB9B80;
|
||||
public Color mAutoCompleteSubText = 0xFFB0B0B0;
|
||||
public Color mAutoCompleteDocText = 0xFFC0C0C0;
|
||||
public Color mAutoCompleteActiveText = 0xFFB0B0FF;
|
||||
public Color mWorkspaceDisabledText = 0xFFA0A0A0;
|
||||
public Color mWorkspaceFailedText = 0xFFE04040;
|
||||
public Color mWorkspaceManualIncludeText = 0xFFE0E0FF;
|
||||
public Color mWorkspaceIgnoredText = 0xFF909090;
|
||||
|
||||
public Color mCode = 0xFFFFFFFF;
|
||||
public Color mKeyword = 0xFFE1AE9A;
|
||||
|
@ -305,6 +312,9 @@ namespace IDE
|
|||
GetColor("SelectedOutline", ref mSelectedOutline);
|
||||
GetColor("MenuFocused", ref mMenuFocused);
|
||||
GetColor("MenuSelected", ref mMenuSelected);
|
||||
GetColor("AutoCompleteSubText", ref mAutoCompleteSubText);
|
||||
GetColor("AutoCompleteDocText", ref mAutoCompleteDocText);
|
||||
GetColor("AutoCompleteActiveText", ref mAutoCompleteActiveText);
|
||||
|
||||
GetColor("Code", ref mCode);
|
||||
GetColor("Keyword", ref mKeyword);
|
||||
|
|
|
@ -697,7 +697,7 @@ namespace IDE.ui
|
|||
using (g.PushColor(0xFFFFFFFF))
|
||||
g.DrawBox(DarkTheme.sDarkTheme.GetImage(.Menu), drawX, drawY, mRightBoxAdjust - GS!(8), drawHeight - GS!(8));
|
||||
|
||||
using (g.PushColor(0xFFC0C0C0))
|
||||
using (g.PushColor(gApp.mSettings.mUISettings.mColors.mAutoCompleteDocText))
|
||||
g.DrawString(docParser.ShowDocString, drawX + GS!(8), drawY + GS!(4), .Left, mDocWidth - GS!(20), .Wrap);
|
||||
}
|
||||
}
|
||||
|
@ -923,7 +923,7 @@ namespace IDE.ui
|
|||
numStr.AppendF("{0}/{1}", mSelectIdx + 1, mEntryList.Count);
|
||||
if (g != null)
|
||||
{
|
||||
using (g.PushColor(0xFFB0B0B0))
|
||||
using (g.PushColor(gApp.mSettings.mUISettings.mColors.mAutoCompleteSubText))
|
||||
g.DrawString(numStr, curX, curY);
|
||||
}
|
||||
curX += font.GetWidth(numStr) + GS!(8);
|
||||
|
@ -979,7 +979,7 @@ namespace IDE.ui
|
|||
|
||||
if (g != null)
|
||||
{
|
||||
using (g.PushColor(((sectionIdx == cursorSection) && (isParam)) ? 0xFFB0B0FF : 0xFFFFFFFF))
|
||||
using (g.PushColor(((sectionIdx == cursorSection) && (isParam)) ? gApp.mSettings.mUISettings.mColors.mAutoCompleteActiveText : gApp.mSettings.mUISettings.mColors.mText))
|
||||
g.DrawString(sectionStr, curX, curY);
|
||||
}
|
||||
curX += sectionWidth;
|
||||
|
@ -1015,7 +1015,7 @@ namespace IDE.ui
|
|||
curY += font.GetLineSpacing() + GS!(4);
|
||||
if (g != null)
|
||||
{
|
||||
using (g.PushColor(0xFFC0C0C0))
|
||||
using (g.PushColor(gApp.mSettings.mUISettings.mColors.mAutoCompleteDocText))
|
||||
docHeight = g.DrawString(docString, curX, curY, .Left, maxDocWidth, .Wrap);
|
||||
}
|
||||
else
|
||||
|
@ -1052,12 +1052,12 @@ namespace IDE.ui
|
|||
curY += font.GetLineSpacing() + GS!(4);
|
||||
if (g != null)
|
||||
{
|
||||
using (g.PushColor(0xFFFFFFFF))
|
||||
using (g.PushColor(gApp.mSettings.mUISettings.mColors.mText))
|
||||
{
|
||||
g.DrawString(scope String(paramName.Length + 1)..AppendF("{0}:", paramName), curX, curY, .Left, mWidth, .Ellipsis);
|
||||
}
|
||||
|
||||
using (g.PushColor(0xFFC0C0C0))
|
||||
using (g.PushColor(gApp.mSettings.mUISettings.mColors.mAutoCompleteDocText))
|
||||
{
|
||||
g.DrawString(paramDoc, curX + font.GetWidth(paramName) + font.GetWidth(": "), curY, .Left, mWidth, .Ellipsis);
|
||||
}
|
||||
|
|
|
@ -40,9 +40,7 @@ namespace IDE.ui
|
|||
|
||||
public override void Draw(Graphics g)
|
||||
{
|
||||
using (g.PushColor(0xFFF0BFA4))
|
||||
g.DrawBox(DarkTheme.sDarkTheme.GetImage(DarkTheme.ImageIdx.VertScrollbarThumb), 0, 0, mWidth, mHeight);
|
||||
|
||||
g.DrawBox(DarkTheme.sDarkTheme.GetImage(DarkTheme.ImageIdx.PanelHeader), 0, 0, mWidth, mHeight);
|
||||
g.SetFont(DarkTheme.sDarkTheme.mSmallFont);
|
||||
float y = GS!(6);
|
||||
using (g.PushColor(0xFFFFFFFF))
|
||||
|
|
|
@ -57,14 +57,14 @@ namespace IDE.ui
|
|||
if ((projectItem != null) && (projectItem.mParentFolder != null))
|
||||
{
|
||||
if (projectItem.mIncludeKind == .Manual)
|
||||
color = Color.Mult(color, 0xFFE0E0FF);
|
||||
color = Color.Mult(color, gApp.mSettings.mUISettings.mColors.mWorkspaceManualIncludeText);
|
||||
else if (projectItem.mIncludeKind == .Ignore)
|
||||
color = Color.Mult(color, 0xFF909090);
|
||||
color = Color.Mult(color, gApp.mSettings.mUISettings.mColors.mWorkspaceIgnoredText);
|
||||
|
||||
if (let projectSource = projectItem as ProjectSource)
|
||||
{
|
||||
if (projectSource.mLoadFailed)
|
||||
color = Color.Mult(color, 0xFFFF0000);
|
||||
color = Color.Mult(color, gApp.mSettings.mUISettings.mColors.mWorkspaceFailedText);
|
||||
}
|
||||
|
||||
mTextColor = color;
|
||||
|
@ -342,8 +342,8 @@ namespace IDE.ui
|
|||
item.mOnMouseClick.Add(new => ListViewItemClicked);
|
||||
UpdateColors();
|
||||
DarkListViewItem listViewItem = (DarkListViewItem)item;
|
||||
listViewItem.mFocusColor = 0xFFA0A0A0;
|
||||
listViewItem.mSelectColor = 0xFFA0A0A0;
|
||||
listViewItem.mFocusColor = gApp.mSettings.mUISettings.mColors.mWorkspaceDisabledText;
|
||||
listViewItem.mSelectColor = gApp.mSettings.mUISettings.mColors.mWorkspaceDisabledText;
|
||||
}
|
||||
|
||||
void UpdateColors()
|
||||
|
@ -1960,9 +1960,9 @@ namespace IDE.ui
|
|||
listViewItem.mIsBold = checkProject == IDEApp.sApp.mWorkspace.mStartupProject;
|
||||
|
||||
var projectOptions = IDEApp.sApp.GetCurProjectOptions(checkProject);
|
||||
listViewItem.mTextColor = Color.Mult(DarkTheme.COLOR_TEXT, (projectOptions != null) ? Color.White : 0xFFA0A0A0);
|
||||
listViewItem.mTextColor = Color.Mult(DarkTheme.COLOR_TEXT, (projectOptions != null) ? gApp.mSettings.mUISettings.mColors.mText : gApp.mSettings.mUISettings.mColors.mWorkspaceDisabledText);
|
||||
if (checkProject.mFailed)
|
||||
listViewItem.mTextColor = Color.Mult(DarkTheme.COLOR_TEXT, 0xFFE04040);
|
||||
listViewItem.mTextColor = Color.Mult(DarkTheme.COLOR_TEXT, gApp.mSettings.mUISettings.mColors.mWorkspaceFailedText);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue