From 2c3c9a032a354b3f0016aa6a37b21fa85f287b46 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sat, 13 Feb 2016 19:59:07 +0000 Subject: [PATCH] Aelia: fix check_is_the_adress_local(), slighter font smooth calc: fix dec-hex-bin 3d style button appearance Blueberries skin: update git-svn-id: svn://kolibrios.org@6216 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/aelia/aelia.c | 1 + programs/cmm/aelia/prepare_page.h | 81 ++------------- programs/cmm/aelia/tag.h | 105 ++++++++++++++++++++ programs/cmm/lib/font.h | 4 +- programs/cmm/lib/patterns/http_downloader.h | 8 +- programs/other/calc/trunk/calc.asm | 12 +-- skins/Leency/Blueberries/default.asm | 8 +- skins/Leency/Blueberries/default.dtp | Bin 40 -> 40 bytes skins/Leency/Blueberries/default.dtp.asm | 2 +- skins/Leency/Blueberries/right1.bmp | Bin 4566 -> 4566 bytes 10 files changed, 130 insertions(+), 91 deletions(-) create mode 100644 programs/cmm/aelia/tag.h diff --git a/programs/cmm/aelia/aelia.c b/programs/cmm/aelia/aelia.c index bc7cb077a8..bfd3b3ef5b 100644 --- a/programs/cmm/aelia/aelia.c +++ b/programs/cmm/aelia/aelia.c @@ -61,6 +61,7 @@ dword CursorFile = FROM "pointer.cur"; #include "favicon.h" #include "ini.h" +#include "tag.h" #include "gui.h" #include "label.h" #include "link.h" diff --git a/programs/cmm/aelia/prepare_page.h b/programs/cmm/aelia/prepare_page.h index bba09c6a6d..dbb7583548 100644 --- a/programs/cmm/aelia/prepare_page.h +++ b/programs/cmm/aelia/prepare_page.h @@ -68,98 +68,33 @@ int stroka_y=5, line_length=0; = = ========================================================*/ -/* <meta encoding> <a hrf=""> <img src="" alt=""> <h1>..<h6> <b> <u> <s> <pre> */ - -struct _DOM { - dword start; - dword end; - dword len; -}; - -struct _style { - bool b, u, i, s; - bool h1, h2, h3, h4, h5, h6; - bool a; - bool pre; - bool ignore; - dword color; - void clear(); -} style; - -void _style::clear() -{ - b=u=i=s=0; - h1=h2=h3=h4=h5=h6=0; - a=0; - pre=0; - ignore=0; - color=0; -} - -struct _text { - dword start; - int x, y; -}; - -struct _tag { - dword start; - dword name; - dword param[10]; - dword value[10]; - void parce(); - int nameis(); - void clear(); -}; - -void _tag::parce() -{ - dword o = name = start; - while (ESBYTE[o]!=' ') && (ESBYTE[o]) o++; //searching for a space after tag name - ESBYTE[o] = '\0'; - strlwr(name); -} - -int _tag::nameis(dword _in_tag_name) -{ - if (name) && (strcmp(_in_tag_name, name)==0) return true; - return false; -} - -void _tag::clear() -{ - start=name=0; -} - #define HTML_PADDING_X 8; #define HTML_PADDING_Y 5; void ParceHtml(byte draw) { +dword DOM_start, DOM_end, DOM_len, DOM_pos; int stroka_x = HTML_PADDING_X; int stroka_y = HTML_PADDING_Y; dword line_break; byte ch, zeroch; -_DOM DOM; _text text; _tag tag; -dword DOM_pos; tag.clear(); style.clear(); /* Create DOM */ debugln("creating DOM"); - DOM.len = strlen(io.buffer_data); - DOM.start = malloc(DOM.len); - DOM.end = DOM.start + DOM.len; - strlcpy(DOM.start, io.buffer_data, DOM.len); - //RemoveSpecialSymbols(DOM.start, DOM.len); - //DOM.len = strlen(DOM.start); + DOM_len = strlen(io.buffer_data); + DOM_start = malloc(DOM_len); + DOM_end = DOM_start + DOM_len; + strlcpy(DOM_start, io.buffer_data, DOM_len); /* Parce DOM */ debugln("starting DOM parce..."); - text.start = DOM.start; - for (DOM_pos=DOM.start; DOM_pos<DOM.end; DOM_pos++) + text.start = DOM_start; + for (DOM_pos=DOM_start; DOM_pos<DOM_end; DOM_pos++) { if (ESBYTE[DOM_pos]==0x0D) || (ESBYTE[DOM_pos]==0x0A) ESBYTE[DOM_pos]=' '; ch = ESBYTE[DOM_pos]; @@ -234,5 +169,5 @@ dword DOM_pos; label.size.height = list.count+5*list.item_h; label.raw_size = 0; } - free(DOM.start); + free(DOM_start); } \ No newline at end of file diff --git a/programs/cmm/aelia/tag.h b/programs/cmm/aelia/tag.h new file mode 100644 index 0000000000..b6d17a69a2 --- /dev/null +++ b/programs/cmm/aelia/tag.h @@ -0,0 +1,105 @@ +struct _tag { + dword start; + dword name; + dword param[10]; + dword value[10]; + void parce(); + int nameis(); + void clear(); +}; + +void _tag::parce() +{ + dword o = name = start; + while (ESBYTE[o]!=' ') && (ESBYTE[o]) o++; //searching for a space after tag name + ESBYTE[o] = '\0'; + strlwr(name); +} + +int _tag::nameis(dword _in_tag_name) +{ + if (name) && (strcmp(_in_tag_name, name)==0) return true; + return false; +} + +void _tag::clear() +{ + start=name=0; +} + + +/* +unsigned int GetNextParam() +{ + byte kavichki=0; + int i = strlen(#tagparam) - 1; + + if (!tagparam) return 0; + + WHILE((i > 0) && ((tagparam[i] == '"') || (tagparam[i] == ' ') || (tagparam[i] == '\'') || (tagparam[i] == '/'))) + { + IF (tagparam[i] == '"') || (tagparam[i] == '\'') kavichki=tagparam[i]; + tagparam[i] = 0x00; + i--; + } + + if (kavichki) + { + i=strrchr(#tagparam, kavichki); + strlcpy(#val, #tagparam + i, sizeof(val)); + } + else + { + WHILE((i > 0) && (tagparam[i] <>'=')) i--; //i=strrchr(#tagparam, '=')+1; + i++; + strlcpy(#val, #tagparam + i, sizeof(val)); + + WHILE (val[0] == ' ') strcpy(#val, #val+1); + } + tagparam[i] = 0x00; + + FOR ( ; ((tagparam[i] <>' ') && (i > 0); i--) + { + IF (tagparam[i] == '=') //äåðçêàÿ çàãëóøêà + tagparam[i + 1] = 0x00; + } + strlcpy(#attr, #tagparam + i + 1, sizeof(attr)); + tagparam[i] = 0x00; + strlwr(#attr); + return 1; +} +*/ + +// +// STYLE +// + +struct _style { + bool b, u, i, s; + bool h1, h2, h3, h4, h5, h6; + bool a; + bool pre; + bool ignore; + dword color; + void clear(); +} style; + +void _style::clear() +{ + b=u=i=s=0; + h1=h2=h3=h4=h5=h6=0; + a=0; + pre=0; + ignore=0; + color=0; +} + + +// +// TEXT +// + +struct _text { + dword start; + int x, y; +}; \ No newline at end of file diff --git a/programs/cmm/lib/font.h b/programs/cmm/lib/font.h index fd5289fa84..5a3cf184dc 100644 --- a/programs/cmm/lib/font.h +++ b/programs/cmm/lib/font.h @@ -224,7 +224,7 @@ inline fastcall dword b24(EAX) { return DSDWORD[EAX] & 0x00FFFFFF; } // wb if(b24(i)!=background) && (b24(i+3)==background) && (b24(i+line_w)==background) && (b24(i+3+line_w)!=background) { - dark_background = MixColors(background,b24(i),200); + dark_background = MixColors(background,b24(i),210); DSDWORD[i+3] = DSDWORD[i+3] & 0xFF000000 | dark_background; DSDWORD[i+line_w] = DSDWORD[i+line_w] & 0xFF000000 | dark_background; } @@ -232,7 +232,7 @@ inline fastcall dword b24(EAX) { return DSDWORD[EAX] & 0x00FFFFFF; } // bw else if(b24(i)==background) && (b24(i+3)!=background) && (b24(i+line_w)!=background) && (b24(i+3+line_w)==background) { - dark_background = MixColors(background,b24(i+3),200); + dark_background = MixColors(background,b24(i+3),210); DSDWORD[i] = DSDWORD[i] & 0xFF000000 | dark_background; DSDWORD[i+3+line_w] = DSDWORD[i+3+line_w] & 0xFF000000 | dark_background; } diff --git a/programs/cmm/lib/patterns/http_downloader.h b/programs/cmm/lib/patterns/http_downloader.h index 39281a9fe0..55ffdcae77 100644 --- a/programs/cmm/lib/patterns/http_downloader.h +++ b/programs/cmm/lib/patterns/http_downloader.h @@ -105,12 +105,12 @@ int check_is_the_adress_local(dword _in) _in++; if(!strncmp(_in,"rd/",3)) return true; if(!strncmp(_in,"fd/",3)) return true; - if(!strncmp(_in,"hd/",3)) return true; - if(!strncmp(_in,"bd/",3)) return true; - if(!strncmp(_in,"cd/",3)) return true; + if(!strncmp(_in,"hd",2)) return true; + if(!strncmp(_in,"bd",2)) return true; + if(!strncmp(_in,"cd",2)) return true; if(!strncmp(_in,"sys/",4)) return true; if(!strncmp(_in,"tmp/",4)) return true; - if(!strncmp(_in,"usbhd",6)) return true; + if(!strncmp(_in,"usbhd",5)) return true; if(!strncmp(_in,"kolibrios",10)) return true; return false; } diff --git a/programs/other/calc/trunk/calc.asm b/programs/other/calc/trunk/calc.asm index 327c460007..8fdccd5404 100644 --- a/programs/other/calc/trunk/calc.asm +++ b/programs/other/calc/trunk/calc.asm @@ -675,9 +675,7 @@ no_new_row: cmp edx, BTNSP_X jbe newbutton - mcall , <253, 36>, <55, 22>, 2, 0xF0969D ; 'C' - mcall , <236,53>, <DISPLAY_Y,DISPLAY_H>, 3, [sc.work] ; 'dec-bin-hex' - mov esi, [sc.work_button] + mcall , <253, 36>, <55, 22>, 2, 0xF0969D ; 'C' mov ecx, [sc.work_button_text] @@ -718,19 +716,19 @@ print_display: mcall 38, < DISPLAY_X+1, DISPLAY_W+DISPLAY_X-1>, <DISPLAY_Y+1, DISPLAY_Y+1>, 0xE0E0E0 ; internal shadow mcall , < DISPLAY_X+1, DISPLAY_X+1>, <DISPLAY_Y+2, DISPLAY_Y+DISPLAY_H-1>, ; internal shadow mcall 13, < DISPLAY_X+2, DISPLAY_W-2>, <DISPLAY_Y+2, DISPLAY_H-2>, 0xFFFfff ; background + mcall 8, <236,53>, <DISPLAY_Y,DISPLAY_H>, 3, [sc.work] ; 'dec-bin-hex' mov ecx, [sc.work_text] or ecx, 0x40000000 mcall 4, <135,6>,,calc,1,[sc.work] - - mov ebx, 250 shl 16 + DISPLAY_Y+(DISPLAY_H-14)/2 + mov edx, [display_type] shl edx, 2 add edx, display_type_text mov esi, 3 - mov edi, [sc.work] + mov ecx, [sc.work_text] or ecx, 0x10000000 - mcall + mcall 4,<250,DISPLAY_Y+(DISPLAY_H-14)/2> cmp [dsign], byte '+' je positive diff --git a/skins/Leency/Blueberries/default.asm b/skins/Leency/Blueberries/default.asm index b293f64edd..606ff8b630 100644 --- a/skins/Leency/Blueberries/default.asm +++ b/skins/Leency/Blueberries/default.asm @@ -3,12 +3,12 @@ include '..\me_skin.inc' SKIN_PARAMS \ height = bmp_center1.height,\ ; skin height margins = [6:5:43:3],\ ; margins [left:top:right:bottom] - colors active = [binner=0xEDEBEB:\ ; border inner + colors active = [binner=0xC8C8C8:\ ; border inner bouter=0x33383A:\ ; border outer - bframe=0xEDEBEB],\ ; border middle - colors inactive = [binner=0xEDEBEB:\ ; border inner + bframe=0xC8C8C8],\ ; border middle + colors inactive = [binner=0xC8C8C8:\ ; border inner bouter=0x747474:\ ; border outer - bframe=0xEDEBEB],\ ; border middle + bframe=0xC8C8C8],\ ; border middle dtp = 'default.dtp' ; dtp colors SKIN_BUTTONS \ diff --git a/skins/Leency/Blueberries/default.dtp b/skins/Leency/Blueberries/default.dtp index 15807ec6d91a337c6ee5a0b4b94fb8df3ba426c4..942b4b0e98e5c6b777954a021d1f112f917b8fc0 100644 GIT binary patch delta 25 ecmdPUm>?o@;=~Dtrq4GSjE#*MK%lO!jsXC1(Fei+ delta 25 ecmdPUm>?qZ`t@6erq4GSjE#*MK%lO!jsXC9zz8h> diff --git a/skins/Leency/Blueberries/default.dtp.asm b/skins/Leency/Blueberries/default.dtp.asm index 6264f7a655..e2cee74ecc 100644 --- a/skins/Leency/Blueberries/default.dtp.asm +++ b/skins/Leency/Blueberries/default.dtp.asm @@ -5,7 +5,7 @@ struc system_colors .work_3d_dark dd 0xAEA6A6 .work_3d_light dd 0xFBFBFB .window_title dd 0xF3F3F3 - .work dd 0xEDEBEB + .work dd 0xC8C8C8 .work_button dd 0xD9F382 .work_button_text dd 0x333333 .work_text dd 0x000000 diff --git a/skins/Leency/Blueberries/right1.bmp b/skins/Leency/Blueberries/right1.bmp index 79149df82cb1706f5f4f481744cd281a02505760..f3d738a3665e52685b823076473ed80feecd33a6 100644 GIT binary patch literal 4566 zcmdUyT})bM9EZ>Dd$VL0yWYiOc4O+$wIUQzJ`SI9_>d2apY5#KYL><7q)j_wjkqXg z7>fZLHLQkWYzdN8q7X{dMr;bv8Qa9xb!OdSx3rh*)qaOli2^lta4}CFPTu!D|M$nk zIq%^BU%v4nk=n|zFT#t9*T;B$klGW(_}k+cN^eD<esUZsDgKNg#MNhxBkWV3A5V8u zP+3m9ON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