TextReader: bug fixed, toolbar updated and decreased size, increased size between lines

git-svn-id: svn://kolibrios.org@6753 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2016-11-23 23:47:37 +00:00
parent 56c4b176a8
commit 9a77b80fd0
4 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
void DrawToolbarButton(char image_id, int x)
{
DefineButton(x, 5, TOOLBAR_ICON_WIDTH-1, TOOLBAR_ICON_HEIGHT-1, 10+image_id + BT_HIDE, 0);
img_draw stdcall(skin.image, x, 5, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, 0, image_id*TOOLBAR_ICON_HEIGHT);
DefineButton(x+1, 7, TOOLBAR_ICON_WIDTH-2, TOOLBAR_ICON_HEIGHT-2, 10+image_id + BT_HIDE, 0);
img_draw stdcall(skin.image, x, 6, TOOLBAR_ICON_WIDTH, TOOLBAR_ICON_HEIGHT, 0, image_id*TOOLBAR_ICON_HEIGHT);
}

View File

@ -44,7 +44,7 @@ dword line_start=io.buffer_data;
}
}
}
if (mode==COUNT_BUF_HEIGHT) list.count++;
if (mode==COUNT_BUF_HEIGHT) list.count+=2;
if (mode==DRAW_BUF) label.write_buf(8,stroka_y,list.w,label.size.height, 0xFFFFFF, 0, label.size.pt, line_start);
}
@ -61,7 +61,7 @@ void PreparePage()
Parcer(COUNT_BUF_HEIGHT);
//draw text in buffer
list.SetSizes(0, TOOLBAR_H, list.w, Form.cheight-TOOLBAR_H, label.size.pt+1);
list.SetSizes(0, TOOLBAR_H, list.w, Form.cheight-TOOLBAR_H, label.size.pt+3);
if (list.count < list.visible) list.count = list.visible;
label.size.height = list.count+1*list.item_h;
label.raw_size = 0;

View File

@ -19,7 +19,7 @@
#define DEFAULT_EDITOR "/sys/tinypad"
#define INTRO_TEXT "This is a plain Text Reader.\nTry to open some text file."
#define VERSION "Text Reader v1.1"
#define VERSION "Text Reader v1.2"
#define ABOUT "Idea: Leency, punk_joker
Code: Leency, Veliant, KolibriOS Team
@ -96,6 +96,7 @@ void main()
encoding = menu.list.cur_y - 10;
OpenFile(#param);
PreparePage();
menu.list.cur_y = NULL;
};
draw_window();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 B

After

Width:  |  Height:  |  Size: 566 B