Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4673 → Rev 4674

/programs/cmm/TWB/TWB.c
633,7 → 633,7
}
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::DrawScroller() //íå îïòèìàëüíàÿ îòðèñîâêà, íî çàòî â îäíîì ìåñòå
void TWebBrowser::DrawScroller()
{
scroll_wv.max_area = list.count;
scroll_wv.cur_area = list.visible;
673,12 → 673,13
 
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);
}
/programs/cmm/TWB/img_cache.h
38,7 → 38,7
{
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
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+h<WB1.list.y) || (top1>WB1.list.y+WB1.list.h-10) return; //åñëè ÂѨ èçîáðàæåíèå óøëî ÂÅÐÕ èëè ÂÍÈÇ
stroka += imgh/10;
if (top1+imgh<WB1.list.y) || (top1>WB1.list.y+WB1.list.h-10) return; //åñëè ÂѨ èçîáðàæåíèå óøëî ÂÅÐÕ èëè ÂÍÈÇ
if (top1<WB1.list.y) //åñëè ÷àñòü èçîáðàæåíèÿ ñâåðõó
{
img_lines_first=WB1.list.y-top1;
h=h-img_lines_first;
imgh=imgh-img_lines_first;
top1=WB1.list.y;
}
if (top1>WB1.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();
}
}