Syllable Forum Index Syllable
Syllable Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FileBrowser Bug.
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Syllable Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
chamel



Joined: 01 May 2010
Posts: 18

PostPosted: Tue May 18, 2010 10:44 am    Post subject: Reply with quote

File iconview.2.cpp is bad it has bug, I have re-uploaded it http://www.mediafire.com/file/3nz4jizzd5y/iconview.cpp . Please excuse me for this inconvinience.
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Thu May 27, 2010 9:33 pm    Post subject: Reply with quote

In the case when you have icons in a diagonal line from top-right to bottom-left, eg:

[ ] [ ] [ 1 ]
[ ] [ 2 ] [ ]
[ 3 ] [ ] [ ]

[ ] = empty space, [n] = icon

iconview.2.cpp has the undesirable behaviour that the up and right arrows actually move you down-left (and vice-versa). Example, if you are at icon 2, if you press up or right (expecting to move to 1) you actually move to 3, and if you press down or left you move to 1. Further, if you are at 1, pressing down or left doesn't move you at all.

Thoughts?
Back to top
View user's profile Send private message Visit poster's website
chamel



Joined: 01 May 2010
Posts: 18

PostPosted: Sat May 29, 2010 5:55 am    Post subject: Reply with quote

Before trying to remove all bugs in original algorithm, I was observing behavior of navigation in WindowsOS, HaikuOS(qemu), they don't have wrapping at all. Haiku is vulnarable to chessboard effect, Windows is good at handling navigaton although sometimes it is not correct to row/column navigation with non-ordered icons - it chooses closest icon, when logicaly next icon is more distant then chosen one. It is true that in my current algorithm behavior you described is present - it is due to wrapping when there are no icons in virtual row/column, navigation up in this case chooses icon lowest to the left, nav. right upper right, nav. left below rightmost, nav.right above leftmost.
This thing can be solved by advancing my algorithm, but this will be a lot of thinking and very complex.
The only solution is to use the first part of original algorithm where a distance was calculated and borders for icons where defined. We will write that part with borders 2 times smaller then in original(y=x;x=y). These borders in original algorithm are too wide, they cover surface of 360 grades and intersection of 180 grades. The proposed implementation will cover 360 of surface with ~4 grade of intersection. The wider intersection is, the bigger possibility that same icon can be selected by two different actions from current selection. And no wrapping as it can produce not correct visual effects. It will be more similar to Windows navigation
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2200
Location: Friesland

PostPosted: Sat May 29, 2010 6:44 am    Post subject: Reply with quote

I would really like to keep the wrapping. I always find it very annoying that it doesn't work in other systems.
Back to top
View user's profile Send private message Visit poster's website
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Sat May 29, 2010 6:55 pm    Post subject: Reply with quote

One idea might be to calculate a 'effective distance' for each icon that is in the appropriate region (between y = +- x, or y = +-2x or whatever works best in practice), but give a larger distance to those icons that are not in the same row. That is, if the new icon is between y = +- x of the original but not in the same row, set its distance to be C times the geometrical distance for some constant C. That way, icons in the same row will naturally be favoured for selection, but chessboard-oriented icons still have a chance of being chosen. If we use C < sqrt(2) then the chessboard icon would be selected, if C > sqrt(2) then the next icon in the row will be selected.

I wrote the previous algorithm. IIRC I used bounds of y = +-2x because I thought that it gave better behaviour in practice than y = +- x. It does mean that some icons can be selected in two directions, but that is acceptable. It's all open to discussion though Smile
Back to top
View user's profile Send private message Visit poster's website
chamel



Joined: 01 May 2010
Posts: 18

PostPosted: Tue Jun 01, 2010 12:55 pm    Post subject: Reply with quote

I think we should drop idea to implement row/column navigation in non-ordered view, it requires exlusion (or favoring) of some elements which will lead to undisired behavior/bug. It is better to stay with original algorithm. And wrapping we can have it, in iconview.2.cpp it is working, although some testing is required.
Back to top
View user's profile Send private message
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Thu Jun 10, 2010 1:14 am    Post subject: Reply with quote

It's one of those things where there is no perfect solution :S I like your idea of row/column navigation though. If you want to play around a bit more, and experiment with some other variations, please do! I'd be happy to try out any more patches.
Back to top
View user's profile Send private message Visit poster's website
Morph
The Knights of Syllable


Joined: 18 Oct 2007
Posts: 316
Location: Australia

PostPosted: Tue Jun 29, 2010 4:45 am    Post subject: Reply with quote

I checked the iconview.cpp.2 algorithm into CVS, so it can get some testing on upcoming development builds.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Syllable Forum Index -> Bugs All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group