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,39 +163,46 @@ 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;
frame_draw stdcall (#taskbar_frame); if (panel_type==ALL)
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); frame_draw stdcall (#taskbar_frame);
WriteText(68, taskbar_frame.start_y + 20, 0x80, sc.work_text, CHANGE_POS); frame_draw stdcall (#docky_frame);
PanelCfg_CheckBox(22, taskbar_frame.start_y + 48, 105, SOFTEN_UP, taskbar_cfg.SoftenUp); }
PanelCfg_CheckBox(22, taskbar_frame.start_y + 68, 106, SOFTEN_DOWN, taskbar_cfg.SoftenDown); if (panel_type==ALL) || (panel_type==TASKBAR)
PanelCfg_CheckBox(22, taskbar_frame.start_y + 88, 107, MIN_LEFT_BUTTON, taskbar_cfg.MinLeftButton); {
PanelCfg_CheckBox(22, taskbar_frame.start_y + 108, 108, MIN_RIGHT_BUTTON, taskbar_cfg.MinRightButton); DefineButton(22, taskbar_frame.start_y + 12, panels_img.w-1, 27-1, 100 + BT_HIDE, 0);
win_center_x = Form.cwidth / 2; _PutImage(22, taskbar_frame.start_y + 12, 37, 27, taskbar_cfg.Attachment * 37 * 27 * 3 + panels_img.data);
PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 48, 111, CLOCK, taskbar_cfg.Clock); WriteText(68, taskbar_frame.start_y + 20, 0x80, sc.work_text, CHANGE_POS);
PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 68, 112, CPU_USAGE, taskbar_cfg.CpuUsage); PanelCfg_CheckBox(22, taskbar_frame.start_y + 48, 105, SOFTEN_UP, taskbar_cfg.SoftenUp);
PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 88, 113, CHANGE_LANG, taskbar_cfg.ChangeLang); PanelCfg_CheckBox(22, taskbar_frame.start_y + 68, 106, SOFTEN_DOWN, taskbar_cfg.SoftenDown);
PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 108, 114, MENU_BUTTON, taskbar_cfg.MenuButton); PanelCfg_CheckBox(22, taskbar_frame.start_y + 88, 107, MIN_LEFT_BUTTON, taskbar_cfg.MinLeftButton);
PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 131, 120, 121, taskbar_cfg.PanelHeight, PANEL_HEIGHT); PanelCfg_CheckBox(22, taskbar_frame.start_y + 108, 108, MIN_RIGHT_BUTTON, taskbar_cfg.MinRightButton);
PanelCfg_MoreLessBox(win_center_x, taskbar_frame.start_y + 131, 122, 123, taskbar_cfg.SoftenHeight, SOFTEN_HEIGHT); win_center_x = Form.cwidth / 2;
PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 159, 124, 125, taskbar_cfg.ButtonOffset, BUTTON_OFFSET); PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 48, 111, CLOCK, taskbar_cfg.Clock);
PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 68, 112, CPU_USAGE, taskbar_cfg.CpuUsage);
frame_draw stdcall (#docky_frame); PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 88, 113, CHANGE_LANG, taskbar_cfg.ChangeLang);
DefineButton(22, docky_frame.start_y + 12, panels_img.w-1, 27-1, 200 + BT_HIDE, 0); PanelCfg_CheckBox(win_center_x, taskbar_frame.start_y + 108, 114, MENU_BUTTON, taskbar_cfg.MenuButton);
_PutImage(22, docky_frame.start_y + 12, 37, 27, docky_cfg.location + 1 * 37 * 27 * 3 + panels_img.data); PanelCfg_MoreLessBox(22, taskbar_frame.start_y + 131, 120, 121, taskbar_cfg.PanelHeight, PANEL_HEIGHT);
WriteText(68, docky_frame.start_y + 20, 0x80, sc.work_text, CHANGE_POS); 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_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); if (panel_type==ALL) || (panel_type==DOCKY)
{
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);
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(win_center_x, docky_frame.start_y + 48, 202, ASHOW, docky_cfg.ashow);
}
} }
void LoadCfg() void LoadCfg()