mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CodeEditor: Improved left bar in dark mode
git-svn-id: svn://ultimatepp.org/upp/trunk@14171 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
88174382fd
commit
121dc5b6e6
1 changed files with 6 additions and 5 deletions
|
|
@ -55,8 +55,9 @@ void EditorBar::sPaintImage(Draw& w, int y, int fy, const Image& img)
|
|||
|
||||
void EditorBar::Paint(Draw& w)
|
||||
{
|
||||
Color bg = IsDarkTheme() ? GrayColor(70)dne : SColorLtFace();
|
||||
Size sz = GetSize();
|
||||
w.DrawRect(0, 0, sz.cx, sz.cy, SColorLtFace);
|
||||
w.DrawRect(0, 0, sz.cx, sz.cy, bg);
|
||||
if(!editor) return;
|
||||
int fy = editor->GetFontSize().cy;
|
||||
int hy = fy >> 1;
|
||||
|
|
@ -86,12 +87,12 @@ void EditorBar::Paint(Draw& w)
|
|||
ann = l.annotation;
|
||||
}
|
||||
if(editor->GetCaret().top == y && editor->barline)
|
||||
w.DrawRect(0, y, sz.cx, fy, Blend(SColorHighlight(), SColorLtFace(), 200));
|
||||
w.DrawRect(0, y, sz.cx, fy, Blend(SColorHighlight(), bg, 200));
|
||||
if(line_numbers && i < editor->GetLineCount()) {
|
||||
String n = AsString((i + 1) % 1000000);
|
||||
Font fnt = editor->GetFont();
|
||||
Size tsz = GetTextSize(n, fnt);
|
||||
w.DrawText(sz.cx - Zx(4 + 12) - tsz.cx, y + (fy - tsz.cy) / 2, n, fnt, Brown);
|
||||
w.DrawText(sz.cx - Zx(4 + 12) - tsz.cx, y + (fy - tsz.cy) / 2, n, fnt, SBrown());
|
||||
}
|
||||
if(hi_if) {
|
||||
Vector<IfState> nextif;
|
||||
|
|
@ -128,10 +129,10 @@ void EditorBar::Paint(Draw& w)
|
|||
if(edit)
|
||||
{
|
||||
int age = (int)(log((double)(editor->GetUndoCount() + 1 - edit)) * 30);
|
||||
w.DrawRect(0, y, width, fy, Blend(LtBlue, SColorLtFace(), min(220, age)));
|
||||
w.DrawRect(0, y, width, fy, Blend(SLtBlue(), bg, min(220, age)));
|
||||
}
|
||||
if(err)
|
||||
w.DrawRect(width, y, width, fy, err == 1 ? LtRed : (err == 2 ? Color(255, 175, 0) : Green));
|
||||
w.DrawRect(width, y, width, fy, err == 1 ? LtRed() : (err == 2 ? Color(255, 175, 0) : SGreen()));
|
||||
}
|
||||
|
||||
if(!b.IsEmpty())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue