[Suggestion] reading long lines in code blocks
See this thread "http://developer.qt.nokia.com/forums/viewthread/1640/":http://developer.qt.nokia.com/forums/viewthread/1640/
You will see a long block of code and long lines in between. Now reading is this not very user friendly. I have to scroll down on the page, scroll to the right, read the long line, scroll down again, scroll left and so on :( Not very user friendly
So can one of the below 2 suggestions be implemented to overcome this ..
Option 1: Provide a pan feature, so user can just hold mouse down and pan to left or right in the code block
Option 2: Mandatory word wrap to avoid scroll right option, but code blocks will not be very readable
I'd prefer Option 1... what say?
I think this is partly up to the poster as well. Everybody here knows that the code div will start scrolling at some point and if you want your code to be readable to everybody you just have to wrap at say 80 characters.
But to choose from the options you gave, I prefer the mandatory wrap. Scroll & pan is to me no different than scroll & scroll.
pan would just be much easier, pan right-read- pan left to get back
scroll has many more steps .. scroll browser down, scroll horiz right, scroll browser up, read, scroll browser down, scroll horiz left, scroll browser up :(
but I agree, just mandatory word wrap would be so much easier to implement :)
I would prefer to implement both. Word wrap to see everything, and additionally - when analyzing something like the link in the original post - the possibility to enlarge the code section.
Maybe with a user preference in the settings page to choose between word wrap and scroll bars?
Also, in a standard browser window the code section is hardly 80 characters wide.
Well it probably depends on your browser as well. Some programs (and some browsers probably also) allow sideways scrolling through the wheel (push it to the side), but Opera for one doesn't do this at the moment. Haven't checked other browsers. When focus is on the code div I can use the arrows to scroll sideways though.
That works with Safari on Mac too, but still I prefer enlarging the code view, I personally don't like "moving lines" :-)
maxvanceffer last edited by
Maybe make collapsing of functions just like in Qt Creator editor ?
We're using a 3rd party tool for the syntax highlighting: "http://alexgorbatchev.com/SyntaxHighlighter/":http://alexgorbatchev.com/SyntaxHighlighter/
We will have to leave feature development for that module to them, but after surfing the forum there I found a suggested CSS change for wrapping long lines. We shall give it a spin. I'm sure we will run into IE compatibility issues, but let's see.
Mandatory word wrap is more clear than any kind of block system; for me main problem is actually having to move the div to different position to read part of the code.
In side note, Opera also support vertical panning, and has supported it very long. You only need to enable it, like on Linux, you need to enable the panning in first place.
[quote author="mariusg" date="1289223937"]I found a suggested CSS change for wrapping long lines. We shall give it a spin. I'm sure we will run into IE compatibility issues, but let's see.[/quote]Do sane people still use IE? (couldn't help myself there...)
[quote author="Smar" date="1289228315"]In side note, Opera also support vertical panning, and has supported it very long. You only need to enable it, like on Linux, you need to enable the panning in first place.[/quote]Right. I wasn't aware of that.
[quote author="Franzk" date="1289230740"]Do sane people still use IE? (couldn't help myself there...)[/quote]
No! but there are some insane websites still out there :(
I actually have this t-shirt :)
But seriously, we still have many IE6 visits to qt.nokia.com where we support it. Here on DevNet we don't support IE6 but we do our best for IE7+.
good t-shirt ! heh heh