diff --git a/programs/develop/cedit/CEDIT b/programs/develop/cedit/CEDIT index 390a3bd888..3a41707e11 100644 Binary files a/programs/develop/cedit/CEDIT and b/programs/develop/cedit/CEDIT differ diff --git a/programs/develop/cedit/SRC/CEdit.ob07 b/programs/develop/cedit/SRC/CEdit.ob07 index fabe8df75f..2621bf37d4 100644 --- a/programs/develop/cedit/SRC/CEdit.ob07 +++ b/programs/develop/cedit/SRC/CEdit.ob07 @@ -28,7 +28,7 @@ IMPORT RW, Ini, EB := EditBox, Icons, Tabs, Timer; CONST - HEADER = "CEdit (03-oct-2021)"; + HEADER = "CEdit (21-nov-2021)"; ShellFilter = ""; EditFilter = "SH|INC|TXT|ASM|OB07|C|CPP|H|PAS|PP|LUA|INI|JSON"; @@ -2010,6 +2010,7 @@ VAR i: INTEGER; BEGIN K.GetSystemColors; + Icons.get(icons, grayIcons); FOR i := 0 TO 1 DO IF ~K.RolledUp() THEN K.ClientSize(width, height); diff --git a/programs/develop/cedit/SRC/Graph.ob07 b/programs/develop/cedit/SRC/Graph.ob07 index 62d94ed614..5bea947425 100644 --- a/programs/develop/cedit/SRC/Graph.ob07 +++ b/programs/develop/cedit/SRC/Graph.ob07 @@ -105,7 +105,7 @@ BEGIN X2 := MIN(MAX(x1, x2), canvas.width - 1); IF (0 <= y) & (y < canvas.height) THEN color := canvas.color; - ptr := canvas.bitmap + y*canvas.width*4 + X1*4; + ptr := canvas.bitmap + 4*(y*canvas.width + X1); FOR i := X1 TO X2 DO SYSTEM.PUT32(ptr, color); INC(ptr, 4) @@ -124,7 +124,7 @@ BEGIN Y2 := MIN(MAX(y1, y2), canvas.height - 1); IF (0 <= x) & (x < canvas.width) THEN color := canvas.color; - ptr := canvas.bitmap + Y1*canvas.width*4 + x*4; + ptr := canvas.bitmap + 4*(Y1*canvas.width + x); FOR i := Y1 TO Y2 DO IF canvas.mode = modeNOT THEN SYSTEM.GET32(ptr, color); @@ -168,11 +168,11 @@ VAR d: INTEGER; BEGIN color := canvas.color; - ptr := canvas.bitmap + y*canvas.width*4 + x1*4; + ptr := canvas.bitmap + 4*(y*canvas.width + x1); IF k = -1 THEN - d := canvas.width*4 + 4 + d := 4*(canvas.width + 1) ELSIF k = 1 THEN - d := 4 - canvas.width*4 + d := 4*(1 - canvas.width) END; WHILE x1 <= x2 DO SYSTEM.PUT32(ptr, color); diff --git a/programs/develop/cedit/SRC/KolibriOS.ob07 b/programs/develop/cedit/SRC/KolibriOS.ob07 index 89650664c3..9ed015ea9f 100644 --- a/programs/develop/cedit/SRC/KolibriOS.ob07 +++ b/programs/develop/cedit/SRC/KolibriOS.ob07 @@ -30,7 +30,7 @@ VAR winColor*, textColor*, btnColor*, btnTextColor*, toolbarColor*, scrollColor*, scrollBkColor*, - borderColor*, shadowColor*, darkColor*, lightColor*, + borderColor*, shadowColor*, (*darkColor,*) lightColor*, caseColor*, disCaseColor*: INTEGER; @@ -343,7 +343,7 @@ BEGIN ASSERT(LEN(buf) >= 10); KOSAPI.sysfunc4(48, 3, SYSTEM.ADR(buf[0]), 40); - darkColor := buf[2]; + (*darkColor := buf[2];*) lightColor := buf[3]; winColor := buf[5]; textColor := buf[8]; @@ -353,10 +353,10 @@ BEGIN scrollBkColor := winColor; borderColor := buf[9]; - toolbarColor := 0DFDFDFH; - shadowColor := 0808080H; + toolbarColor := lightColor;(*0DFDFDFH;*) + shadowColor := borderColor;(*0808080H;*) caseColor := 00000FFH; - disCaseColor := 0808080H; + disCaseColor := borderColor;(*0808080H*) END GetSystemColors; diff --git a/programs/develop/cedit/SRC/Text.ob07 b/programs/develop/cedit/SRC/Text.ob07 index 5bbb27af12..f44c331c87 100644 --- a/programs/develop/cedit/SRC/Text.ob07 +++ b/programs/develop/cedit/SRC/Text.ob07 @@ -1965,17 +1965,19 @@ END selectWord; PROCEDURE cursor (text: tText); VAR - x, y, h: INTEGER; + x, y1, y2, scrollX, scrollY: INTEGER; cursor: pPoint; BEGIN cursor := text.cursor; - IF ~((text.scroll.Y > cursor.Y) OR (text.scroll.Y + textsize.Y <= cursor.Y) OR - (text.scroll.X > cursor.X) OR (text.scroll.X + textsize.X <= cursor.X)) THEN - x := (cursor.X - text.scroll.X)*charWidth + padding.left; - y := (cursor.Y - text.scroll.Y)*charHeight + 1 + padding.top; - h := charHeight - 2; - G.notVLine(canvas, x, y + inter DIV 2, y + h - inter DIV 2); - G.notVLine(canvas, x - 1, y + inter DIV 2, y + h - inter DIV 2) + scrollX := text.scroll.X; + scrollY := text.scroll.Y; + IF ~((scrollY > cursor.Y) OR (scrollY + textsize.Y <= cursor.Y) OR + (scrollX > cursor.X) OR (scrollX + textsize.X <= cursor.X)) THEN + x := (cursor.X - scrollX)*charWidth + padding.left; + y1 := (cursor.Y - scrollY)*charHeight + padding.top + (inter DIV 2 + 1); + y2 := y1 + charHeight - (inter + 2); + G.notVLine(canvas, x, y1, y2); + G.notVLine(canvas, x - 1, y1, y2) END END cursor;