CtrlLib: DropList transparency (Feature #367)

git-svn-id: svn://ultimatepp.org/upp/trunk@5636 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-12-10 14:49:42 +00:00
parent f3aa9230bd
commit 275cc5d8de
2 changed files with 5 additions and 2 deletions

View file

@ -70,7 +70,6 @@ void Ctrl::Call(Callback cb)
if(IsMainThread())
cb();
else {
int ms = msecs();
CallBox cbox;
cbox.cb = cb;
UPP::PostCallback(callback1(PerformCall, &cbox));

View file

@ -390,7 +390,8 @@ void MultiButton::Paint(Draw& w)
cr.left = lx;
cr.right = rx;
r = cr;
paper = HasFocus() ? SColorHighlight() : SColorPaper();
if(!IsTransparent())
paper = HasFocus() ? SColorHighlight() : SColorPaper();
if(HasFocus())
text = SColorHighlightText();
w.DrawRect(r, paper);
@ -400,6 +401,9 @@ void MultiButton::Paint(Draw& w)
Rect m = GetMargin();
r = Rect(max(lx, m.left), m.top, min(rx, sz.cx - m.right), sz.cy - m.bottom);
Color paper;
if(IsTransparent())
paper = Null;
else
if(mst == CTRL_HOT && !IsTrivial())
paper = Blend(SColorHighlight, SColorPaper, 235);
else