mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 20:10:27 +02:00
Improves csfSunken for checkbox and radio button
git-svn-id: trunk@34475 -
This commit is contained in:
parent
d0116de29b
commit
c6111bd52c
@ -1072,12 +1072,12 @@ var
|
||||
NewState: TCDControlState;
|
||||
begin
|
||||
NewState := FState;
|
||||
if csfSunken in FState then NewState := FState - [csfSunken];
|
||||
if csfSunken in FState then NewState := NewState - [csfSunken];
|
||||
|
||||
// For grouped buttons, call DoButtonUp for all other buttons on the same parent
|
||||
if FIsGrouped then
|
||||
begin
|
||||
NewState := FState + [csfOn] - [csfOff, csfPartiallyOn];
|
||||
NewState := NewState + [csfOn] - [csfOff, csfPartiallyOn];
|
||||
if Parent <> nil then
|
||||
begin
|
||||
for i := 0 to Parent.ControlCount - 1 do
|
||||
@ -1097,18 +1097,18 @@ begin
|
||||
if FAllowGrayed then
|
||||
begin
|
||||
if csfOn in FState then
|
||||
NewState := FState + [csfOff] - [csfOn, csfPartiallyOn]
|
||||
NewState := NewState + [csfOff] - [csfOn, csfPartiallyOn]
|
||||
else if csfPartiallyOn in FState then
|
||||
NewState := FState + [csfOn] - [csfOff, csfPartiallyOn]
|
||||
NewState := NewState + [csfOn] - [csfOff, csfPartiallyOn]
|
||||
else
|
||||
NewState := FState + [csfPartiallyOn] - [csfOn, csfOff];
|
||||
NewState := NewState + [csfPartiallyOn] - [csfOn, csfOff];
|
||||
end
|
||||
else
|
||||
begin
|
||||
if csfOn in FState then
|
||||
NewState := FState + [csfOff] - [csfOn]
|
||||
NewState := NewState + [csfOff] - [csfOn]
|
||||
else
|
||||
NewState := FState + [csfOn] - [csfOff];
|
||||
NewState := NewState + [csfOn] - [csfOff];
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -536,7 +536,7 @@ function TWidgetSet.MoveWindowOrgEx(dc: hdc; dX,dY: Integer): boolean;
|
||||
var
|
||||
P: TPoint;
|
||||
lResult: Integer;
|
||||
Begin
|
||||
begin
|
||||
lResult := GetWindowOrgEx(dc, @P);
|
||||
if lResult <> 0 then
|
||||
Result:=SetWindowOrgEx(dc, P.x-dX, P.y-dY, @P)
|
||||
|
Loading…
Reference in New Issue
Block a user