controls.cpp Corretto colore dei bottoni disabilitati

maskfld.cpp    Corretta gestione della TMask_field::yesno_box


git-svn-id: svn://10.65.10.50/trunk@3236 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-07-24 14:37:11 +00:00
parent ea969f0a24
commit ef12e22adc
2 changed files with 6 additions and 6 deletions

View File

@ -1348,7 +1348,7 @@ void TPushbutton_control::update()
const int w = xvt_dwin_get_text_width(win, (char*)(const char*)_caption, -1);
int x = r.left + (r.right - r.left - w) / 2;
int y = r.top + (r.bottom - r.top + ascent - descent) / 2;
int y = r.top + (r.bottom - r.top + ascent - (descent+1)) / 2;
if (_obj->v.btn->down)
{
@ -1358,8 +1358,8 @@ void TPushbutton_control::update()
DRAW_CTOOLS ct;
xvt_dwin_get_draw_ctools(win, &ct);
ct.opaque_text = FALSE;
ct.fore_color = _obj->v.btn->fore_color;
ct.opaque_text = FALSE;
ct.fore_color = (attrib & XI_ATR_ENABLED) ? _obj->v.btn->fore_color : DISABLED_COLOR;
xvt_dwin_set_draw_ctools(win, &ct);
xvt_dwin_draw_text(win, x, y, (char*)(const char*)_caption, -1);

View File

@ -560,10 +560,10 @@ bool TMask_field::warning_box(
bool TMask_field::yesno_box(const char* fmt, ...) const
{
set_focus();
build_msg();
set_focus();
const bool yes = ::yesno_box("%s", _msg);
highlight();
set_focus();
return yes;
}
@ -572,7 +572,7 @@ KEY TMask_field::yesnocancel_box(const char* fmt, ...) const
build_msg();
set_focus();
const KEY k = ::yesnocancel_box("%s", _msg);
highlight();
set_focus();
return k;
}