diff --git a/programs/cmm/textreader/gui.h b/programs/cmm/textreader/gui.h index 5d81fb3c7f..6682fa92da 100644 --- a/programs/cmm/textreader/gui.h +++ b/programs/cmm/textreader/gui.h @@ -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); } diff --git a/programs/cmm/textreader/prepare_page.h b/programs/cmm/textreader/prepare_page.h index 196a0427c6..f0ebbbe14e 100644 --- a/programs/cmm/textreader/prepare_page.h +++ b/programs/cmm/textreader/prepare_page.h @@ -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; diff --git a/programs/cmm/textreader/textreader.c b/programs/cmm/textreader/textreader.c index 3262bd424c..73c99727b8 100644 --- a/programs/cmm/textreader/textreader.c +++ b/programs/cmm/textreader/textreader.c @@ -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(); } diff --git a/programs/cmm/textreader/toolbar.png b/programs/cmm/textreader/toolbar.png index d442e641c0..bd3bc923fb 100644 Binary files a/programs/cmm/textreader/toolbar.png and b/programs/cmm/textreader/toolbar.png differ