mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-24 17:59:38 +03:00
WebView 1.2: bigger fonts by default
git-svn-id: svn://kolibrios.org@5712 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5c8f8dc889
commit
9516fbc07d
@ -76,7 +76,7 @@ void TWebBrowser::DrawPage()
|
||||
{
|
||||
start_x = stolbec * list.font_w + magrin_left * DrawBuf.zoom + list.x;
|
||||
start_y = stroka * list.line_h + magrin_left + list.y;
|
||||
stolbec_len = strlen(#line);
|
||||
stolbec_len = utf8_strlen(#line);
|
||||
line_length = stolbec_len * list.font_w * DrawBuf.zoom;
|
||||
|
||||
WriteBufText(start_x, 0, list.font_type, text_colors[text_color_index], #line, buf_data);
|
||||
@ -214,7 +214,7 @@ void TWebBrowser::Parse(){
|
||||
if (tag[strlen(#tag)-1]=='/') tag[strlen(#tag)-1]=NULL; //for br/
|
||||
if (tagparam) GetNextParam();
|
||||
|
||||
if (stolbec + strlen(#line) > list.column_max) Perenos();
|
||||
if (stolbec + utf8_strlen(#line) > list.column_max) Perenos();
|
||||
DrawPage();
|
||||
line = NULL;
|
||||
if (tag) SetTextStyle(WB1.DrawBuf.zoom * 5 + list.x, stroka * list.line_h + list.y + 5); //îáðàáîòêà òåãîâ
|
||||
@ -223,7 +223,7 @@ void TWebBrowser::Parse(){
|
||||
default:
|
||||
DEFAULT_MARK:
|
||||
if (bukva<=15) bukva=' ';
|
||||
line_len = strlen(#line);
|
||||
line_len = utf8_strlen(#line);
|
||||
if (!pre_text) && (bukva == ' ')
|
||||
{
|
||||
if (line[line_len-1]==' ') break; //no double spaces
|
||||
@ -252,7 +252,7 @@ void TWebBrowser::Perenos()
|
||||
int perenos_num;
|
||||
char new_line_text[4096];
|
||||
perenos_num = strrchr(#line, ' ');
|
||||
if (!perenos_num) && (strlen(#line)>list.column_max) perenos_num=list.column_max;
|
||||
if (!perenos_num) && (utf8_strlen(#line)>list.column_max) perenos_num=list.column_max;
|
||||
strcpy(#new_line_text, #line + perenos_num);
|
||||
line[perenos_num] = 0x00;
|
||||
if (stroka-1 > list.visible) && (list.first <>0) end_parsing=true;
|
||||
@ -585,7 +585,7 @@ void BufEncode(int set_new_encoding)
|
||||
{
|
||||
strcpy(bufpointer, o_bufpointer);
|
||||
}
|
||||
bufpointer = ChangeCharset(charsets[set_new_encoding], "CP866", bufpointer);
|
||||
//bufpointer = ChangeCharset(charsets[set_new_encoding], "CP866", bufpointer);
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,14 +30,14 @@
|
||||
char homepage[] = FROM "html\\homepage.htm";
|
||||
|
||||
#ifdef LANG_RUS
|
||||
char version[]=" ’¥ªáâ®¢ë© ¡à 㧥à 1.16";
|
||||
char version[]=" ’¥ªáâ®¢ë© ¡à 㧥à 1.2";
|
||||
?define IMAGES_CACHE_CLEARED "Šíè ª à⨮ª ®ç¨é¥"
|
||||
?define T_LAST_SLIDE "<EFBFBD>â® ¯®á«¥¤¨© á« ©¤"
|
||||
char loading[] = "‡ £à㧪 áâà ¨æë...<br>";
|
||||
char page_not_found[] = FROM "html\page_not_found_ru.htm";
|
||||
char accept_language[]= "Accept-Language: ru\n";
|
||||
#else
|
||||
char version[]=" Text-based Browser 1.16";
|
||||
char version[]=" Text-based Browser 1.2";
|
||||
?define IMAGES_CACHE_CLEARED "Images cache cleared"
|
||||
?define T_LAST_SLIDE "This slide is the last"
|
||||
char loading[] = "Loading...<br>";
|
||||
@ -133,7 +133,7 @@ void main()
|
||||
SetSkinColors();
|
||||
|
||||
WB1.DrawBuf.zoom = 1;
|
||||
WB1.list.SetFont(6, 9, 10001000b);
|
||||
WB1.list.SetFont(8, 14, 10111000b);
|
||||
Form.width=WIN_W;
|
||||
Form.height=WIN_H;
|
||||
SetElementSizes();
|
||||
@ -383,12 +383,12 @@ void Scan(dword id__)
|
||||
if (WB1.DrawBuf.zoom==2)
|
||||
{
|
||||
WB1.DrawBuf.zoom=1;
|
||||
WB1.list.SetFont(6, 9, 10001000b);
|
||||
WB1.list.SetFont(8, 14, 10111000b);
|
||||
}
|
||||
else
|
||||
{
|
||||
WB1.DrawBuf.zoom=2;
|
||||
WB1.list.SetFont(6, 9, 10001001b);
|
||||
WB1.list.SetFont(8, 14, 10111001b);
|
||||
}
|
||||
Draw_Window();
|
||||
return;
|
||||
|
@ -2,26 +2,26 @@
|
||||
<head>
|
||||
<meta>
|
||||
<meta http-equiv="content-type" content="text/html; charset=cp-866" />
|
||||
<title>‘âà ¨æ ¥ ©¤¥ </title>
|
||||
<title>Страница не найдена</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1> ‚¥¡-áâà ¨æ ¥¤®áâ㯠</h1>
|
||||
<h2> —â® ¬®¦® ᤥ« âì:</h2>
|
||||
<h1> Веб-страница недоступна</h1>
|
||||
<h2> Что можно сделать:</h2>
|
||||
<ul>
|
||||
<li>
|
||||
“¡¥¤¨â¥áì, çâ® ¥áâì ¯®¤ª«î票¥ ª á¥â¨ ˆâ¥à¥â.<br>
|
||||
Žâªà®©â¥ <a href="/sys/network/netcfg">Netcfg</a> ¤«ï ¤¨ £®á⨪¨ á¥â¨.<br>
|
||||
Убедитесь, что есть подключение к сети Интернет.<br>
|
||||
Откройте <a href="/sys/network/netcfg">Netcfg</a> для диагностики сети.<br>
|
||||
</li>
|
||||
<li>
|
||||
<EFBFBD>஢¥àì⥠¤à¥áá áâà ¨æë, ¢®§¬®¦®, ¡ë« ᤥ« ®¯¥ç ⪠.<br>
|
||||
Проверьте адресс страницы, возможно, была сделана опечатка.<br>
|
||||
</li>
|
||||
<li>
|
||||
‘¥à¢¥à ¢à¥¬¥® ¥¤®áâ㯥. <br>
|
||||
Ž¡®¢¨â¥ áâà ¨æã.<br>
|
||||
Сервер временно недоступен. <br>
|
||||
Обновите страницу.<br>
|
||||
</li>
|
||||
<li>
|
||||
’¥ªáâ®¢ë© ¡à ã§¥à ¥ ¯à ¢¨«ì® ®¡à ¡®â « ®â¢¥â á¥à¢¥à .<br>
|
||||
‘®®¡é¨â¥ ®¡ ®è¨¡ª¥.<br>
|
||||
Текстовый браузер не правильно обработал ответ сервера.<br>
|
||||
Сообщите об ошибке.<br>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
|
@ -916,6 +916,27 @@ inline void debugi(dword d_int)
|
||||
}
|
||||
|
||||
|
||||
inline fastcall unsigned int utf8_strlen( ESI)
|
||||
{
|
||||
$xor ecx, ecx
|
||||
_loop:
|
||||
$lodsb
|
||||
$test al, al
|
||||
$jz _done
|
||||
$test al, 0x80
|
||||
$jz _1
|
||||
$and al, 0xc0
|
||||
$cmp al, 0x80
|
||||
$jz _loop
|
||||
_1:
|
||||
$inc ecx
|
||||
$jmp _loop
|
||||
|
||||
_done:
|
||||
return ECX;
|
||||
}
|
||||
|
||||
|
||||
#define strnmov strmovn
|
||||
#define stricmp strcmpi
|
||||
#define strcmpn strncmp
|
||||
|
Loading…
Reference in New Issue
Block a user