mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 09:39:13 +02:00
Gtk3: fixed crash in TGtk3ScrolledWin.
This commit is contained in:
parent
b90ac329b3
commit
318f3825b7
@ -1649,13 +1649,15 @@ begin
|
|||||||
DebugLn('Gtk3ScrolledWindowScrollEvent: Use PGtkWidget^.set_events(GDK_DEFAULT_EVENTS_MASK) in CreateWidget to prevent GTK3 bug with GDK_SCROLL_SMOOTH')
|
DebugLn('Gtk3ScrolledWindowScrollEvent: Use PGtkWidget^.set_events(GDK_DEFAULT_EVENTS_MASK) in CreateWidget to prevent GTK3 bug with GDK_SCROLL_SMOOTH')
|
||||||
else
|
else
|
||||||
DebugLn('Gtk3ScrolledWindowScrollEvent: Unknown scroll direction: ', dbgs(AEvent^.scroll.direction));
|
DebugLn('Gtk3ScrolledWindowScrollEvent: Unknown scroll direction: ', dbgs(AEvent^.scroll.direction));
|
||||||
|
Exit;
|
||||||
end;
|
end;
|
||||||
//Exit;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
case Msg.Msg of
|
case Msg.Msg of
|
||||||
LM_VSCROLL: Range := PGtkRange(AScrollWindow^.get_vscrollbar);
|
LM_VSCROLL: Range := PGtkRange(AScrollWindow^.get_vscrollbar);
|
||||||
LM_HSCROLL: Range := PGtkRange(AScrollWindow^.get_hscrollbar);
|
LM_HSCROLL: Range := PGtkRange(AScrollWindow^.get_hscrollbar);
|
||||||
|
else
|
||||||
|
raise Exception.CreateFmt('Gtk3ScrolledWindowScrollEvent: Untranslated event %d !',[Ord(AEvent^.scroll.direction)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AValue := power(Range^.adjustment^.page_size, 2 / 3);
|
AValue := power(Range^.adjustment^.page_size, 2 / 3);
|
||||||
|
Loading…
Reference in New Issue
Block a user