APM: slightly update UI and add it to IMG
ICONS32.PNG: new mouse and APM icons, update SYSMON icons KFONT viewer: add colored mode, on by default git-svn-id: svn://kolibrios.org@7647 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
8a0107ea33
commit
5486248fed
@ -333,6 +333,7 @@ tup.append_table(img_files, {
|
||||
{"@SS", PROGS .. "/system/ss/trunk/@ss"},
|
||||
{"@VOLUME", PROGS .. "/media/volume/volume"},
|
||||
{"HACONFIG", PROGS .. "/other/ha/HACONFIG"},
|
||||
{"APM", PROGS .. "/system/apm/apm"},
|
||||
{"ASCIIVJU", PROGS .. "/develop/asciivju/trunk/asciivju"},
|
||||
{"CALC", PROGS .. "/other/calc/trunk/calc"},
|
||||
{"CALENDAR", PROGS .. "/system/calendar/trunk/calendar"},
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 40 KiB |
@ -1,8 +1,8 @@
|
||||
[Config]
|
||||
window_width=600
|
||||
title=KolibriOS System Panel
|
||||
win_width=670
|
||||
cell_w=82
|
||||
cell_h=78
|
||||
window_title=KolibriOS System Panel
|
||||
|
||||
[Configuration]
|
||||
RamDisks=tmpdisk,36
|
||||
@ -19,6 +19,7 @@ Mouse=mousecfg,54
|
||||
DriverInstall=/k/drivers/DRVINST.KEX,38
|
||||
Autorun=tinypad|/sys/settings/autorun.dat,55
|
||||
HotAngles=HACONFIG,105
|
||||
APM=apm,76
|
||||
|
||||
[Monitoring]
|
||||
Debug Board=develop/board,19
|
||||
|
@ -52,6 +52,7 @@ enum {
|
||||
|
||||
struct Eolite_colors
|
||||
{
|
||||
bool def;
|
||||
dword lpanel;
|
||||
dword list_vert_line; //vertical line between columns in list
|
||||
dword selec;
|
||||
@ -588,7 +589,7 @@ void draw_window()
|
||||
//main rectangles
|
||||
DrawRectangle(1,40,Form.cwidth-3,Form.cheight - 42-status_bar_h,col.graph);
|
||||
DrawRectangle(0,39,Form.cwidth-1,-show_status_bar.checked*status_bar_h + Form.cheight - 40,col.work_gradient[4]); //bg
|
||||
for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col.work_gradient[11-i]);
|
||||
for (i=0; i<5; i++) DrawBar(0, 34+i, Form.cwidth, 1, col.work_gradient[-i*3+15]);
|
||||
llist_copy(#files_active, #files);
|
||||
strcpy(#active_path, #path);
|
||||
DrawStatusBar();
|
||||
|
@ -67,7 +67,7 @@ void DrawFilledBar(dword x, y, w, h)
|
||||
{
|
||||
int i, fill_h;
|
||||
if (h < 12) {
|
||||
for (i=0; i<h; i++) DrawBar(x, y+i, w, 1, col.work_gradient[12-i]);
|
||||
for (i=0; i<h; i++) DrawBar(x, y+i, w, 1, col.work_gradient[-i*3+15]);
|
||||
} else {
|
||||
DrawBar(x, y, w, h, col.work_gradient[12]);
|
||||
}
|
||||
|
@ -209,12 +209,18 @@ void DrawFilledBarInner(dword x, y, w, h)
|
||||
|
||||
void Tip(int y, dword caption, id, arrow)
|
||||
{
|
||||
DrawBar(17,y,160,1,0xEFEDEE);
|
||||
DrawFilledBarInner(17, y+1, 160, 16);
|
||||
WriteText(25,y+5,0x80,0x000000,caption);
|
||||
if (col.def) {
|
||||
DrawBar(17,y,160,1,0xEFEDEE);
|
||||
DrawFilledBarInner(17, y+1, 160, 16);
|
||||
DrawBar(17,y+17,160,1,0x7E87A3);
|
||||
} else {
|
||||
DrawBar(17,y,160,1,col.graph);
|
||||
DrawBar(17,y+1,160,16,col.list_bg);
|
||||
DrawBar(17,y+17,160,1,col.graph);
|
||||
}
|
||||
WriteText(25,y+5,0x80,col.list_gb_text,caption);
|
||||
if (id) DefineButton(159,y+1,16,16,id+BT_HIDE+BT_NOFRAME,0); //arrow button
|
||||
WriteText(165,y+5,0x80,0x000000,arrow); //arrow
|
||||
DrawBar(17,y+17,160,1,0x7E87A3);
|
||||
WriteText(165,y+5,0x80,col.list_gb_text,arrow); //arrow
|
||||
}
|
||||
|
||||
void ActionsDraw()
|
||||
@ -244,7 +250,7 @@ void DrawLeftPanelBg()
|
||||
DrawBar(2,56,15,actions_y+103,col.lpanel); //ñèíèé ïðÿìîóãîëüíèê - ñëåâà
|
||||
DrawBar(177,56,15,actions_y+103,col.lpanel); //ñèíèé ïðÿìîóãîëüíèê - ñïðàâà
|
||||
area_h = Form.cheight-start_y-2 - status_bar_h;
|
||||
if (col.lpanel == 0x00699C)
|
||||
if (col.def)
|
||||
{
|
||||
if (area_h < 268){
|
||||
PutPaletteImage(#blue_hl, 190, area_h, 2, start_y, 8, #blue_hl_pal);
|
||||
|
@ -233,6 +233,7 @@ void SetAppColors()
|
||||
if (GrayScaleImage(#bg_col,1,1)>=65)
|
||||
{
|
||||
//use light colors
|
||||
col.def = true;
|
||||
col.list_bg = 0xFFFfff;
|
||||
col.list_gb_text = 0x000000;
|
||||
col.list_text_hidden = 0xA6A6B7;
|
||||
@ -249,6 +250,7 @@ void SetAppColors()
|
||||
else
|
||||
{
|
||||
//use dark colors
|
||||
col.def = false;
|
||||
col.list_bg = system.color.work;
|
||||
col.list_gb_text = system.color.work_text;
|
||||
col.list_text_hidden = 0xA6A6B7;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#define TITLE "Eolite File Manager 4.21b"
|
||||
#define ABOUT_TITLE "EOLITE 4.21b"
|
||||
#define TITLE "Eolite File Manager 4.21c"
|
||||
#define ABOUT_TITLE "EOLITE 4.21c"
|
||||
|
||||
#ifdef LANG_RUS
|
||||
?define T_FILE "” ©«"
|
||||
|
@ -17,6 +17,7 @@ _tabs tabs = { PHRASE_TAB };
|
||||
block preview = { 0, PANELH, WIN_W, WIN_H - PANELH };
|
||||
checkbox bold = { "Bold", false };
|
||||
checkbox smooth = { "Smooth", true };
|
||||
checkbox colored = { "Colored", true };
|
||||
|
||||
void main()
|
||||
{
|
||||
@ -31,8 +32,9 @@ void main()
|
||||
case evButton:
|
||||
btn = GetButtonID();
|
||||
if (btn==1) ExitProcess();
|
||||
if (bold.click(btn)) kfont.bold = bold.checked;
|
||||
if (smooth.click(btn)) kfont.smooth = smooth.checked;
|
||||
bold.click(btn);
|
||||
smooth.click(btn);
|
||||
colored.click(btn);
|
||||
if (btn==PHRASE_TAB) || (btn==CHARS_TAB) tabs.click(btn);
|
||||
goto _DRAW_WINDOW_CONTENT;
|
||||
case evReDraw:
|
||||
@ -42,10 +44,14 @@ void main()
|
||||
if (Form.status_window>2) break;
|
||||
_DRAW_WINDOW_CONTENT:
|
||||
|
||||
kfont.bold = bold.checked;
|
||||
kfont.smooth = smooth.checked;
|
||||
|
||||
DrawBar(0, 0, Form.cwidth, PANELH-1, system.color.work);
|
||||
DrawBar(0, PANELH-1,Form.cwidth,1,system.color.work_graph);
|
||||
bold.draw(10, 8);
|
||||
smooth.draw(83,8);
|
||||
colored.draw(170,8);
|
||||
|
||||
tabs.draw_button(Form.cwidth-130, PHRASE_TAB, "Phrase");
|
||||
tabs.draw_button(Form.cwidth-60, CHARS_TAB, "Chars");
|
||||
@ -61,15 +67,21 @@ void main()
|
||||
}
|
||||
}
|
||||
|
||||
dword pal[] = { 0x4E4153, 0x57417C, 0x89633B, 0x819156, 0x00CCCC, 0x2AD266,
|
||||
0xE000CC, 0x0498F9, 0xC3A9F5, 0xFFC200, 0xFF5836, 0xA086BA,
|
||||
0,0,0,0,0 };
|
||||
|
||||
void DrawPreviewPhrase()
|
||||
{
|
||||
dword i, y;
|
||||
dword c;
|
||||
char line[256];
|
||||
kfont.raw_size = free(kfont.raw);
|
||||
for (i=10, y=5; i<22; i++, y+=kfont.height;) //not flexible, need to calculate font count and max line length
|
||||
for (i=10, y=12; i<22; i++, y+=kfont.height+3;) //not flexible, need to calculate font count and max line length
|
||||
{
|
||||
if (colored.checked) c = pal[i-10]; else c=0;
|
||||
sprintf(#line,"<EFBFBD> §¬¥à èà¨äâ /size font %d ¯¨ªá¥«¥©.",i);
|
||||
kfont.WriteIntoBuffer(10,y,Form.cwidth,Form.cheight-PANELH, 0xFFFFFF, 0, i, #line);
|
||||
kfont.WriteIntoBuffer(14,y,Form.cwidth,Form.cheight-PANELH, 0xFFFFFF, c, i, #line);
|
||||
}
|
||||
if (kfont.smooth) kfont.ApplySmooth();
|
||||
kfont.ShowBuffer(preview.x, preview.y);
|
||||
|
@ -69,7 +69,7 @@
|
||||
dword ty = h/2-7+y;
|
||||
|
||||
if (id>0) DefineButton(x,y,w,h,id,color_b);
|
||||
WriteText(tx+1,ty+1,0x90,MixColors(color_b,0,230),text);
|
||||
WriteText(tx+1,ty+1,0x90,LightenDarkenColor(color_b, -40),text);
|
||||
WriteText(tx,ty,0x90,color_t,text);
|
||||
}
|
||||
|
||||
@ -84,21 +84,29 @@
|
||||
int ty = y + padding_v+1;
|
||||
int tw = strlen(text)*8;
|
||||
int w = tw + padding_h + padding_h;
|
||||
unsigned darker_color = LightenDarkenColor(system.color.work_button, -40);
|
||||
|
||||
|
||||
if (id>0) DefineButton(x,y,w,h,id,system.color.work_button);
|
||||
|
||||
WriteText(tx+1,ty+1,0x90,MixColors(system.color.work_button,0,230),text);
|
||||
WriteText(tx+1,ty+1,0x90,darker_color,text);
|
||||
WriteText(tx,ty,0x90,system.color.work_button_text,text);
|
||||
|
||||
if (active_button_id==id) {
|
||||
DrawBar(tx,ty+15,tw,1, MixColors(system.color.work_button,0,230));
|
||||
DrawBar(tx,ty+15,tw,1, darker_color);
|
||||
DrawBar(tx,ty+14,tw,1, system.color.work_button_text);
|
||||
}
|
||||
|
||||
return w + right_margin;
|
||||
}
|
||||
|
||||
:unsigned LightenDarkenColor(dword color, amt) {
|
||||
dword r = color >> 16 + amt << 16;
|
||||
dword b = color >> 8 & 0x00FF + amt << 8;
|
||||
dword g = color & 0x0000FF + amt;
|
||||
return g | b | r ;
|
||||
}
|
||||
|
||||
:void ActiveButtonSwitch(int min, max)
|
||||
{
|
||||
active_button_id++;
|
||||
|
@ -77,21 +77,16 @@ inline fastcall dword calc(EAX) { return EAX; }
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
:dword wait_event_code;
|
||||
inline fastcall dword WaitEvent()
|
||||
{
|
||||
$mov eax,10
|
||||
$int 0x40
|
||||
wait_event_code = EAX;
|
||||
//if(wait_event_code==evMouse) MOUSE.get();
|
||||
//return wait_event_code;
|
||||
}
|
||||
|
||||
inline fastcall dword CheckEvent()
|
||||
{
|
||||
$mov eax,11
|
||||
$int 0x40
|
||||
wait_event_code = EAX;
|
||||
}
|
||||
|
||||
:dword WaitEventTimeout(dword time)
|
||||
@ -99,7 +94,6 @@ inline fastcall dword CheckEvent()
|
||||
EAX = 23;
|
||||
EBX = time;
|
||||
$int 0x40
|
||||
wait_event_code = EAX;
|
||||
}
|
||||
|
||||
inline fastcall dword SetEventMask(EBX)
|
||||
|
@ -46,8 +46,8 @@ block ipos[128];
|
||||
|
||||
void load_config()
|
||||
{
|
||||
ini_get_str stdcall (#settings_ini_path, "Config", "window_title", #window_title, sizeof(window_title), "Software widget");
|
||||
ini_get_int stdcall (#settings_ini_path, "Config", "window_width", 690);
|
||||
ini_get_str stdcall (#settings_ini_path, "Config", "title", #window_title, sizeof(window_title), "Software widget");
|
||||
ini_get_int stdcall (#settings_ini_path, "Config", "win_width", 690);
|
||||
window_width = EAX;
|
||||
ini_get_int stdcall (#settings_ini_path, "Config", "cell_w", 73);
|
||||
list.item_w = EAX;
|
||||
|
@ -43,27 +43,27 @@ redraw:
|
||||
mcall 49,0x0000,0x0001,0x5308
|
||||
@@:
|
||||
mcall 12,1
|
||||
mcall 0,100*65536+235,100*65536+90,0x34ffffff,0x000000,title
|
||||
mcall 0,100*65536+320,120*65536+120,0x34ffffff,0x000000,title
|
||||
mcall 49,0x0000,,0x5300
|
||||
jnc @f
|
||||
mcall 4,10*65536+3,0x80000000,text.4
|
||||
mcall 4,10*65536+12,0x90CE362B,ver.4
|
||||
bts [flags], 1
|
||||
jmp .end
|
||||
@@:
|
||||
cmp al, 0
|
||||
jne @f
|
||||
mov edx, text.1
|
||||
mov edx, ver.1
|
||||
jmp .0
|
||||
@@:
|
||||
cmp al, 1
|
||||
jne @f
|
||||
mov edx, text.2
|
||||
mov edx, ver.2
|
||||
jmp .0
|
||||
@@:
|
||||
mov edx, text.3
|
||||
mov edx, ver.3
|
||||
.0:
|
||||
push edx
|
||||
mcall 4,169*65536+3,0x80dddddd,text.0
|
||||
mcall 4,237*65536+3,0x80AAAaaa,ver.0
|
||||
pop edx
|
||||
add ebx, 47*65536
|
||||
mcall
|
||||
@ -119,49 +119,49 @@ redraw:
|
||||
mov edx, text.04
|
||||
.2:
|
||||
push edx
|
||||
mcall 4,10*65536+20,0x80000000,text.10
|
||||
mcall 4,10*65536+22,0x80000000,text.10
|
||||
pop edx
|
||||
mcall ,100*65536+20,
|
||||
mcall ,100*65536+22,
|
||||
|
||||
;battery life, percentage and minutes/seconds
|
||||
mcall ,10*65536+30,,text.20
|
||||
mcall ,10*65536+34,,text.20
|
||||
pop cx
|
||||
cmp cl, 0xff
|
||||
jne @f
|
||||
mcall ,100*65536+30,0x80000000,text.04
|
||||
mcall ,100*65536+34,0x80000000,text.04
|
||||
pop eax
|
||||
jmp .end
|
||||
@@:
|
||||
shl ecx, 24
|
||||
shr ecx, 24
|
||||
mcall 47,0x80030000,,100*65536+30,0x347636
|
||||
mcall 47,0x80030000,,100*65536+34,0x347636
|
||||
.3:
|
||||
mcall 4,115*65536+30,0x80000000,text.15
|
||||
mcall 4,115*65536+34,0x80000000,text.15
|
||||
mov dx, [esp]
|
||||
shl edx, 17
|
||||
shr edx, 17
|
||||
mov ecx, edx
|
||||
mcall 47,0x80030000,,140*65536+30
|
||||
mcall 47,0x80030000,,140*65536+34
|
||||
pop cx
|
||||
mov edx, text.21
|
||||
bt cx, 15
|
||||
jc @f
|
||||
mov edx, text.22
|
||||
@@:
|
||||
mcall 4,160*65536+30,0x80000000
|
||||
mcall 4,160*65536+34,0x80000000
|
||||
pop si
|
||||
.error:
|
||||
.end:
|
||||
;buttons
|
||||
mcall 8,148*65536+16,45*65536+15,3,0x00677ab0
|
||||
mcall ,166*65536+16,,4,
|
||||
mcall ,184*65536+16,,5,
|
||||
mcall ,202*65536+16,,6,
|
||||
mcall 8,195*65536+21,56*65536+20,3,0x00BBD5E6
|
||||
mcall ,219*65536+21,,4,
|
||||
mcall ,243*65536+21,,5,
|
||||
mcall ,267*65536+21,,6,
|
||||
bt [flags], 1
|
||||
jc @f
|
||||
mcall ,65*65536+45,,2,
|
||||
mcall ,86*65536+56,,2,
|
||||
@@:
|
||||
mcall 4,10*65536+50,0x80564242,text.30
|
||||
mcall 4,10*65536+60,0x90564242,text.30
|
||||
mcall 12,2
|
||||
|
||||
still:
|
||||
@ -297,54 +297,35 @@ free_ports:
|
||||
ret
|
||||
|
||||
|
||||
; ДАННЫЕ ПРОГРАММЫ
|
||||
title db '',0
|
||||
; DATA SECTION
|
||||
title db 'Advanced Power Management',0
|
||||
flags dw 0
|
||||
|
||||
ver:
|
||||
.0: db 'APM v.1.',0
|
||||
.1: db '0',0
|
||||
.2: db '1',0
|
||||
.3: db '2',0
|
||||
.4: db 'APM is not supported',0
|
||||
|
||||
text:
|
||||
.0:
|
||||
db 'APM v.1.',0
|
||||
.1:
|
||||
db '0',0
|
||||
.2:
|
||||
db '1',0
|
||||
.3:
|
||||
db '2',0
|
||||
.4:
|
||||
db 'APM not supported',0
|
||||
.00: db 'power status:',0
|
||||
.01: db 'off-line',0
|
||||
.02: db 'on-line',0
|
||||
.03: db 'on backup power',0
|
||||
.04: db 'unknown',0
|
||||
|
||||
.00:
|
||||
db 'power status:',0
|
||||
.01:
|
||||
db 'off-line',0
|
||||
.02:
|
||||
db 'on-line',0
|
||||
.03:
|
||||
db 'on backup power',0
|
||||
.04:
|
||||
db 'unknown',0
|
||||
.10: db 'battery flag:',0
|
||||
.11: db 'high',0
|
||||
.12: db 'low',0
|
||||
.13: db 'critical',0
|
||||
.14: db 'charging',0
|
||||
.15: db ' % ,',0
|
||||
|
||||
.10:
|
||||
db 'battery flag:',0
|
||||
.11:
|
||||
db 'high',0
|
||||
.12:
|
||||
db 'low',0
|
||||
.13:
|
||||
db 'critical',0
|
||||
.14:
|
||||
db 'charging',0
|
||||
.15:
|
||||
db ' % ,',0
|
||||
.20: db 'battery life:',0
|
||||
.21: db 'min',0
|
||||
.22: db 'sec',0
|
||||
|
||||
.20:
|
||||
db 'battery life:',0
|
||||
.21:
|
||||
db 'min',0
|
||||
.22:
|
||||
db 'sec',0
|
||||
|
||||
.30:
|
||||
db 'STAND-BY: SYSTEM HDD: 0 1 2 3',0
|
||||
.30: db 'STAND-BY: SYSTEM HDD: 0 1 2 3',0
|
||||
|
||||
I_END:
|
||||
|
2
programs/system/apm/build.bat
Normal file
2
programs/system/apm/build.bat
Normal file
@ -0,0 +1,2 @@
|
||||
@fasm apm.asm apm
|
||||
@pause
|
Loading…
Reference in New Issue
Block a user