diff --git a/programs/cmm/aelia/aelia.c b/programs/cmm/aelia/aelia.c index 672c101c16..4d62abaed4 100644 --- a/programs/cmm/aelia/aelia.c +++ b/programs/cmm/aelia/aelia.c @@ -10,6 +10,7 @@ #include "../lib/obj/iconv.h" #include "../lib/obj/proc_lib.h" #include "../lib/obj/http.h" +#include "../lib/cursor.h" #include "../lib/patterns/libimg_load_skin.h" #include "../lib/patterns/simple_open_dialog.h" #include "../lib/patterns/history.h" @@ -55,6 +56,9 @@ char address[UML]="http://"; int mouse_address_box; edit_box address_box = {250,56,34,0xffffff,0x94AECE,0xffffff,0xffffff,0,UML,#address,#mouse_address_box,2,19,19}; +CustomCursor CursorPointer; +dword CursorFile = FROM "pointer.cur"; + #include "ini.h" #include "gui.h" #include "label.h" @@ -80,6 +84,7 @@ void main() { InitDlls(); OpenDialog_init stdcall (#o_dialog); + CursorPointer.Load(#CursorFile); label.init(DEFAULT_FONT); Libimg_LoadImage(#skin, abspath("toolbar.png")); LoadIniSettings(); diff --git a/programs/cmm/aelia/buidin_pages/about.htm b/programs/cmm/aelia/buidin_pages/about.htm index 0d53678a21..6c156cf532 100644 Binary files a/programs/cmm/aelia/buidin_pages/about.htm and b/programs/cmm/aelia/buidin_pages/about.htm differ diff --git a/programs/cmm/aelia/label.h b/programs/cmm/aelia/label.h index 04245eefd3..7298cdcd25 100644 --- a/programs/cmm/aelia/label.h +++ b/programs/cmm/aelia/label.h @@ -23,11 +23,11 @@ void WriteTextIntoBuf(int _x, _y; dword _text_col, _text_off) { char error_message[128]; if (_x > list.w) { - sprintf(#error_message, "\nWriteTextIntoBuf _x overflow: H %d X %d \n", label.size.height, _x); + sprintf(#error_message, "'WriteTextIntoBuf _x overflow: H %d X %d' -A", label.size.height, _x); notify(#error_message); } if (_y+label.size.pt > label.size.height) { - sprintf(#error_message, "\nWriteTextIntoBuf _y overflow: H %d Y %d \n", label.size.height, _y); + sprintf(#error_message, "'WriteTextIntoBuf _y overflow: H %d Y %d' -A", label.size.height, _y); notify(#error_message); return; } diff --git a/programs/cmm/aelia/link.h b/programs/cmm/aelia/link.h index 831c848226..4bf8110660 100644 --- a/programs/cmm/aelia/link.h +++ b/programs/cmm/aelia/link.h @@ -34,7 +34,7 @@ int _link::hover() //char tempp[4096]; dword color; int i; - active = 0; + active = -1; mouse.x = mouse.x - list.x; mouse.y = mouse.y - list.y; for (i=0; ilink.x[i]) && (-list.first*list.item_h+link.y[i]mouse.y) - color = 0xFF0000; - else - color = 0xCCCccc; - DrawRectangle(link.x[i]+list.x+1, -list.first*list.item_h+link.y[i]+list.y, link.w[i], link.h[i], color); + && (-list.first*list.item_h+link.y[i]+link.h[i]>mouse.y) { + color = 0xFFFfff; + CursorPointer.Set(); + active = i; + } + else { + color = 0x0000FF; + } + DrawBar(link.x[i]+list.x, -list.first*list.item_h+link.y[i]+list.y+link.h[i]-1, link.w[i], 1, color); } } + if (active==-1) CursorPointer.Restore(); return false; } \ No newline at end of file diff --git a/programs/cmm/aelia/pointer.cur b/programs/cmm/aelia/pointer.cur new file mode 100644 index 0000000000..580bb75fa8 Binary files /dev/null and b/programs/cmm/aelia/pointer.cur differ diff --git a/programs/cmm/aelia/prepare_page.h b/programs/cmm/aelia/prepare_page.h index 77f9c4d66f..415a11d35f 100644 --- a/programs/cmm/aelia/prepare_page.h +++ b/programs/cmm/aelia/prepare_page.h @@ -53,9 +53,9 @@ int stroka_y=5, line_length=0; } } if (draw==false) { - list.count = stroka_y/list.item_h+2; + list.count = stroka_y/list.item_h+3; if (list.count < list.visible) list.count = list.visible; - label.size.height = list.count+1*list.item_h; + label.size.height = list.count+5*list.item_h; label.raw_size = 0; } if (draw==true) WriteTextIntoBuf(8, stroka_y, 0x000000, line_start); @@ -171,6 +171,7 @@ dword DOM_pos; strcpy(#title, text.start); continue; } + strtrim(text.start); while (get_label_len(text.start) + stroka_x + 30 > list.w) { zeroch = 0; @@ -186,6 +187,7 @@ dword DOM_pos; label_draw_bar(stroka_x, stroka_y+label.size.pt+1, get_label_len(text.start), style.color); } WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start); + stroka_x+=char_width[' ']; } ESBYTE[line_break] >< zeroch; //restore line text.start = line_break; @@ -198,6 +200,7 @@ dword DOM_pos; label_draw_bar(stroka_x, stroka_y+label.size.pt+1, get_label_len(text.start), style.color); } WriteTextIntoBuf(stroka_x, stroka_y, style.color, text.start); + stroka_x+=char_width[' ']; } stroka_x += get_label_len(text.start); } @@ -205,11 +208,20 @@ dword DOM_pos; ESBYTE[DOM_pos] = '\0'; text.start = DOM_pos + 1; tag.parce(); - if (tag.nameis("br")) || (tag.nameis("p")) || (tag.nameis("div")) || (tag.nameis("h1")) || (tag.nameis("h2")) { + if (tag.nameis("br")) + || (tag.nameis("p")) + || (tag.nameis("div")) + || (tag.nameis("tr")) { stroka_y+= list.item_h; stroka_x = HTML_PADDING_X; continue; } + if (tag.nameis("h1")) || (tag.nameis("/h1")) + || (tag.nameis("h2")) || (tag.nameis("/h2")) { + stroka_y+= list.item_h; + stroka_x = HTML_PADDING_X; + continue; + } if (tag.nameis("script")) || (tag.nameis("style")) style.ignore = true; if (tag.nameis("/script")) || (tag.nameis("/style")) style.ignore = false; if (tag.nameis("a")) { style.a = true; style.color=0x0000FF; } @@ -217,9 +229,9 @@ dword DOM_pos; } } if (draw==false) { - list.count = stroka_y/list.item_h+2; + list.count = stroka_y/list.item_h+3; if (list.count < list.visible) list.count = list.visible; - label.size.height = list.count+1*list.item_h; + label.size.height = list.count+5*list.item_h; label.raw_size = 0; } free(DOM.start);