icons32.png: add Backy icon

appearance: bugfixes
quark: update search


git-svn-id: svn://kolibrios.org@7960 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-05-20 19:34:09 +00:00
parent baa8e3dca2
commit 8ad1428a03
11 changed files with 62 additions and 281 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -11,7 +11,7 @@ GrafX2=/k/grafx2/grafx2,48
uPDF=/k/media/updf,73
IconEdit=media/iconedit,98
EasyShot=easyshot,62
Beat=/k/media/beat/Beat,64
Beat=/k/media/beat/Beat,123
[3D Tools and Demos]
Info3DsPro=/k/3d/info3ds/info3ds,75

View File

@ -204,9 +204,6 @@ void DrawWindowContent()
DrawIcon16(tabs.x + TAB_PADDING, 15, sc.work, 17);
DrawIcon16(strlen(T_SKINS)*8 + tabs.x + TAB_PADDING + TAB_PADDING, 15, sc.work, 6);
if (select_list.cur_y>select_list.visible) select_list.first=select_list.cur_y;
select_list.CheckDoesValuesOkey();
id = select_list.cur_y;
SelectList_Init(
tabs.x+TAB_PADDING,
@ -297,6 +294,17 @@ void SelectList_LineChanged()
EventApply();
}
void ActivateTab(int _id)
{
select_list.ClearList();
Open_Dir();
if (!select_list.count) notify("'No files were found' -E");
select_list.cur_y = _id;
if (select_list.cur_y>select_list.visible) select_list.first=select_list.cur_y;
select_list.CheckDoesValuesOkey();
if (select_list.w) draw_window();
}
//===================================================//
// //
// EVENTS //
@ -307,24 +315,14 @@ void EventTabSkinsClick()
{
active_wallpaper = select_list.cur_y;
strcpy(#folder_path, #skins_folder_path);
select_list.ClearList();
Open_Dir();
if (!select_list.count) notify("'No skins were found' -E");
select_list.cur_y = active_skin;
if (select_list.w) draw_window();
ActivateTab(active_skin);
}
void EventTabWallpappersClick()
{
active_skin = select_list.cur_y;
strcpy(#folder_path, #wallp_folder_path);
select_list.ClearList();
Open_Dir();
if (!select_list.count) notify("'No wallpapers were found' -E");
select_list.cur_y = active_wallpaper;
if (select_list.w) draw_window();
ActivateTab(active_wallpaper);
}
void EventDeleteFile()

View File

@ -13,7 +13,7 @@ char intro[] = "
char copied_chars[] = "‘ª®¯¨à®¢ ­® ᨢ®«®¢: %i";
char about[] = "Quark Text v0.72
char about[] = "Quark Text v0.8
¢â®à: Š¨à¨«« ¨¯ â®¢ aka Leency
 ©â: http://aspero.pro
@ -52,7 +52,7 @@ Try to open some text file.";
char copied_chars[] = "Copied %i chars";
char about[] = "Quark Text v0.72
char about[] = "Quark Text v0.8
Author: Kiril Lipatov aka Leency
Website: http://aspero.pro
@ -94,13 +94,13 @@ Copy file path";
dword color_schemes[] = {
//bg, text, scroll, selected, cursor
0xFCF0DA, 0x171501, 0xB2ACA0, 0xD8CAA7, 0xFF0000, //Dairy
0x282923, 0xD8D8D2, 0x555551, 0x5A574A, 0xFFFfff //Cosmos
0xFCF0DA, 0x171501, 0xB2ACA0, 0xD8CAA7, 0xFF0000, 0xFEC53A, //Dairy
0x282923, 0xD8D8D2, 0x555551, 0x5A574A, 0xFFFfff, 0x9D7E00 //Cosmos
};
struct THEME
{
dword bg, text, cursor;
dword bg, text, cursor, found;
} theme;
char default_dir[] = "/rd/1";

View File

@ -1,7 +1,6 @@
void ParseAndPaint()
{
//search.clear();
list.count=0;
selection.cancel();
@ -46,7 +45,8 @@ dword buflen = strlen(io.buffer_data) + io.buffer_data;
void PaintVisible()
{
int i;
int i, ff;
signed s1, s2;
dword ydraw, absolute_y;
dword line_bg;
bool swapped_selection = false;
@ -68,6 +68,18 @@ void PaintVisible()
selection.draw(absolute_y);
if (search.visible) for (ff=0; ff<search.found.count; ff++) {
s1 = search.found.get(ff) - lines.get(absolute_y);
s2 = search.found.get(ff) - lines.get(absolute_y+1);
if (s2 > 0) break;
if (s1 > 0) && (s2 < 0) {
DrawBuf.DrawBar(search.found.get(ff) - lines.get(absolute_y) * list.font_w + 3,
ydraw, strlen(#found_text) * list.font_w, list.item_h, theme.found);
}
}
if (absolute_y<list.count) DrawBuf.WriteText(3, ydraw+3, list.font_type, theme.text,
lines.get(absolute_y), lines.len(absolute_y));
}
@ -76,4 +88,3 @@ void PaintVisible()
if (swapped_selection) selection.swap_start_end();
}

View File

@ -409,12 +409,13 @@ void EventShowRmbMenu()
void EventSetColorScheme(dword _setn)
{
curcol_scheme = _setn;
theme.bg = color_schemes[curcol_scheme*5];
theme.text = color_schemes[curcol_scheme*5+1];
theme.bg = color_schemes[curcol_scheme*6];
theme.text = color_schemes[curcol_scheme*6+1];
scroll.bckg_col = theme.bg;
scroll.frnt_col = scroll.line_col = color_schemes[curcol_scheme*5+2];
selection.color = color_schemes[curcol_scheme*5+3];
theme.cursor = color_schemes[curcol_scheme*5+4];
scroll.frnt_col = scroll.line_col = color_schemes[curcol_scheme*6+2];
selection.color = color_schemes[curcol_scheme*6+3];
theme.cursor = color_schemes[curcol_scheme*6+4];
theme.found = color_schemes[curcol_scheme*6+5];
if (list.count) ParseAndPaint();
}

View File

@ -6,12 +6,13 @@ struct SEARCH
{
bool visible;
int found_count;
collection_int found;
void show();
void hide();
bool draw();
bool edit_key();
bool edit_mouse();
void clear();
int find_all();
int find_next();
} search;
@ -71,7 +72,7 @@ bool SEARCH::draw(dword _btn_find, _btn_hide, _y)
DrawCaptButton(search_box.left+search_box.width+14, search_box.top-1, 90,
TOOLBAR_ICON_HEIGHT+1, _btn_find, sc.work_light, sc.work_text, T_FIND_NEXT);
sprintf(#matches, T_MATCHES, found_count);
sprintf(#matches, T_MATCHES, found.count);
WriteTextWithBg(search_box.left+search_box.width+14+110,
search_box.top+3, 0xD0, sc.work_text, #matches, sc.work);
@ -81,11 +82,16 @@ bool SEARCH::draw(dword _btn_find, _btn_hide, _y)
return true;
}
void SEARCH::clear()
int SEARCH::find_all()
{
visible = false;
found_text[0] = '\0';
found_count = 0;
dword haystack = io.buffer_data;
int needle_len = strlen(#found_text);
found.drop();
loop() {
if (! haystack = strstri(haystack, #found_text)) break;
found.add(haystack - needle_len);
haystack += needle_len;
}
}
int SEARCH::find_next(int _cur_pos)
@ -93,13 +99,15 @@ int SEARCH::find_next(int _cur_pos)
int i;
if (!search_text[0]) return false;
strcpy(#found_text, #search_text);
found_count = strinum(io.buffer_data, #found_text);
if (!streq(#found_text, #search_text)) {
strcpy(#found_text, #search_text);
find_all();
}
draw_window();
for (i=_cur_pos+1; i<list.count; i++) {
if (strstri(lines.get(i),#search_text)) return i;
}
//for (i=_cur_pos+1; i<list.count; i++) {
// if (strstri(lines.get(i),#search_text)) return i;
//}
return false;
}

View File

@ -0,0 +1,2 @@
@fasm asciivju.asm asciivju
@pause

Binary file not shown.

View File

@ -1,8 +1,8 @@
include 'skin.inc'
include '..\..\skin.inc'
SKIN_PARAMS \
height = bmp_base.height,\ ; skin height
margins = [5:1:44:1],\ ; margins [left:top:right:bottom]
margins = [6:4:44:2],\ ; margins [left:top:right:bottom]
colors active = [binner=0x000000:\ ; border inner color
bouter=0x000000:\ ; border outer color
bframe=0xC0C0C0],\ ; border frame color

View File

@ -1,239 +0,0 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;============================================================================
; This file should be used to generate skins of new standard
;============================================================================
; skin file structure:
;----------------------------------------------------------------------------
; header:
; dd 'SKIN'
; dd = version (1 for now)
; dd @ params
; dd @ buttons
; dd @ bitmaps
; ...
;----------------------------------------------------------------------------
; NOTE: order of sections listed below is insignificant
; since they're identified by pointer in above header
;----------------------------------------------------------------------------
; ...
; params:
; dd = skin height
; dw = right margin
; dw = left margin
; dw = bottom margin
; dw = top margin
; dd = inner line color
; dd = outer line color
; dd = frame color
; dd = dtp file size
; ?? = dtp file itself
; ...
;----------------------------------------------------------------------------
; ...
; buttons:
; dd = button type (1 = close, 2 = minimize)
; dw = left button coord (could be negative)
; dw = top button coord (could be negative)
; dw = button width
; dw = button height
; ... etc for all buttons
; dd = 0 (end of buttons list)
; ...
;----------------------------------------------------------------------------
; ...
; bitmaps:
; dw = bitmap kind (1 = left, 2 = oper, 3 = base)
; dw = bitmap type (1 = active, 0 = inactive)
; dd @ bitmap
; ... etc for all bitmaps
; dd 0 (end of bitmaps list)
; ...
;----------------------------------------------------------------------------
; ...
; bitmap:
; dd = bitmap width
; dd = bitmap height
; ?? = raw bitmap data
; ... etc for all bitmaps
; ...
;============================================================================
dd 'SKIN',1,__params__,__buttons__,__bitmaps__
struc BITMAPFILEHEADER {
.bfType dw ? ; WORD
.bfSize dd ? ; DWORD
.bfReserved1 dw ? ; WORD
.bfReserved2 dw ? ; WORD
.bfOffBits dd ? ; DWORD
}
struc BITMAPINFOHEADER {
.biSize dd ? ; DWORD
.biWidth dd ? ; LONG
.biHeight dd ? ; LONG
.biPlanes dw ? ; WORD
.biBitCount dw ? ; WORD
.biCompression dd ? ; DWORD
.biSizeImage dd ? ; DWORD
.biXPelsPerMeter dd ? ; LONG
.biYPelsPerMeter dd ? ; LONG
.biClrUsed dd ? ; DWORD
.biClrImportant dd ? ; DWORD
}
struc _bmp {
.h BITMAPFILEHEADER
.i BITMAPINFOHEADER
}
virtual at 0
_bmp _bmp
end virtual
macro BITMAP _name*,_fname*
{
local w,h,a,r,g,b
virtual at 0
_file equ _#_name
_file::
file _fname
end virtual
load w dword from _file:_bmp.i.biWidth
load h dword from _file:_bmp.i.biHeight
load hsize dword from _file:_bmp.h.bfOffBits
align 4
label _name
.width = w
.height = h
dd w,h
a=hsize+(w*3+(w mod 4))*(h-1)
size = $
repeat h
repeat w
load r from _file:a+0
load g from _file:a+1
load b from _file:a+2
db r,g,b
a=a+3
end repeat
a=a-w*3*2-(w mod 4)
end repeat
}
macro define_colors name,[col,val]
{
common
local a,b,c
forward
match =binner,col \{ a = val \}
match =bouter,col \{ b = val \}
match =bframe,col \{ c = val \}
common
name equ a,b,c
}
macro SKIN_PARAMS [a]
{
common
local _height,_margins,_colors,_colors_1,_dtp
__params__:
forward
match qq == ww,a
\{
match =height,qq \\{ _height = ww \\}
match =margins,qq \\{
match [q1:q2:q3:q4],ww
\\\{
_margins equ q3,q1,q4,q2
\\\}
\\}
match =colors =active,qq
\\{
match [q10==q11:q20==q21:q30==q31],ww
\\\{
define_colors _colors,q10,q11,q20,q21,q30,q31
\\\}
\\}
match =colors =inactive,qq
\\{
match [q10==q11:q20==q21:q30==q31],ww
\\\{
define_colors _colors_1,q10,q11,q20,q21,q30,q31
\\\}
\\}
match =dtp,qq \\{ _dtp equ ww \\}
\}
common
dd _height
dw _margins
dd _colors,_colors_1
dd @f - $ - 4
file _dtp
@@:
}
macro SKIN_BUTTONS [a]
{
common
local btn
__buttons__:
forward
match qq == ww,a
\{
btn = 0
match =close,qq \\{ btn = 1 \\}
match =minimize,qq \\{ btn = 2 \\}
match [q1:q2][q3:q4],ww
\\{
if btn <> 0
dd btn
dw q1,q2,q3,q4
end if
\\}
\}
common
dd 0
}
macro SKIN_BITMAPS [a]
{
common
local bmp
__bitmaps__:
forward
match qq == ww,a
\{
bmp=-1
match qqq =active,qq \\{ bmp = 1 \\}
match qqq =inactive,qq \\{ bmp = 0 \\}
match =left qqq,qq
\\{
if bmp >= 0
dw 1,bmp
dd ww
end if
\\}
match =oper qqq,qq
\\{
if bmp >= 0
dw 2,bmp
dd ww
end if
\\}
match =base qqq,qq
\\{
if bmp >= 0
dw 3,bmp
dd ww
end if
\\}
\}
common
dd 0
}