gtk: apply scroll subtraction only for widgets with embedded scroll area like TCustomForm

git-svn-id: trunk@20181 -
This commit is contained in:
paul 2009-05-25 03:15:00 +00:00
parent 9eaaa681d2
commit 20199f3f18

View File

@ -4561,8 +4561,7 @@ end;
function SubtractScoll(AWidget: PGtkWidget; APosition: TPoint): TPoint;
begin
Result := APosition;
if not GTK_IS_SCROLLED_WINDOW(AWidget) then
AWidget := gtk_object_get_data(PGTKObject(AWidget), odnScrollArea);
AWidget := gtk_object_get_data(PGTKObject(AWidget), odnScrollArea);
if GTK_IS_SCROLLED_WINDOW(AWidget) then
begin
dec(Result.x, Round(gtk_scrolled_window_get_hadjustment(PGtkScrolledWindow(AWidget))^.value));