panels_cfg: small fix

git-svn-id: svn://kolibrios.org@5619 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-07-29 11:47:05 +00:00
parent c872d57dde
commit 61f4ea5299
3 changed files with 40 additions and 29 deletions

View File

@ -4,7 +4,9 @@
@del panels_cfg @del panels_cfg
cls cls
c-- panels_cfg.c c-- panels_cfg.c
@pause
@echo off
@rename panels_cfg.com panels_cfg @rename panels_cfg.com panels_cfg
@kpack panels_cfg @kpack panels_cfg
@del warning.txt @del warning.txt
@pause @del lang.h--

View File

@ -4,7 +4,8 @@
@del panels_cfg @del panels_cfg
cls cls
c-- panels_cfg.c c-- panels_cfg.c
@pause
@rename panels_cfg.com panels_cfg @rename panels_cfg.com panels_cfg
@kpack panels_cfg @kpack panels_cfg
@del warning.txt @del warning.txt
@pause @del lang.h--

View File

@ -88,7 +88,8 @@ struct taskbar_cfg {
enum { enum {
TASKBAR, TASKBAR,
DOCKY DOCKY,
ALL
}; };
@ -162,16 +163,22 @@ void main()
taskbar_frame.font_color = docky_frame.font_color = sc.work_text; taskbar_frame.font_color = docky_frame.font_color = sc.work_text;
taskbar_frame.font_backgr_color = docky_frame.font_backgr_color = sc.work; taskbar_frame.font_backgr_color = docky_frame.font_backgr_color = sc.work;
taskbar_frame.ext_col = docky_frame.ext_col = sc.work_graph; taskbar_frame.ext_col = docky_frame.ext_col = sc.work_graph;
DrawWindowContent(); DrawWindowContent(ALL);
} }
} }
void DrawWindowContent() void DrawWindowContent(byte panel_type)
{ {
word win_center_x; word win_center_x;
if (panel_type==ALL)
{
frame_draw stdcall (#taskbar_frame); frame_draw stdcall (#taskbar_frame);
frame_draw stdcall (#docky_frame);
}
if (panel_type==ALL) || (panel_type==TASKBAR)
{
DefineButton(22, taskbar_frame.start_y + 12, panels_img.w-1, 27-1, 100 + BT_HIDE, 0); DefineButton(22, taskbar_frame.start_y + 12, panels_img.w-1, 27-1, 100 + BT_HIDE, 0);
_PutImage(22, taskbar_frame.start_y + 12, 37, 27, taskbar_cfg.Attachment * 37 * 27 * 3 + panels_img.data); _PutImage(22, taskbar_frame.start_y + 12, 37, 27, taskbar_cfg.Attachment * 37 * 27 * 3 + panels_img.data);
WriteText(68, taskbar_frame.start_y + 20, 0x80, sc.work_text, CHANGE_POS); WriteText(68, taskbar_frame.start_y + 20, 0x80, sc.work_text, CHANGE_POS);
@ -187,14 +194,15 @@ void DrawWindowContent()
PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 131, 120, 121, taskbar_cfg.PanelHeight, PANEL_HEIGHT); PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 131, 120, 121, taskbar_cfg.PanelHeight, PANEL_HEIGHT);
PanelCfg_MoreLessBox(win_center_x, taskbar_frame.start_y + 131, 122, 123, taskbar_cfg.SoftenHeight, SOFTEN_HEIGHT); PanelCfg_MoreLessBox(win_center_x, taskbar_frame.start_y + 131, 122, 123, taskbar_cfg.SoftenHeight, SOFTEN_HEIGHT);
PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 159, 124, 125, taskbar_cfg.ButtonOffset, BUTTON_OFFSET); PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 159, 124, 125, taskbar_cfg.ButtonOffset, BUTTON_OFFSET);
}
frame_draw stdcall (#docky_frame); if (panel_type==ALL) || (panel_type==DOCKY)
{
DefineButton(22, docky_frame.start_y + 12, panels_img.w-1, 27-1, 200 + BT_HIDE, 0); DefineButton(22, docky_frame.start_y + 12, panels_img.w-1, 27-1, 200 + BT_HIDE, 0);
_PutImage(22, docky_frame.start_y + 12, 37, 27, docky_cfg.location + 1 * 37 * 27 * 3 + panels_img.data); _PutImage(22, docky_frame.start_y + 12, 37, 27, docky_cfg.location + 1 * 37 * 27 * 3 + panels_img.data);
WriteText(68, docky_frame.start_y + 20, 0x80, sc.work_text, CHANGE_POS); WriteText(68, docky_frame.start_y + 20, 0x80, sc.work_text, CHANGE_POS);
PanelCfg_CheckBox(22, docky_frame.start_y + 48, 201, FSIZE, docky_cfg.fsize); PanelCfg_CheckBox(22, docky_frame.start_y + 48, 201, FSIZE, docky_cfg.fsize);
PanelCfg_CheckBox(win_center_x, docky_frame.start_y + 48, 202, ASHOW, docky_cfg.ashow); PanelCfg_CheckBox(win_center_x, docky_frame.start_y + 48, 202, ASHOW, docky_cfg.ashow);
}
} }
void LoadCfg() void LoadCfg()