Gtk2: fixed TScrollingWinControl positions update.issue #25909

git-svn-id: trunk@44504 -
This commit is contained in:
zeljko 2014-03-24 11:14:49 +00:00
parent 98a3e1a08c
commit 97c59105fe
2 changed files with 9 additions and 3 deletions

View File

@ -3153,7 +3153,7 @@ var
Widget: PGTKWidget;
AValue: gDouble;
begin
// used only by TCustomForm ! #issue #25479
// used only by TScrollingWinControl ! #issue #25479
Widget := PGTKWidget(ARange);
if G_OBJECT_TYPE(ARange) = gtk_hscrollbar_get_type then
Msg.Msg := LM_HSCROLL
@ -3186,11 +3186,11 @@ begin
// do not send messages to LCL if we are already synced.
if (Msg.Msg = LM_VSCROLL) and
(TCustomForm(PWidgetInfo(Data)^.LCLObject).VertScrollBar.Position = Msg.Pos) then
(TScrollingWinControl(PWidgetInfo(Data)^.LCLObject).VertScrollBar.Position = Msg.Pos) then
exit
else
if (Msg.Msg = LM_HSCROLL) and
(TCustomForm(PWidgetInfo(Data)^.LCLObject).HorzScrollBar.Position = Msg.Pos) then
(TScrollingWinControl(PWidgetInfo(Data)^.LCLObject).HorzScrollBar.Position = Msg.Pos) then
exit;
DeliverMessage(PWidgetInfo(Data)^.LCLObject, Msg);

View File

@ -871,6 +871,12 @@ begin
TGCallback(@Gtk2RangeScrollCB), WidgetInfo);
g_signal_connect(Scrolled^.vscrollbar, 'change-value',
TGCallback(@Gtk2RangeScrollCB), WidgetInfo);
g_signal_connect(Scrolled^.hscrollbar, 'value-changed',
TGCallback(@Gtk2RangeValueChanged), WidgetInfo);
g_signal_connect(Scrolled^.vscrollbar, 'value-changed',
TGCallback(@Gtk2RangeValueChanged), WidgetInfo);
g_signal_connect(Scrolled^.hscrollbar, 'button-press-event',
TGCallback(@Gtk2RangeScrollPressCB), WidgetInfo);
g_signal_connect(Scrolled^.hscrollbar, 'button-release-event',