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:
parent
ea969f0a24
commit
ef12e22adc
@ -1348,7 +1348,7 @@ void TPushbutton_control::update()
|
|||||||
const int w = xvt_dwin_get_text_width(win, (char*)(const char*)_caption, -1);
|
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 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)
|
if (_obj->v.btn->down)
|
||||||
{
|
{
|
||||||
@ -1359,7 +1359,7 @@ void TPushbutton_control::update()
|
|||||||
DRAW_CTOOLS ct;
|
DRAW_CTOOLS ct;
|
||||||
xvt_dwin_get_draw_ctools(win, &ct);
|
xvt_dwin_get_draw_ctools(win, &ct);
|
||||||
ct.opaque_text = FALSE;
|
ct.opaque_text = FALSE;
|
||||||
ct.fore_color = _obj->v.btn->fore_color;
|
ct.fore_color = (attrib & XI_ATR_ENABLED) ? _obj->v.btn->fore_color : DISABLED_COLOR;
|
||||||
xvt_dwin_set_draw_ctools(win, &ct);
|
xvt_dwin_set_draw_ctools(win, &ct);
|
||||||
|
|
||||||
xvt_dwin_draw_text(win, x, y, (char*)(const char*)_caption, -1);
|
xvt_dwin_draw_text(win, x, y, (char*)(const char*)_caption, -1);
|
||||||
|
@ -560,10 +560,10 @@ bool TMask_field::warning_box(
|
|||||||
|
|
||||||
bool TMask_field::yesno_box(const char* fmt, ...) const
|
bool TMask_field::yesno_box(const char* fmt, ...) const
|
||||||
{
|
{
|
||||||
set_focus();
|
|
||||||
build_msg();
|
build_msg();
|
||||||
|
set_focus();
|
||||||
const bool yes = ::yesno_box("%s", _msg);
|
const bool yes = ::yesno_box("%s", _msg);
|
||||||
highlight();
|
set_focus();
|
||||||
return yes;
|
return yes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -572,7 +572,7 @@ KEY TMask_field::yesnocancel_box(const char* fmt, ...) const
|
|||||||
build_msg();
|
build_msg();
|
||||||
set_focus();
|
set_focus();
|
||||||
const KEY k = ::yesnocancel_box("%s", _msg);
|
const KEY k = ::yesnocancel_box("%s", _msg);
|
||||||
highlight();
|
set_focus();
|
||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user