Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7614 → Rev 7636

/programs/cmm/lib/gui/checkbox.h
61,26 → 61,28
:void checkbox::draw(dword _x,_y)
{
#define SIZE 14
dword text_col = system.color.work_text;
if (!id) id = GetFreeButtonId();
x=_x; y=_y;
 
DefineButton(x-1, y-1, strlen(text)*8 + SIZE + 17, SIZE+2, id+BT_HIDE+BT_NOFRAME, 0);
WriteTextWithBg(x+SIZE+8, SIZE / 2 + y -7, 0xD0, system.color.work_text, text, system.color.work);
DrawRectangle(x, y, SIZE, SIZE, system.color.work_graph);
if (disabled)
{
DrawRectangle(x+1, y+1, SIZE-2, SIZE-2, 0xffffff);
DrawBar(x+2, y+2, SIZE-3, SIZE-3, 0xCCCccc);
text_col = MixColors(system.color.work, system.color.work_text, 128);
}
else if (checked == 0)
else if (checked == false)
{
DrawRectangle3D(x+1, y+1, SIZE-2, SIZE-2, 0xDDDddd, 0xffffff);
DrawBar(x+2, y+2, SIZE-3, SIZE-3, 0xffffff);
}
else if (checked == 1)
else if (checked == true)
{
_PutImage(x+1, y+1, 13, 13, #checkbox_flag);
}
if (text) WriteTextWithBg(x+SIZE+8, SIZE / 2 + y -7, 0xD0, text_col, text, system.color.work);
DrawRectangle3D(x-1,y-1,SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light);
}
 
/programs/cmm/lib/gui/more_less_box.h
5,6 → 5,7
int click_delta;
int x,y;
unsigned id_inc, id_dec;
bool disabled;
void check_values();
bool click();
bool inc();
41,6 → 42,7
{
#define VALUE_FIELD_W 34
#define SIZE 18
dword text_col = system.color.work_text;
dword value_text = itoa(value);
 
check_values();
48,12 → 50,23
 
DrawRectangle(x, y, VALUE_FIELD_W+1, SIZE, system.color.work_graph);
DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xDDDddd, 0xffffff);
 
if (disabled)
{
DrawRectangle(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xffffff);
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xCCCccc);
text_col = MixColors(system.color.work, system.color.work_text, 128);
}
else
{
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff);
}
 
WriteText( -strlen(value_text)+3*8 + x+6, SIZE / 2 + y -6, 0x90, 0x333333, value_text);
 
DrawCaptButton(VALUE_FIELD_W + x + 1, y, SIZE, SIZE, id_inc, system.color.work_button, system.color.work_button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, id_dec, system.color.work_button, system.color.work_button_text, "-");
WriteTextWithBg(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, system.color.work_text, text, system.color.work);
WriteTextWithBg(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, text_col, text, system.color.work);
DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light);
}