Luiz Americo Pereira Camara пишет:
While debugging scrolling bugs in LCL i found that ClientToScreen acts differently according to the widget set.

These are the behaviors:

1) The returned value is related to the actual position, i.e., it does not consider the scroll offset. If you pass Point(0,0) the value will be the same regardless of the scroll position. (Gtk1)

2) The returned value is related to the virtual position, i.e, it takes into account the scroll offset. If you pass Point(0, 0) the value changes inversely to scrollbar position. (Gtk2) 3) The returned value is related to the virtual position, i.e, it takes into account the scroll offset. If you pass Point(0, 0) the value changes the same amount of scrollbar position. (Win32)

4) Nothing. Qt has no visible scrollbars so...

Notes:

Delphi does the same as (1)/Gtk1

(3) is clearly buggy.

Between (1) and (2) is a design decision.


Attached is a patch that makes win32 acts like (2)/gtk2. It changes the offset signal when calculating the LCL bounds. With the change it becomes consistent with the TCustomGroupBox signal convention (LCL bounds at Right/Down of win32 +, at Left/Up -).
It also fixes the scrolling paint and setcursor of non TWincontrol.


Thanks for patch. I changed things to repair GetClientBounds in r12351 and probably this caused errors after. I will look at scrolling before and after your patch and commit it if behaviour will be better.

Best regards,
Paul Ishenin.

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to