Rev 4411 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4411 | Rev 4414 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | if (downloader_id) strcpy(#img_path, #history_list[history_current-1].Item); |
40 | if (downloader_id) strcpy(#img_path, #history_list[history_current-1].Item); |
41 | else strcpy(#img_path, BrowserHistory.CurrentUrl()); //äîñòà¸ì àäðåñ òåêóùåé ñòðàíèöû |
41 | else strcpy(#img_path, BrowserHistory.CurrentUrl()); //äîñòà¸ì àäðåñ òåêóùåé ñòðàíèöû |
Line 42... | Line 42... | ||
42 | 42 | ||
43 | if (strcmpn(#img_path, "http:", 5)!=0) || (strcmpn(#options, "http:", 5)!=0) |
43 | if (strcmpn(#img_path, "http:", 5)!=0) || (strcmpn(#options, "http:", 5)!=0) |
- | 44 | { |
|
- | 45 | //get path: absolute or relative |
|
- | 46 | if (options[0]=='/') |
|
- | 47 | strcpy(#img_path, #options); |
|
- | 48 | else |
|
44 | { |
49 | { |
45 | img_path[strrchr(#img_path, '/')] = '\0'; //îáðåçàåì å¸ óðë äî ïîñëåäíåãî / |
50 | img_path[strrchr(#img_path, '/')] = '\0'; |
46 | strcat(#img_path, #options); |
51 | strcat(#img_path, #options); |
47 | 52 | } |
|
48 | cur_pic=GetOrSetPicNum(#img_path); |
53 | cur_pic=GetOrSetPicNum(#img_path); |
49 | if (!pics[cur_pic].path) |
54 | if (!pics[cur_pic].path) |
50 | { |
55 | { |
51 | pics[cur_pic].image=load_image(#img_path); |
56 | pics[cur_pic].image=load_image(#img_path); |
Line 70... | Line 75... | ||
70 | 75 | ||
71 | w = DSWORD[pics[cur_pic].image+4]; |
76 | w = DSWORD[pics[cur_pic].image+4]; |
72 | h = DSWORD[pics[cur_pic].image+8]; |
77 | h = DSWORD[pics[cur_pic].image+8]; |
Line 73... | Line 78... | ||
73 | if (w > width1) w = width1; |
78 | if (w > width1) w = width1; |
74 | 79 | ||
75 | if (stroka==0) DrawBar(WB1.left, WB1.top, WB1.width-15, 5, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó |
80 | if (stroka==0) DrawBar(WB1.list.x, WB1.list.y, WB1.list.w-15, 5, bg_color); //çàêðàøèâàåì ïåðâóþ ñòðîêó |
76 | stroka+=h/10; |
81 | stroka+=h/10; |
77 | if (top1+h |
82 | if (top1+h |
78 | if (top1 |
83 | if (top1 |
79 | { |
84 | { |
80 | img_lines_first=WB1.top-top1; |
85 | img_lines_first=WB1.list.y-top1; |
81 | h=h-img_lines_first; |
86 | h=h-img_lines_first; |
82 | top1=WB1.top; |
87 | top1=WB1.list.y; |
83 | } |
88 | } |
84 | if (top1>WB1.top+WB1.height-h-5) //åñëè ÷àñòü èçîáðàæåíèÿ ñíèçó |
89 | if (top1>WB1.list.y+WB1.list.h-h-5) //åñëè ÷àñòü èçîáðàæåíèÿ ñíèçó |
85 | { |
90 | { |
86 | h=WB1.top+WB1.height-top1-5; |
91 | h=WB1.list.y+WB1.list.h-top1-5; |
87 | } |
92 | } |
Line 88... | Line 93... | ||
88 | if (h<=0) return; |
93 | if (h<=0) return; |
89 | if (anchor) return; |
94 | if (anchor) return; |
90 | 95 | ||
91 | img_draw stdcall (pics[cur_pic].image, left1-5, top1, w, h,0,img_lines_first); |
96 | img_draw stdcall (pics[cur_pic].image, left1-5, top1, w, h,0,img_lines_first); |
92 | DrawBar(left1+w - 5, top1, WB1.width-w, h, bg_color); |
97 | DrawBar(left1+w - 5, top1, WB1.list.w-w, h, bg_color); |