diff --git a/programs/cmm/TWB/TWB.c b/programs/cmm/TWB/TWB.c index 766bd2adc8..16c3fc57a8 100644 --- a/programs/cmm/TWB/TWB.c +++ b/programs/cmm/TWB/TWB.c @@ -633,7 +633,7 @@ void TWebBrowser::SetTextStyle(int left1, top1) { } if (isTag("img")) { - ImgCache.Images( left1, top1); + ImgCache.Images( left1, top1, WB1.list.w); return; } if (isTag("meta")) || (isTag("?xml")) @@ -656,7 +656,7 @@ void TWebBrowser::SetTextStyle(int left1, top1) { } } -void TWebBrowser::DrawScroller() //не оптимальная отрисовка, но зато в одном месте +void TWebBrowser::DrawScroller() { scroll_wv.max_area = list.count; scroll_wv.cur_area = list.visible; @@ -673,12 +673,13 @@ void TWebBrowser::DrawScroller() // void TWebBrowser::NewLine(int left1, top1) { - if (!stroka) DrawBar(list.x, list.y, list.w, 5, bg_color); //закрашиваем фон над первой строкой + if (!stroka) DrawBar(list.x, list.y, list.w, 5, bg_color); if (t_html) && (!t_body) return; if (top1>=list.y) && ( top1 < list.h+list.y-10) && (!anchor) { if (text_align == ALIGN_CENTER) DrawBuf.AlignCenter(left1,top1,list.w,list.line_h,stolbec * 6); if (text_align == ALIGN_RIGHT) DrawBuf.AlignRight(left1,top1,list.w,list.line_h,stolbec * 6); + DrawBuf.bufy = top1; DrawBuf.Show(); DrawBuf.Fill(bg_color); } diff --git a/programs/cmm/TWB/img_cache.h b/programs/cmm/TWB/img_cache.h index b6af308849..8f12b92a0b 100644 --- a/programs/cmm/TWB/img_cache.h +++ b/programs/cmm/TWB/img_cache.h @@ -38,7 +38,7 @@ void ImageCache::Images(int left1, top1, width1) { dword image; char img_path[4096], alt[4096]; - int w=0, h=0, img_lines_first=0, cur_pic=0; + int imgw=0, imgh=0, img_lines_first=0, cur_pic=0; do{ if (!strcmp(#parametr,"src=")) //надо объединить с GetNewUrl() @@ -73,32 +73,32 @@ void ImageCache::Images(int left1, top1, width1) return; } - w = DSWORD[pics[cur_pic].image+4]; - h = DSWORD[pics[cur_pic].image+8]; - if (w > width1) w = width1; + imgw = DSWORD[pics[cur_pic].image+4]; + imgh = DSWORD[pics[cur_pic].image+8]; + if (imgw > width1) imgw = width1; if (stroka==0) DrawBar(WB1.list.x, WB1.list.y, WB1.list.w-15, 5, bg_color); //закрашиваем первую строку - stroka += h/10; - if (top1+hWB1.list.y+WB1.list.h-10) return; //если ВСЁ изображение ушло ВЕРХ или ВНИЗ + stroka += imgh/10; + if (top1+imghWB1.list.y+WB1.list.h-10) return; //если ВСЁ изображение ушло ВЕРХ или ВНИЗ if (top1WB1.list.y+WB1.list.h-h-5) //если часть изображения снизу + if (top1>WB1.list.y+WB1.list.h-imgh-5) //если часть изображения снизу { - h=WB1.list.y+WB1.list.h-top1-5; + imgh=WB1.list.y+WB1.list.h-top1-5; } - if (h<=0) return; + if (imgh<=0) return; if (anchor) return; - img_draw stdcall (pics[cur_pic].image, left1-5, top1, w, h,0,img_lines_first); - DrawBar(left1+w - 5, top1, WB1.list.w-w, h, bg_color); + img_draw stdcall (pics[cur_pic].image, left1-5, top1, imgw, imgh,0,img_lines_first); + DrawBar(left1+imgw - 5, top1, WB1.list.w-imgw, imgh, bg_color); IF (link) { - UnsafeDefineButton(left1 - 5, top1, w, h-1, PageLinks.count + 400 + BT_HIDE, 0xB5BFC9); - PageLinks.AddText(0, w, h-1, NOLINE); + UnsafeDefineButton(left1 - 5, top1, imgw, imgh-1, PageLinks.count + 400 + BT_HIDE, 0xB5BFC9); + PageLinks.AddText(0, imgw, imgh-1, NOLINE); // WB1.DrawPage(); } } diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index 4d331d907e..9510d05dd5 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -30,14 +30,14 @@ #include "img\URLgoto.txt"; #ifdef LANG_RUS - char version[]=" ’ҐЄбв®ўл© Ўа г§Ґа 0.99.75"; + char version[]=" ’ҐЄбв®ўл© Ўа г§Ґа 0.99.76"; ?define IMAGES_CACHE_CLEARED "Љни Є авЁ­®Є ®зЁйҐ­" ?define T_LAST_SLIDE "ќв® Ї®б«Ґ¤­Ё© б« ©¤" char loading[] = "‡ Јаг§Є  бва ­Ёжл...
"; unsigned char page_not_found[] = FROM "html\page_not_found_ru.htm"; char accept_language[]= "Accept-Language: ru\n"; #else - char version[]=" Text-based Browser 0.99.75"; + char version[]=" Text-based Browser 0.99.76"; ?define IMAGES_CACHE_CLEARED "Images cache cleared" ?define T_LAST_SLIDE "This slide is the last" char loading[] = "Loading...
"; @@ -227,7 +227,7 @@ void SetElementSizes() WB1.list.SetSizes(0, 44, Form.width - 10 - scroll_wv.size_x, Form.cheight - 44, 0, 10); WB1.list.column_max = WB1.list.w - scroll_wv.size_x / 6; WB1.list.visible = WB1.list.h - 3 / WB1.list.line_h - 2; - WB1.DrawBuf.Init(WB1.list.x, WB1.list.line_h, WB1.list.w, WB1.list.h); + WB1.DrawBuf.Init(WB1.list.x, WB1.list.y, WB1.list.w, WB1.list.line_h); } diff --git a/programs/cmm/lib/lib.obj/box_lib.h b/programs/cmm/lib/lib.obj/box_lib.h index 3520024d6d..bd95f6c9b5 100644 --- a/programs/cmm/lib/lib.obj/box_lib.h +++ b/programs/cmm/lib/lib.obj/box_lib.h @@ -17,6 +17,10 @@ dword version_scrollbar = #aVersion_scrollbar; dword PathShow_prepare = #aPathShow_prepare; dword PathShow_draw = #aPathShow_draw; + +dword progressbar_draw = #aProgressbar_draw; +dword progressbar_progress = #aProgressbar_progress; + $DD 2 dup 0 char aEdit_box_draw [9] = "edit_box\0"; @@ -42,6 +46,9 @@ char aVersion_op [11] = "version_op\0" ; char aPathShow_prepare [17] = "PathShow_prepare\0"; char aPathShow_draw [14] = "PathShow_draw\0"; +char aProgressbar_draw [17] = "progressbar_draw\0"; +char aProgressbar_progress[21] = "progressbar_progress\0"; + struct PathShow_data { @@ -100,4 +107,19 @@ position2,// equ [edi+72] work_size,// equ [edi+76] all_redraw,// equ [edi+80] ar_offset;// equ [edi+84] +}; + +struct pb //progressbar +{ +dword value, +left, +top, +width, +height, +style, +min, +max, +back_color, +progress_color, +frame_color; }; \ No newline at end of file