diff --git a/components/tvplanit/source/vpnavbar.pas b/components/tvplanit/source/vpnavbar.pas index 61bdca6dc..12047725d 100644 --- a/components/tvplanit/source/vpnavbar.pas +++ b/components/tvplanit/source/vpnavbar.pas @@ -1619,7 +1619,7 @@ begin SpaceTop := TVpNavBtnItem(Folder.Items[I - 1]).FLabelRect.Bottom + 1; SpaceBottom := TVpNavBtnItem(Folder.Items[I]).FIconRect.Top - 1; if (Y >= SpaceTop) and (Y <= SpaceBottom) then begin - if SpaceTop - SpaceBottom < 6 then + if SpaceBottom - SpaceTop > 6 then nabDropY := SpaceTop + (SpaceBottom - SpaceTop) div 2 else nabDropY := SpaceTop + 3; diff --git a/components/tvplanit/source/vpnavbarpainter.pas b/components/tvplanit/source/vpnavbarpainter.pas index ac470d38c..4597d3300 100644 --- a/components/tvplanit/source/vpnavbarpainter.pas +++ b/components/tvplanit/source/vpnavbarpainter.pas @@ -156,6 +156,7 @@ var h: Integer; R: TRect; dx, dy: Integer; + buttonDistance: Integer; {$IFDEF LCL} {$IF LCL_FullVersion >= 1090000} imgres: TScaledImageListResolution; @@ -170,6 +171,7 @@ begin // horizontally dy := ScaleY(LARGE_ICON_TEXT_DISTANCE, DesignTimeDPI); dx := ScaleX(SMALL_ICON_TEXT_DISTANCE, DesignTimeDPI); + buttonDistance := ScaleY(BUTTON_DISTANCE, DesignTimeDPI); { If an image list is assigned then use the image size. If no image list is assinged then assume a 32 x 32 image size. @@ -194,7 +196,7 @@ begin exit; // Distance of top-most icon to the last upper button - Inc(CurPos, ScaleY(BUTTON_DISTANCE, DesignTimeDPI)); + Inc(CurPos, buttonDistance); with nabItemsRect^ do begin Top := CurPos;