small refactoring

git-svn-id: svn://kolibrios.org@9634 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2022-01-14 08:48:57 +00:00
parent 56780f0f36
commit b31ece4fbd

View File

@ -231,12 +231,12 @@ int draw_tool_btn(dword _event, _hotkey, _x, _y, _icon_n, _text, _active)
if (!_text) w = PAD + PAD + 6; if (!_text) w = PAD + PAD + 6;
if (_icon_n==-1) w = strlen(_text) * 8 + 14; if (_icon_n==-1) w = strlen(_text) * 8 + 14;
if (_active==-1) { if (_active==-1) {
EDX = COL_LINE;
$push COL_LIGHT $push COL_LIGHT
EDX = COL_LINE;
} else if (_active) { } else if (_active) {
img_ptr = icons18a.image; img_ptr = icons18a.image;
EDX = COL_BUTTON;
$push COL_BUTTON_TEXT $push COL_BUTTON_TEXT
EDX = COL_BUTTON;
} else { } else {
$push COL_WORK_TEXT $push COL_WORK_TEXT
@ -302,16 +302,14 @@ void open_image(char* _path)
int color_depth_id; int color_depth_id;
void event_set_color_depth() { void event_set_color_depth() {
//debugval("buttonid", pressed_button_id);
//debugln(libimg_bpp[pressed_button_id-color_depth_id]);
img_convert stdcall(main_image.image, 0, pressed_button_id-color_depth_id, 0, 0); img_convert stdcall(main_image.image, 0, pressed_button_id-color_depth_id, 0, 0);
if (!EAX) { if (!EAX) {
notify("'ImageEdit Pro\nConvertation error' -Et"); notify("'ImageEdit Pro\nConvertation error' -Et");
} else { } else {
$push eax $push eax
img_destroy stdcall(main_image.image); img_destroy stdcall(main_image.image);
$pop eax $pop eax
main_image.image = EAX; main_image.image = EAX;
main_image.set_vars(); main_image.set_vars();
draw_acive_panel(); draw_acive_panel();
draw_status_bar(); draw_status_bar();