resources icon indicating copy to clipboard operation
resources copied to clipboard

Changing sort order makes listview scroll at random position.

Open vdualb opened this issue 1 year ago • 6 comments

Is there an existing issue for this?

  • [X] I searched the existing issues and did not find anything similar.

Current Behavior

Changing sort order in Processes or Apps tabs makes listview scroll at random position.

Expected Behavior

After changing sort order listview should be scroll at the begining.

Steps To Reproduce

  1. Go to processes tab
  2. Change ID sort order
  3. See that listview was scrolled to the end

Environment

Resources 1.3.0 from flathub
f39

Anything else?

Screencast: https://github.com/nokyan/resources/assets/70429241/7999d0e4-d145-480a-a4bc-8e0820c5dc80

vdualb avatar Mar 03 '24 14:03 vdualb

Hi, I'm using GTK's fuctions for changing the sort order. Atleast in my testing, it's not quite random, it tries to keep the selected item (or the topmost item if no item is selected) at the same window-relative position.

nokyan avatar Mar 06 '24 10:03 nokyan

hm, indeed, i didn't notice it. but i don't see a use case for such behavior. in my opinion the purpose of sorting is to see top elements. In case of Resources, to see processes that are using the most cpu, memory, bandwidth etc. that's why scrolling to the top after changing sort order looks like a better idea to me.

vdualb avatar Mar 06 '24 11:03 vdualb