mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 13:39:11 +02:00
fix combobox placement issue in OI (strengthen condition to check for left or top resizing)
git-svn-id: trunk@6979 -
This commit is contained in:
parent
cc648ec617
commit
abba51a957
@ -859,7 +859,8 @@ begin
|
|||||||
|
|
||||||
if (MinWidth > 0) and (NewWidth < MinWidth) then
|
if (MinWidth > 0) and (NewWidth < MinWidth) then
|
||||||
begin
|
begin
|
||||||
if NewLeft <> Left then
|
// right kept position ? interpret as resizing left border
|
||||||
|
if (NewLeft+NewWidth) = (Left+Width) then
|
||||||
begin
|
begin
|
||||||
Dec(NewLeft, MinWidth - NewWidth);
|
Dec(NewLeft, MinWidth - NewWidth);
|
||||||
if NewLeft < Left then
|
if NewLeft < Left then
|
||||||
@ -868,7 +869,7 @@ begin
|
|||||||
NewWidth:= MinWidth
|
NewWidth:= MinWidth
|
||||||
end else if (MaxWidth > 0) and (NewWidth > MaxWidth) then
|
end else if (MaxWidth > 0) and (NewWidth > MaxWidth) then
|
||||||
begin
|
begin
|
||||||
if NewLeft <> Left then
|
if (NewLeft+NewWidth) = (Left+Width) then
|
||||||
begin
|
begin
|
||||||
Inc(NewLeft, NewWidth - MaxWidth);
|
Inc(NewLeft, NewWidth - MaxWidth);
|
||||||
if NewLeft > Left then
|
if NewLeft > Left then
|
||||||
@ -879,7 +880,8 @@ begin
|
|||||||
|
|
||||||
if (MinHeight > 0) and (NewHeight < MinHeight) then
|
if (MinHeight > 0) and (NewHeight < MinHeight) then
|
||||||
begin
|
begin
|
||||||
if NewTop <> Top then
|
// bottom kept position ? interpret as resizing bottom border
|
||||||
|
if (NewTop+NewHeight) = (Top+Height) then
|
||||||
begin
|
begin
|
||||||
Dec(NewTop, MinHeight - NewHeight);
|
Dec(NewTop, MinHeight - NewHeight);
|
||||||
if NewTop < Top then
|
if NewTop < Top then
|
||||||
@ -888,7 +890,7 @@ begin
|
|||||||
NewHeight:= MinHeight
|
NewHeight:= MinHeight
|
||||||
end else if (MaxHeight > 0) and (NewHeight > MaxHeight) then
|
end else if (MaxHeight > 0) and (NewHeight > MaxHeight) then
|
||||||
begin
|
begin
|
||||||
if NewTop <> Top then
|
if (NewTop+NewHeight) = (Top+Height) then
|
||||||
begin
|
begin
|
||||||
Inc(NewTop, NewHeight - MaxHeight);
|
Inc(NewTop, NewHeight - MaxHeight);
|
||||||
if NewTop > Top then
|
if NewTop > Top then
|
||||||
@ -3497,6 +3499,9 @@ end;
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.251 2005/03/18 07:40:18 micha
|
||||||
|
fix combobox placement issue in OI (strengthen condition to check for left or top resizing)
|
||||||
|
|
||||||
Revision 1.250 2005/03/07 21:59:44 vincents
|
Revision 1.250 2005/03/07 21:59:44 vincents
|
||||||
changed hexstr(cardinal()) for pointers to dbgs() and other 64-bits fixes from Peter Vreman
|
changed hexstr(cardinal()) for pointers to dbgs() and other 64-bits fixes from Peter Vreman
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user