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

Merge from master.

parents 0876eb80 5a44c62b
...@@ -1082,6 +1082,7 @@ type ...@@ -1082,6 +1082,7 @@ type
function innerframedim: sizety; function innerframedim: sizety;
procedure createfont; procedure createfont;
property framei: framety read fi.ba.innerframe; property framei: framety read fi.ba.innerframe;
property frameo: framety read fi.ba.outerframe;
property clientsizeextend: sizety read fclientsizeextend property clientsizeextend: sizety read fclientsizeextend
write fclientsizeextend; write fclientsizeextend;
published 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, See the file COPYING.MSE, included in this distribution,
for details about the copyright. for details about the copyright.
......
...@@ -1500,18 +1500,26 @@ var ...@@ -1500,18 +1500,26 @@ var
co1: colorty; co1: colorty;
framestates: framestateflagsty; framestates: framestateflagsty;
size1: sizety; size1: sizety;
widthextend: int32;
begin begin
framestates:= []; framestates:= [];
result:= [shs_checkbox,shs_radiobutton] * info.state <> []; result:= [shs_checkbox,shs_radiobutton] * info.state <> [];
if result then begin if result then begin
rect1:= arect; rect1:= arect;
rect1.cx:= menucheckboxwidth;
int1:= menucheckboxheight; int1:= menucheckboxheight;
widthextend:= menucheckboxwidth;
if info.checkboxframe <> nil then begin if info.checkboxframe <> nil then begin
size1:= info.checkboxframe.innerframedim; with info.checkboxframe do begin
rect1.cx:= rect1.cx + size1.cx; if fso_flat in optionsskin then begin
int1:= int1 + size1.cy; 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; end;
rect1.cx:= widthextend;
if int1 < arect.cy then begin if int1 < arect.cy then begin
rect1.cy:= int1; rect1.cy:= int1;
rect1.y:= rect1.y + (arect.cy - int1) div 2; rect1.y:= rect1.y + (arect.cy - int1) div 2;
...@@ -1521,6 +1529,7 @@ begin ...@@ -1521,6 +1529,7 @@ begin
end; end;
if info.checkboxframe <> nil then begin if info.checkboxframe <> nil then begin
framestates:= combineframestateflags(info.state); framestates:= combineframestateflags(info.state);
deflaterect1(rect1,info.checkboxframe.frameo);
info.checkboxframe.paintbackgroundframe(canvas,rect1,framestates); info.checkboxframe.paintbackgroundframe(canvas,rect1,framestates);
rect2:= deflaterect(rect1,info.checkboxframe.innerframe); rect2:= deflaterect(rect1,info.checkboxframe.innerframe);
end end
...@@ -1532,9 +1541,9 @@ begin ...@@ -1532,9 +1541,9 @@ begin
draw3dframe(canvas,rect2,-1,defaultframecolors.edges,[]); draw3dframe(canvas,rect2,-1,defaultframecolors.edges,[]);
end; end;
if pos = ip_left then begin if pos = ip_left then begin
inc(arect.x,menucheckboxwidth); inc(arect.x,widthextend);
end; end;
dec(arect.cx,menucheckboxwidth); dec(arect.cx,widthextend);
if shs_checked in info.state then begin if shs_checked in info.state then begin
if shs_disabled in info.state then begin if shs_disabled in info.state then begin
align1:= [al_xcentered,al_ycentered,al_grayed]; align1:= [al_xcentered,al_ycentered,al_grayed];
......
...@@ -1732,7 +1732,7 @@ type ...@@ -1732,7 +1732,7 @@ type
end; end;
ppidinfoty = ^pidinfoty; ppidinfoty = ^pidinfoty;
function checkproc(awinid: winidty; po: ptrint): bool; stdcall; function checkproc(awinid: hwnd; po: ptrint): bool; stdcall;
var var
pid: integer; pid: integer;
int1: integer; int1: integer;
...@@ -3076,7 +3076,7 @@ function getchildren(child: hwnd; data: lparam): winbool; stdcall; ...@@ -3076,7 +3076,7 @@ function getchildren(child: hwnd; data: lparam): winbool; stdcall;
begin begin
with penumchildinfoty(data)^ do begin with penumchildinfoty(data)^ do begin
if gui_getparentwindow(child) = parent then begin if gui_getparentwindow(child) = parent then begin
additem(childlist,child,count); additem(childlist,winidty(child),count);
end; end;
end; end;
result:= true; 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, See the file COPYING.MSE, included in this distribution,
for details about the copyright. for details about the copyright.
...@@ -423,7 +423,15 @@ begin ...@@ -423,7 +423,15 @@ begin
checkboxwidth:= menucheckboxwidth; checkboxwidth:= menucheckboxwidth;
checkboxheight:= menucheckboxheight; checkboxheight:= menucheckboxheight;
if checkboxframetemplate <> nil then begin 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; checkboxwidth:= checkboxwidth + size1.cx;
checkboxheight:= checkboxheight + size1.cy; checkboxheight:= checkboxheight + size1.cy;
end; 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