Commit 62e5dd9c authored by Martin Schreiber's avatar Martin Schreiber

Merge from master.

parents 0876eb80 5a44c62b
......@@ -1082,6 +1082,7 @@ type
function innerframedim: sizety;
procedure createfont;
property framei: framety read fi.ba.innerframe;
property frameo: framety read fi.ba.outerframe;
property clientsizeextend: sizety read fclientsizeextend
write fclientsizeextend;
published
......
{ MSEgui Copyright (c) 1999-2016 by Martin Schreiber
{ MSEgui Copyright (c) 1999-2018 by Martin Schreiber
See the file COPYING.MSE, included in this distribution,
for details about the copyright.
......
......@@ -1500,18 +1500,26 @@ var
co1: colorty;
framestates: framestateflagsty;
size1: sizety;
widthextend: int32;
begin
framestates:= [];
result:= [shs_checkbox,shs_radiobutton] * info.state <> [];
if result then begin
rect1:= arect;
rect1.cx:= menucheckboxwidth;
int1:= menucheckboxheight;
widthextend:= menucheckboxwidth;
if info.checkboxframe <> nil then begin
size1:= info.checkboxframe.innerframedim;
rect1.cx:= rect1.cx + size1.cx;
int1:= int1 + size1.cy;
with info.checkboxframe do begin
if fso_flat in optionsskin then begin
dec(int1,2);
dec(widthextend,2);
end;
size1:= innerframedim;
widthextend:= widthextend + frameo_left + frameo_right + size1.cx;
int1:= int1 + size1.cy + frameo_top + frameo_bottom;
end;
end;
rect1.cx:= widthextend;
if int1 < arect.cy then begin
rect1.cy:= int1;
rect1.y:= rect1.y + (arect.cy - int1) div 2;
......@@ -1521,6 +1529,7 @@ begin
end;
if info.checkboxframe <> nil then begin
framestates:= combineframestateflags(info.state);
deflaterect1(rect1,info.checkboxframe.frameo);
info.checkboxframe.paintbackgroundframe(canvas,rect1,framestates);
rect2:= deflaterect(rect1,info.checkboxframe.innerframe);
end
......@@ -1532,9 +1541,9 @@ begin
draw3dframe(canvas,rect2,-1,defaultframecolors.edges,[]);
end;
if pos = ip_left then begin
inc(arect.x,menucheckboxwidth);
inc(arect.x,widthextend);
end;
dec(arect.cx,menucheckboxwidth);
dec(arect.cx,widthextend);
if shs_checked in info.state then begin
if shs_disabled in info.state then begin
align1:= [al_xcentered,al_ycentered,al_grayed];
......
......@@ -1732,7 +1732,7 @@ type
end;
ppidinfoty = ^pidinfoty;
function checkproc(awinid: winidty; po: ptrint): bool; stdcall;
function checkproc(awinid: hwnd; po: ptrint): bool; stdcall;
var
pid: integer;
int1: integer;
......@@ -3076,7 +3076,7 @@ function getchildren(child: hwnd; data: lparam): winbool; stdcall;
begin
with penumchildinfoty(data)^ do begin
if gui_getparentwindow(child) = parent then begin
additem(childlist,child,count);
additem(childlist,winidty(child),count);
end;
end;
result:= true;
......
{ MSEgui Copyright (c) 1999-2017 by Martin Schreiber
{ MSEgui Copyright (c) 1999-2018 by Martin Schreiber
See the file COPYING.MSE, included in this distribution,
for details about the copyright.
......@@ -423,7 +423,15 @@ begin
checkboxwidth:= menucheckboxwidth;
checkboxheight:= menucheckboxheight;
if checkboxframetemplate <> nil then begin
size1:= checkboxframetemplate.innerframedim();
with checkboxframetemplate do begin
if fso_flat in optionsskin then begin
dec(checkboxwidth,2);
dec(checkboxheight,2);
end;
size1:= innerframedim();
size1.cx:= size1.cx + frameo_left + frameo_right;
size1.cy:= size1.cy + frameo_top + frameo_bottom;
end;
checkboxwidth:= checkboxwidth + size1.cx;
checkboxheight:= checkboxheight + size1.cy;
end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment