forked from KolibriOS/kolibrios
cmm cmm and icons update 2
git-svn-id: svn://kolibrios.org@8822 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6be43d6e52
commit
144afc6aff
BIN
data/common/KolibriNext/icons16.PNG
Normal file
BIN
data/common/KolibriNext/icons16.PNG
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -1 +1 @@
|
||||
[rbmenu]
„¨á¯¥âç¥à ¯à®æ¥áᮢ=/sys/cpu
;<3B> áâனª á⨫ï=/kolibrios/utils/appearance
;<3B> áâனª 梥⮢=/sys/skincfg
;‘¯«®è®© ä®=/sys/media/palitra
[01]
name=FILES
path=/sys/File Managers/EOLITE
param=
ico=7
x=4
y=21
[02]
name=FPLAY
path=/kolibrios/media/fplay
param=
ico=96
x=65
y=21
[03]
name=GAMES
path=/sys/allgames
param=
ico=35
x=125
y=21
[04]
name=TINYPAD
path=/sys/tinypad
param=
ico=9
x=4
y=96
[05]
name=zSEA
path=/kolibrios/media/zsea/zsea
param=
ico=46
x=65
y=96
[06]
name=WEBVIEW
path=/sys/network/webview
param=
ico=31
x=125
y=96
; =========
; RIGHT TOP
; =========
[10]
name=DEBUG
path=/SYS/DEVELOP/MTDBG
param=
ico=39
x=-204
y=21
[11]
name=BOARD
path=/SYS/DEVELOP/BOARD
param=
ico=19
x=-140
y=21
[12]
name=KPACK
path=/SYS/KPACK
param=
ico=99
x=-77
y=21
[13]
name=DIFF
path=/sys/develop/diff
param=
ico=84
x=-203
y=96
[14]
name=FASM
path=/SYS/DEVELOP/FASM
param=
ico=10
x=-141
y=96
[15]
name=DOCPACK
path=/sys/network/webview
param=/kolibrios/res/guide/guide.htm
ico=8
x=-76
y=96
[16]
name=SHELL
path=/SYS/SHELL
param=
ico=1
x=-203
y=166
[17]
name=HEXEDIT
path=/SYS/DEVELOP/HEED
param=
ico=22
x=-141
y=166
[18]
name=TEDIT
path=/sys/develop/t_edit
param=
ico=58
x=-74
y=166
|
||||
[rbmenu]
„¨á¯¥âç¥à ¯à®æ¥áᮢ=/sys/cpu
;<3B> áâனª á⨫ï=/kolibrios/utils/appearance
;<3B> áâனª 梥⮢=/sys/skincfg
;‘¯«®è®© ä®=/sys/media/palitra
[01]
name=FILES
path=/sys/File Managers/EOLITE
param=
ico=7
x=4
y=21
[02]
name=FPLAY
path=/kolibrios/media/fplay
param=
ico=96
x=65
y=21
[03]
name=GAMES
path=/sys/allgames
param=
ico=35
x=125
y=21
[04]
name=TINYPAD
path=/sys/tinypad
param=
ico=9
x=4
y=96
[05]
name=zSEA
path=/kolibrios/media/zsea/zsea
param=
ico=46
x=65
y=96
[06]
name=WEBVIEW
path=/sys/network/webview
param=
ico=31
x=125
y=96
; =========
; RIGHT TOP
; =========
[10]
name=DEBUG
path=/SYS/DEVELOP/MTDBG
param=
ico=39
x=-204
y=21
[11]
name=BOARD
path=/SYS/DEVELOP/BOARD
param=
ico=19
x=-140
y=21
[12]
name=KPACK
path=/SYS/KPACK
param=
ico=99
x=-77
y=21
[13]
name=DIFF
path=/sys/develop/diff
param=
ico=84
x=-203
y=96
[14]
name=FASM
path=/SYS/DEVELOP/FASM
param=
ico=10
x=-141
y=96
[15]
name=DOCPACK
path=/sys/network/webview
param=/kolibrios/res/guide/guide.htm
ico=8
x=-76
y=96
[16]
name=SHELL
path=/SYS/SHELL
param=
ico=1
x=-203
y=166
[17]
name=HEXEDIT
path=/SYS/DEVELOP/HEED
param=
ico=22
x=-141
y=166
[18]
name=CEDIT
path=/sys/develop/cedit
param=
ico=58
x=-74
y=166
|
Binary file not shown.
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
@ -17,6 +17,7 @@
|
||||
#include "../lib/obj/box_lib.h"
|
||||
|
||||
#include "../lib/patterns/rgb.h"
|
||||
#include "../lib/patterns/toolbar_button.h"
|
||||
|
||||
#include "colors_mas.h"
|
||||
|
||||
@ -36,10 +37,11 @@ char edit_menu_items[] =
|
||||
Š®¯¨à®¢ âì|Ctrl+C
|
||||
‚áâ ¢¨âì|Ctrl+V";
|
||||
char image_menu_items[] =
|
||||
"Š®«¨ç¥á⢮ ¨á¯®«ì§®¢ ëå 梥⮢
|
||||
‡ ¬¥¨âì ¢á¥ æ¢¥â 1 2";
|
||||
"<EFBFBD>®áç¨â âì ª®«¨ç¥á⢮ 㨪 «ìëå 梥⮢
|
||||
‡ ¬¥¨âì ¢á¥ æ¢¥â 1 2
|
||||
<EFBFBD>஢¥à¨âì ¨ª®ªã";
|
||||
?define T_MENU_IMAGE "ˆª®ª "
|
||||
?define T_TEST_ICON "<EFBFBD>஢¥à¨âì ¨ª®ªã"
|
||||
?define T_TEST_ICON "<EFBFBD>஢¥àª ¨ª®ª¨"
|
||||
?define T_TITLE "<EFBFBD>¥¤ ªâ®à ¨ª®®ª 0.70a Beta"
|
||||
?define T_UNIC_COLORS_COUNT "'“¨ª «ìëå 梥⮢: %i.' -I"
|
||||
?define T_TOO_BIG_IMAGE_FOR_PREVIEW "'IconEdit
|
||||
@ -53,8 +55,9 @@ char edit_menu_items[] =
|
||||
Copy|Ctrl+C
|
||||
Paste|Ctrl+V";
|
||||
char image_menu_items[] =
|
||||
"Count colors used
|
||||
Replace all colors equal to 1 by 2";
|
||||
"Count unic colors used
|
||||
Replace all colors equal to 1 by 2
|
||||
Test icon";
|
||||
?define T_MENU_IMAGE "Icon"
|
||||
?define T_TEST_ICON "Test Icon"
|
||||
?define T_TITLE "Icon Editor 0.70 Beta"
|
||||
@ -68,10 +71,11 @@ selected image is too big to open!' -E"
|
||||
|
||||
|
||||
|
||||
#define TOPBAR_H 24+8
|
||||
#define LEFTBAR_W 16+5+5+3+3
|
||||
#define PALLETE_SIZE 116
|
||||
|
||||
#define TOPBAR_H 24+8
|
||||
int leftbar_w;
|
||||
|
||||
#define PAL_ITEMS_X_COUNT 13
|
||||
#define COLSIZE 18
|
||||
#define RIGHT_BAR_W PAL_ITEMS_X_COUNT*COLSIZE
|
||||
@ -80,7 +84,7 @@ selected image is too big to open!' -E"
|
||||
#define TO_CANVAS_Y(yval) yval - canvas.y/zoom.value
|
||||
|
||||
block canvas = { NULL, NULL, NULL, NULL };
|
||||
block wrapper = { LEFTBAR_W, TOPBAR_H, NULL, NULL };
|
||||
block wrapper = { 0, TOPBAR_H, NULL, NULL };
|
||||
block right_bar = { NULL, 10+TOPBAR_H, RIGHT_BAR_W+10, NULL };
|
||||
block image_menu_btn = { NULL, 4, NULL, 22 };
|
||||
|
||||
@ -173,6 +177,7 @@ void main()
|
||||
|
||||
top_icons.load("/sys/icons16.png");
|
||||
left_icons.load("/sys/icons16.png");
|
||||
leftbar_w = left_icons.w + 16;
|
||||
|
||||
sc.get();
|
||||
bg_dark = skin_is_dark();
|
||||
@ -300,7 +305,7 @@ void main()
|
||||
}
|
||||
}
|
||||
|
||||
void DrawTopPanelButton(dword _event, _hotkey, _x, _icon_n)
|
||||
void DrawTopPanelButton1(dword _event, _hotkey, _x, _icon_n)
|
||||
{
|
||||
DrawWideRectangle(_x, 4, 22, 22, 3, semi_white);
|
||||
PutPixel(_x,4,sc.work);
|
||||
@ -308,7 +313,9 @@ void DrawTopPanelButton(dword _event, _hotkey, _x, _icon_n)
|
||||
PutPixel(_x+21,4,sc.work);
|
||||
PutPixel(_x+21,4+21,sc.work);
|
||||
DefineHiddenButton(_x, 4, 21, 21, button.add(_event));
|
||||
img_draw stdcall(top_icons.image, _x+3, 7, 16, 16, 0, _icon_n*16);
|
||||
img_draw stdcall(top_icons.image, -top_icons.w+16/2+_x+3, -top_icons.w+16/2+7, left_icons.w,
|
||||
left_icons.w, 0, _icon_n*left_icons.w);
|
||||
//DrawTopPanelButton(button.add(_event), _x, 5, _icon_n, false);
|
||||
if (_hotkey) key.add_n(_hotkey, _event);
|
||||
}
|
||||
|
||||
@ -330,9 +337,10 @@ int DrawFlatPanelButton(dword _id, _x, _y, _text)
|
||||
void DrawLeftPanelButton(dword _event, _hotkey, _y, _icon_n)
|
||||
{
|
||||
int x = 5;
|
||||
DrawRectangle(x, _y, 22-1, 22-1, sc.work);
|
||||
DefineHiddenButton(x, _y, 21, 21, button.add(_event));
|
||||
img_draw stdcall(left_icons.image, x+3, _y+3, 16, 16, 0, _icon_n*16);
|
||||
DrawRectangle(x, _y, left_icons.w + 5, left_icons.w + 5, sc.work);
|
||||
DefineHiddenButton(x, _y, left_icons.w + 5, left_icons.w + 5, button.add(_event));
|
||||
img_draw stdcall(left_icons.image, x+3, _y+3, left_icons.w,
|
||||
left_icons.w, 0, _icon_n*left_icons.w);
|
||||
key.add_n(_hotkey, _event);
|
||||
}
|
||||
void DrawStatusBar()
|
||||
@ -357,6 +365,8 @@ void DrawWindow()
|
||||
{
|
||||
#define GAPH 27
|
||||
#define GAPV 28
|
||||
#define GAP_S 26+5
|
||||
#define GAP_B 26+18
|
||||
#define BLOCK_SPACE 10
|
||||
incn tx;
|
||||
incn ty;
|
||||
@ -374,27 +384,26 @@ void DrawWindow()
|
||||
DrawBar(0, 0, Form.cwidth, TOPBAR_H-1, sc.work);
|
||||
DrawBar(0, TOPBAR_H-1, Form.cwidth, 1, sc.work_graph);
|
||||
|
||||
DrawTopPanelButton(#EventCreateNewIcon, ECTRL + SCAN_CODE_KEY_N, tx.set(5), 2);
|
||||
DrawTopPanelButton(#EventOpenIcon, ECTRL + SCAN_CODE_KEY_O, tx.inc(GAPH), 0);
|
||||
DrawTopPanelButton(#EventSaveIconToFile, ECTRL + SCAN_CODE_KEY_S, tx.inc(GAPH), 5);
|
||||
DrawTopPanelButton(#EventMoveLeft, ECTRL + SCAN_CODE_LEFT, tx.inc(GAPH+BLOCK_SPACE), 30);
|
||||
DrawTopPanelButton(#EventMoveRight, ECTRL + SCAN_CODE_RIGHT, tx.inc(GAPH), 31);
|
||||
DrawTopPanelButton(#EventMoveUp, ECTRL + SCAN_CODE_UP, tx.inc(GAPH), 32);
|
||||
DrawTopPanelButton(#EventMoveDown, ECTRL + SCAN_CODE_DOWN, tx.inc(GAPH), 33);
|
||||
DrawTopPanelButton(#EventFlipHor, 0, tx.inc(GAPH+BLOCK_SPACE), 34);
|
||||
DrawTopPanelButton(#EventFlipVer, 0, tx.inc(GAPH), 35);
|
||||
DrawTopPanelButton(#EventRotateLeft, ECTRL + SCAN_CODE_KEY_L, tx.inc(GAPH), 37);
|
||||
DrawTopPanelButton(#EventRotateRight, ECTRL + SCAN_CODE_KEY_R, tx.inc(GAPH), 36);
|
||||
DrawTopPanelButton(#EventTestIcon, ECTRL + SCAN_CODE_KEY_T, tx.inc(GAPH+BLOCK_SPACE), 12);
|
||||
DrawTopPanelButton(#EventCrop, 0, tx.inc(GAPH+BLOCK_SPACE), 46);
|
||||
DrawTopPanelButton1(#EventCreateNewIcon, ECTRL + SCAN_CODE_KEY_N, tx.set(5), 2);
|
||||
DrawTopPanelButton1(#EventOpenIcon, ECTRL + SCAN_CODE_KEY_O, tx.inc(GAP_S), 0);
|
||||
DrawTopPanelButton1(#EventSaveIconToFile, ECTRL + SCAN_CODE_KEY_S, tx.inc(GAP_S), 5);
|
||||
DrawTopPanelButton1(#EventMoveLeft, ECTRL + SCAN_CODE_LEFT, tx.inc(GAP_B), 30);
|
||||
DrawTopPanelButton1(#EventMoveRight, ECTRL + SCAN_CODE_RIGHT, tx.inc(GAP_S), 31);
|
||||
DrawTopPanelButton1(#EventMoveUp, ECTRL + SCAN_CODE_UP, tx.inc(GAP_S), 32);
|
||||
DrawTopPanelButton1(#EventMoveDown, ECTRL + SCAN_CODE_DOWN, tx.inc(GAP_S), 33);
|
||||
DrawTopPanelButton1(#EventFlipHor, 0, tx.inc(GAP_B), 34);
|
||||
DrawTopPanelButton1(#EventFlipVer, 0, tx.inc(GAP_S), 35);
|
||||
DrawTopPanelButton1(#EventRotateLeft, ECTRL + SCAN_CODE_KEY_L, tx.inc(GAP_S), 37);
|
||||
DrawTopPanelButton1(#EventRotateRight, ECTRL + SCAN_CODE_KEY_R, tx.inc(GAP_S), 36);
|
||||
DrawTopPanelButton1(#EventCrop, 0, tx.inc(GAP_B), 46);
|
||||
|
||||
image_menu_btn.x = tx.inc(GAPH+BLOCK_SPACE);
|
||||
image_menu_btn.x = tx.inc(GAP_B);
|
||||
image_menu_btn.w = DrawFlatPanelButton(button.add(#EventShowImageMenu), image_menu_btn.x, image_menu_btn.y, T_MENU_IMAGE);
|
||||
//tx.inc(image_menu_btn.w + BLOCK_SPACE);
|
||||
|
||||
DrawEditArea();
|
||||
|
||||
DrawBar(0, TOPBAR_H, LEFTBAR_W-1, Form.cheight - TOPBAR_H, sc.work);
|
||||
DrawBar(0, TOPBAR_H, leftbar_w-1, Form.cheight - TOPBAR_H, sc.work);
|
||||
|
||||
ty.n = right_bar.y - GAPV - 2;
|
||||
|
||||
@ -409,6 +418,7 @@ void DrawWindow()
|
||||
DrawLeftPanelSelection();
|
||||
|
||||
button.add_n(1, #EventExitIconEdit);
|
||||
key.add_n(ECTRL + SCAN_CODE_KEY_T, #EventTestIcon);
|
||||
|
||||
DrawBar(wrapper.x+wrapper.w, TOPBAR_H, Form.cwidth-wrapper.x-wrapper.w,
|
||||
Form.cheight - TOPBAR_H, sc.work);
|
||||
@ -416,15 +426,15 @@ void DrawWindow()
|
||||
DrawColorPallets();
|
||||
DrawPreview();
|
||||
|
||||
DrawBar(LEFTBAR_W-1, wrapper.y + wrapper.h, wrapper.w+1,
|
||||
DrawBar(leftbar_w-1, wrapper.y + wrapper.h, wrapper.w+1,
|
||||
Form.cheight - wrapper.y - wrapper.h, sc.work);
|
||||
DrawStatusBar();
|
||||
}
|
||||
|
||||
void DrawLeftPanelSelection()
|
||||
{
|
||||
if (previousTool!=-1) DrawRectangle3D(5, previousTool*GAPV+right_bar.y-2, 16+3+2, 16+3+2, sc.work, sc.work);
|
||||
DrawRectangle3D(5, currentTool*GAPV+right_bar.y-2, 16+3+2, 16+3+2, 0x333333, 0x777777);
|
||||
if (previousTool!=-1) DrawRectangle3D(5, previousTool*GAPV+right_bar.y-2, left_icons.w+5, left_icons.w+5, sc.work, sc.work);
|
||||
DrawRectangle3D(5, currentTool*GAPV+right_bar.y-2, left_icons.w+5, left_icons.w+5, 0x333333, 0x777777);
|
||||
}
|
||||
|
||||
void DrawEditArea()
|
||||
@ -433,6 +443,7 @@ void DrawEditArea()
|
||||
int top_side;
|
||||
int left_side;
|
||||
|
||||
wrapper.x = left_icons.w + 16;
|
||||
wrapper.w = Form.cwidth - right_bar.w - 10 - wrapper.x;
|
||||
wrapper.h = Form.cheight - TOPBAR_H - 35;
|
||||
|
||||
@ -761,6 +772,9 @@ void EventCheckMenuItemSelected()
|
||||
case 2:
|
||||
EventReplaceImageColors(color1, color2);
|
||||
break;
|
||||
case 3:
|
||||
EventTestIcon();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user