mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-03 06:12:43 -06:00
DropGrid: Clearing value or setting null no longer causes setting focus, fixed painting background in not editable state
git-svn-id: svn://ultimatepp.org/upp/trunk@3363 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
05a5e6e242
commit
2c26019500
1 changed files with 5 additions and 5 deletions
|
|
@ -194,14 +194,15 @@ void DropGrid::Paint(Draw& w)
|
|||
else
|
||||
clear.Hide();
|
||||
|
||||
//w.DrawRect(sz, SColorPaper());
|
||||
GridDisplay &disp = display ? *display : list.GetDisplay();
|
||||
bool hf = HasFocus();
|
||||
bool isnull = rowid < 0;
|
||||
Color fg = hf ? SColorHighlightText() : IsEnabled() ? SColorText() : SColorDisabled();
|
||||
Color bg = !IsEnabled() ? EditField::StyleDefault().disabled //SColorFace
|
||||
: notnull && isnull ? Blend(SColorPaper, Color(255, 0, 0), /*hf ? 55 :*/ 32)
|
||||
: hf ? SColorHighlight() : SColorPaper();
|
||||
Color bg = !IsEnabled() || !IsEditable()
|
||||
? EditField::StyleDefault().disabled
|
||||
: notnull && isnull
|
||||
? Blend(SColorPaper, Color(255, 0, 0), 32)
|
||||
: hf ? SColorHighlight() : SColorPaper();
|
||||
|
||||
const int d = 0;
|
||||
|
||||
|
|
@ -676,7 +677,6 @@ void DropGrid::ClearValue()
|
|||
UpdateActionRefresh();
|
||||
else
|
||||
UpdateRefresh();
|
||||
SetFocus();
|
||||
}
|
||||
|
||||
void DropGrid::Reset()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue