mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: First nests dlg line now bold (to indicate the main package)
git-svn-id: svn://ultimatepp.org/upp/trunk@12008 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5280b8e611
commit
7e64005df6
3 changed files with 18 additions and 9 deletions
|
|
@ -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<BoldDisplayClass>();
|
||||
}
|
||||
|
||||
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); }
|
||||
|
|
|
|||
|
|
@ -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<BoldDisplay>());
|
||||
method.SetDisplay(i, 0, BoldDisplay());
|
||||
else
|
||||
method.SetDisplay(i, 0, StdDisplay());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue