forked from KolibriOS/kolibrios
CEdit: fixed window redrawing
git-svn-id: svn://kolibrios.org@9526 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
df6ac3618c
commit
2a142bd532
Binary file not shown.
@ -28,7 +28,7 @@ IMPORT
|
|||||||
RW, Ini, EB := EditBox, Tabs, Toolbar, SB := StatusBar;
|
RW, Ini, EB := EditBox, Tabs, Toolbar, SB := StatusBar;
|
||||||
|
|
||||||
CONST
|
CONST
|
||||||
HEADER = "CEdit (29-dec-2021)";
|
HEADER = "CEdit (30-dec-2021)";
|
||||||
|
|
||||||
ShellFilter = "";
|
ShellFilter = "";
|
||||||
EditFilter = "SH|INC|TXT|ASM|OB07|C|CPP|H|PAS|PP|LUA|INI|JSON";
|
EditFilter = "SH|INC|TXT|ASM|OB07|C|CPP|H|PAS|PP|LUA|INI|JSON";
|
||||||
@ -171,6 +171,7 @@ CONST
|
|||||||
|
|
||||||
|
|
||||||
VAR
|
VAR
|
||||||
|
header: RW.tFileName;
|
||||||
canvas: G.tCanvas;
|
canvas: G.tCanvas;
|
||||||
font, font1, font2: G.tFont;
|
font, font1, font2: G.tFont;
|
||||||
|
|
||||||
@ -330,14 +331,17 @@ END getIdx;
|
|||||||
|
|
||||||
PROCEDURE SetCaption (fileName: RW.tFileName);
|
PROCEDURE SetCaption (fileName: RW.tFileName);
|
||||||
VAR
|
VAR
|
||||||
header: RW.tFileName;
|
newHeader: RW.tFileName;
|
||||||
BEGIN
|
BEGIN
|
||||||
header := HEADER;
|
newHeader := HEADER;
|
||||||
IF text.fileName # "" THEN
|
IF text.fileName # "" THEN
|
||||||
U.append8(header, " - ");
|
U.append8(newHeader, " - ");
|
||||||
U.append8(header, text.fileName)
|
U.append8(newHeader, text.fileName)
|
||||||
END;
|
END;
|
||||||
|
IF newHeader # header THEN
|
||||||
|
header := newHeader;
|
||||||
K.SetCaption(header)
|
K.SetCaption(header)
|
||||||
|
END
|
||||||
END SetCaption;
|
END SetCaption;
|
||||||
|
|
||||||
|
|
||||||
@ -502,10 +506,10 @@ BEGIN
|
|||||||
confirm := FALSE;
|
confirm := FALSE;
|
||||||
K.ClientSize(width, height);
|
K.ClientSize(width, height);
|
||||||
|
|
||||||
K.DrawRect(0, 0, width, TOP, K.winColor);
|
K.DrawRect(0, 0, width, TOP - 1, K.winColor);
|
||||||
K.DrawRect(0, 0, LEFT, height, K.winColor);
|
K.DrawRect(0, 0, LEFT, height, K.winColor);
|
||||||
K.DrawRect(width - RIGHT_PADDING, 0, RIGHT_PADDING, height, K.winColor);
|
K.DrawRect(width - RIGHT_PADDING, 0, RIGHT_PADDING, height, K.winColor);
|
||||||
K.DrawRect(LEFT + canvas.width + 1, TOP + canvas.height, scrollWidth - 1, scrollWidth, K.winColor);
|
K.DrawRect(LEFT + canvas.width + 1, TOP + canvas.height + 1, scrollWidth - 1, scrollWidth - 1, K.winColor);
|
||||||
Menu.DrawMain(mainMenu);
|
Menu.DrawMain(mainMenu);
|
||||||
|
|
||||||
Toolbar.draw(toolbar);
|
Toolbar.draw(toolbar);
|
||||||
@ -1906,11 +1910,8 @@ END MouseEvent;
|
|||||||
|
|
||||||
|
|
||||||
PROCEDURE Redraw (VAR resized: BOOLEAN; VAR width, height, cliWidth, cliHeight: INTEGER);
|
PROCEDURE Redraw (VAR resized: BOOLEAN; VAR width, height, cliWidth, cliHeight: INTEGER);
|
||||||
VAR
|
|
||||||
i: INTEGER;
|
|
||||||
BEGIN
|
BEGIN
|
||||||
K.GetSystemColors;
|
K.GetSystemColors;
|
||||||
FOR i := 0 TO 1 DO
|
|
||||||
IF ~K.RolledUp() THEN
|
IF ~K.RolledUp() THEN
|
||||||
K.ClientSize(width, height);
|
K.ClientSize(width, height);
|
||||||
IF (width # cliWidth) OR (height # cliHeight) THEN
|
IF (width # cliWidth) OR (height # cliHeight) THEN
|
||||||
@ -1925,7 +1926,6 @@ BEGIN
|
|||||||
K.SetEventsMask({0, 30, 31})
|
K.SetEventsMask({0, 30, 31})
|
||||||
END;
|
END;
|
||||||
draw_window
|
draw_window
|
||||||
END
|
|
||||||
END Redraw;
|
END Redraw;
|
||||||
|
|
||||||
|
|
||||||
@ -1951,6 +1951,7 @@ VAR
|
|||||||
resized: BOOLEAN;
|
resized: BOOLEAN;
|
||||||
firstClickX, firstClickY, time: INTEGER;
|
firstClickX, firstClickY, time: INTEGER;
|
||||||
BEGIN
|
BEGIN
|
||||||
|
header := "";
|
||||||
K.GetSystemColors;
|
K.GetSystemColors;
|
||||||
switch := FALSE;
|
switch := FALSE;
|
||||||
closing := FALSE;
|
closing := FALSE;
|
||||||
@ -2044,7 +2045,7 @@ BEGIN
|
|||||||
insert(0, text);
|
insert(0, text);
|
||||||
Scroll.init(ScrollChange);
|
Scroll.init(ScrollChange);
|
||||||
Scroll.create(FALSE, canvas.width + 1, scrollWidth, scrollWidth, scrollWidth*3 DIV 2, hScroll);
|
Scroll.create(FALSE, canvas.width + 1, scrollWidth, scrollWidth, scrollWidth*3 DIV 2, hScroll);
|
||||||
Scroll.create(TRUE, scrollWidth, canvas.height + 1, scrollWidth, scrollWidth*3 DIV 2, vScroll);
|
Scroll.create(TRUE, scrollWidth, canvas.height + 2, scrollWidth, scrollWidth*3 DIV 2, vScroll);
|
||||||
T.resize(canvas.width, canvas.height);
|
T.resize(canvas.width, canvas.height);
|
||||||
T.SetPos(text, 0, 0);
|
T.SetPos(text, 0, 0);
|
||||||
confirm := FALSE;
|
confirm := FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user