Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-05

Can someone test on QT / MacOS , please? (scrollbar handling in synEdit)

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

http://bugs.freepascal.org/view.php?id=15765

Problem is that SynEdit at current does not update the scrollbars, if they are hidden.

But at least on windows on GTK2 the new position is alays based on the position of the old hidden scrollbar.
=> therefore the new position does not move.

On windows and GTK2 (with tricks) I can update the hidden scrollbar => and the bug disappears.

I have no ideas of the side effects this may have on other systems (QT, Mac, gtk1)

To test pleas go to SynEdit.pp   at the end of
   procedure TCustomSynEdit.UpdateScrollBars;

line 4346

     //if sfVertScrollbarVisible in fStateFlags then begin
       ScrollInfo.nPage := LinesInWindow;
       ScrollInfo.nPos := FFoldedLinesView.TextIndexToViewPos(TopLine-1);
       SetScrollInfo(Handle, SB_VERT, ScrollInfo, True);
// insert next line
       ShowScrollBar(Handle, SB_Vert, sfVertScrollbarVisible in
fStateFlags);
     //end;

comment out the 2 lines commented out in the above snippet (there is a similar block for horiz-scroll, but don't worry)
and insert the extra line

Then test the attached app.

the extra line is needed for gtk2 at current, but therefore it must work for others too, or gtk2 can not be fixed that way....

If you can additionally test it withou the extra line (only comment out the IF) => would be fantastic

thanks
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SynEdit_mouse_wheel.rar
Type: application/octet-stream
Size: 4160 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100509/f65eef26/attachment-0001.obj>

Reply by email

Juha Manninen
to Martin

Hi,

This is for QT linux:

1. IF commented out and ShowScrollBar added.
With your changes it works perfectly.
Scrollbar is hidden initially but mouse scrolling works ok.

2. IF commented out but no ShowScrollBar.
Scrollbar is visible initially but it doesn't hide until you click "Show" first. After that it works.

3. Original code with IF and no ShowScrollBar.
Scrollbar is hidden initially and mouse wheel scrolls only downwards. After "Show"ing it once it behaves ok.

Juha

Reply by email