Author Topic: Miscalculation of height in SongTree  (Read 2074 times)

trasdahl

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Miscalculation of height in SongTree
« on: March 10, 2012, 19:10:10 »
Is it just my layout, or is there a slight miscalculation of the height in a SongTree when you scroll?

Symptom: I have a long list of songs in a SongTree widget. I drag the scrollbar up or down. When I let go of the scrollbar, the list is displaced, compared to where it was just before I let go of the scrollbar. The list always shifts upwards, or equivalently: gmb always scrolls further down than I intended.

Understandable? :)

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Miscalculation of height in SongTree
« Reply #1 on: March 18, 2012, 05:19:27 »
I see something like that sometimes, but it sometimes move up, sometimes down.
SongTree update the view when getting a value_changed signal from the gtkadjustment object associated with the scrollbars, and when the problem happens, simply releasing the mouse button cause the signal to be triggered, with a different value.
(I remember noticing that once a long time ago)

I think the problem is that when dragging the scrollbar, the gtkadjustment value is updated with the previous value, and only once the button is released the correct value is set, which most of the time is the same, but sometimes not, which cause an update of the value and a scroll up or down.

It seems the behavior is the same for the SongList, so I'm not sure it's a gmb bug, and anyway it is not very annoying.