diff --git a/uppsrc/ide/BaseDlg.cpp b/uppsrc/ide/BaseDlg.cpp index 1146cb7ba..b94af5246 100644 --- a/uppsrc/ide/BaseDlg.cpp +++ b/uppsrc/ide/BaseDlg.cpp @@ -156,6 +156,19 @@ NestEditorDlg::NestEditorDlg() Sync(); } +struct BoldDisplayClass : Display { + virtual void Paint(Draw& w, const Rect& r, const Value& q, + Color ink, Color paper, dword style) const { + w.DrawRect(r, paper); + DrawSmartText(w, r.left, r.top, r.Width(), (String)q, StdFont().Bold(), ink); + } +}; + +Display& BoldDisplay() +{ + return Single(); +} + void NestEditorDlg::Sync() { bool b = nests.GetCount(); @@ -163,6 +176,8 @@ void NestEditorDlg::Sync() remove.Enable(b); up.Enable(b); down.Enable(b); + for(int i = 0; i < nests.GetCount(); i++) + nests.SetDisplay(i, 0, i == 0 ? BoldDisplay() : StdDisplay()); } bool BaseSetup(String& vars) { return BaseSetupDlg().Run(vars); } diff --git a/uppsrc/ide/Methods.cpp b/uppsrc/ide/Methods.cpp index f4131e5ef..62e245aab 100644 --- a/uppsrc/ide/Methods.cpp +++ b/uppsrc/ide/Methods.cpp @@ -605,20 +605,12 @@ bool BuildMethods::Save() return true; } -struct BoldDisplay : Display { - virtual void Paint(Draw& w, const Rect& r, const Value& q, - Color ink, Color paper, dword style) const { - w.DrawRect(r, paper); - DrawSmartText(w, r.left, r.top, r.Width(), (String)q, StdFont().Bold(), ink); - } -}; - void BuildMethods::ShowDefault() { String m = GetDefaultMethod(); for(int i = 0; i < method.GetCount(); i++) if((String)method.Get(i, 0) == m) - method.SetDisplay(i, 0, Single()); + method.SetDisplay(i, 0, BoldDisplay()); else method.SetDisplay(i, 0, StdDisplay()); } diff --git a/uppsrc/ide/ide.h b/uppsrc/ide/ide.h index b47690bbf..e53eab6ee 100644 --- a/uppsrc/ide/ide.h +++ b/uppsrc/ide/ide.h @@ -53,6 +53,8 @@ bool IsTextFile(const String& file, int maxline = INT_MAX); void Puts(const char *s); +Display& BoldDisplay(); + class Console : public LineEdit { public: virtual bool Key(dword key, int count);