forked from KolibriOS/kolibrios
CMM: fix list with no selection, browser fix <pre> tag, fix keys
git-svn-id: svn://kolibrios.org@5781 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
40ec306f72
commit
31fc4fdbc0
@ -38,9 +38,9 @@ byte
|
||||
t_html,
|
||||
t_body;
|
||||
|
||||
dword bufpointer;
|
||||
dword o_bufpointer;
|
||||
dword bufsize;
|
||||
dword bufpointer=0;
|
||||
dword o_bufpointer=0;
|
||||
dword bufsize=0;
|
||||
|
||||
dword text_colors[300];
|
||||
dword text_color_index;
|
||||
@ -152,8 +152,8 @@ void TWebBrowser::Prepare(){
|
||||
case 0x0a:
|
||||
if (style.pre)
|
||||
{
|
||||
chrcat(#line, ' ');
|
||||
Perenos();
|
||||
DrawStyle();
|
||||
NewLine();
|
||||
break;
|
||||
}
|
||||
case '\9':
|
||||
@ -370,7 +370,7 @@ void TWebBrowser::SetStyle() {
|
||||
if (opened)
|
||||
{
|
||||
WB1.DrawBuf.zoom=2;
|
||||
WB1.list.SetFont(8, 14, 10111001b);
|
||||
WB1.list.font_type |= 10111001b;
|
||||
if (isattr("align=")) && (isval("center")) style.align = ALIGN_CENTER;
|
||||
if (isattr("align=")) && (isval("right")) style.align = ALIGN_RIGHT;
|
||||
if (stroka>1) NewLine();
|
||||
@ -378,7 +378,7 @@ void TWebBrowser::SetStyle() {
|
||||
else
|
||||
{
|
||||
WB1.DrawBuf.zoom=1;
|
||||
WB1.list.SetFont(8, 14, 10111000b);
|
||||
WB1.list.font_type = 10111000b;
|
||||
style.align = ALIGN_LEFT;
|
||||
}
|
||||
return;
|
||||
|
@ -25,14 +25,14 @@
|
||||
char homepage[] = FROM "html\\homepage.htm";
|
||||
|
||||
#ifdef LANG_RUS
|
||||
char version[]=" ’¥ªáâ®¢ë© ¡à 㧥à 1.38";
|
||||
char version[]=" ’¥ªáâ®¢ë© ¡à 㧥à 1.39";
|
||||
?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.38";
|
||||
char version[]=" Text-based Browser 1.39";
|
||||
?define IMAGES_CACHE_CLEARED "Images cache cleared"
|
||||
?define T_LAST_SLIDE "This slide is the last"
|
||||
char loading[] = "Loading...<br>";
|
||||
@ -281,7 +281,7 @@ void Draw_Window()
|
||||
void Scan(dword id__)
|
||||
{
|
||||
action_buf=0;
|
||||
if (WB1.list.ProcessKey(key_scancode)) WB1.DrawPage();
|
||||
if (WB1.list.ProcessKey(id__)) WB1.DrawPage();
|
||||
else switch (id__)
|
||||
{
|
||||
case SCAN_CODE_BS:
|
||||
|
@ -11,7 +11,7 @@ struct llist
|
||||
{
|
||||
int x, y, w, h, line_h, text_y;
|
||||
int count, visible, first, current, column_max; //visible = row_max
|
||||
dword font_w, font_h, font_type;
|
||||
byte font_w, font_h, font_type;
|
||||
byte wheel_size;
|
||||
byte active;
|
||||
byte no_selection;
|
||||
@ -126,7 +126,14 @@ int llist::ProcessKey(dword key)
|
||||
|
||||
int llist::KeyDown()
|
||||
{
|
||||
if (current-first+1<visible) && (!no_selection)
|
||||
if (no_selection)
|
||||
{
|
||||
if (visible + first >= count) return 0;
|
||||
first++;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (current-first+1<visible)
|
||||
{
|
||||
if (current + 1 >= count) return 0;
|
||||
current++;
|
||||
@ -147,7 +154,14 @@ int llist::KeyDown()
|
||||
|
||||
int llist::KeyUp()
|
||||
{
|
||||
if (current > first) && (!no_selection)
|
||||
if (no_selection)
|
||||
{
|
||||
if (first == 0) return 0;
|
||||
first--;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (current > first)
|
||||
{
|
||||
current--;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user