mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-17 14:22:37 -06:00
indexing progress improvement
This commit is contained in:
parent
37f538cc42
commit
b9723113ae
3 changed files with 5 additions and 11 deletions
|
|
@ -676,10 +676,10 @@ void Ide::SyncClang()
|
|||
if(Indexer::IsRunning()) {
|
||||
IndexerProgress mi;
|
||||
mi.pos = Indexer::Progress();
|
||||
display.Set(MakeImage(mi));
|
||||
indeximage.SetImage(MakeImage(mi));
|
||||
}
|
||||
else
|
||||
display.Set(Image());
|
||||
indeximage.SetImage(Null);
|
||||
animate_phase = phase;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -346,14 +346,10 @@ struct WebSearchTab : WithSetupWebSearchTabLayout<ParentCtrl> {
|
|||
|
||||
struct CursorInfoCtrl : Ctrl {
|
||||
String text;
|
||||
// Color animate = Null;
|
||||
Image img;
|
||||
|
||||
void Paint(Draw& w) override;
|
||||
|
||||
void Set(const String& s) { text = s; Refresh(); }
|
||||
void Set(const Image& m) { if(!m.IsSame(img)) { img = m; Refresh(); }}
|
||||
// void Animate(Color c) { if(animate != c) { animate = c; Refresh(); } }
|
||||
|
||||
CursorInfoCtrl();
|
||||
};
|
||||
|
|
@ -690,7 +686,7 @@ public:
|
|||
|
||||
FrameTop<StaticBarArea> bararea;
|
||||
CursorInfoCtrl display;
|
||||
|
||||
ImageCtrl indeximage;
|
||||
|
||||
byte hilite_scope;
|
||||
int hilite_bracket;
|
||||
|
|
|
|||
|
|
@ -339,10 +339,6 @@ static void sHighlightLine(const String& path, Vector<LineEdit::Highlight>& hln,
|
|||
void CursorInfoCtrl::Paint(Draw& w)
|
||||
{
|
||||
Size sz = GetSize();
|
||||
if(!IsNull(img)) {
|
||||
Size isz = img.GetSize();
|
||||
w.DrawImage(0, (sz.cy - isz.cy) / 2, img);
|
||||
}
|
||||
Size tsz = GetTextSize(text, StdFont());
|
||||
int x = sz.cx - tsz.cx;
|
||||
int y = (sz.cy - tsz.cy) / 2;
|
||||
|
|
@ -638,6 +634,8 @@ Ide::Ide()
|
|||
SetupBars();
|
||||
SetBar();
|
||||
|
||||
editor.search.Add(indeximage.RightPos(DPI(1), DPI(16)).VSizePos());
|
||||
|
||||
#ifdef PLATFORM_COCOA
|
||||
WhenDockMenu = [=](Bar& bar) {
|
||||
bar.Add("Open main package..", [=] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue