Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [Suggestion] reading long lines in code blocks

    Qt.io webservices
    5
    13
    4017
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      Guest last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • F
        Franzk last edited by

        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.

        "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • ?
          Guest last edited by

          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 :)

          1 Reply Last reply Reply Quote 0
          • G
            goetz last edited by

            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.

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply Reply Quote 0
            • F
              Franzk last edited by

              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.

              "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply Reply Quote 0
              • G
                goetz last edited by

                That works with Safari on Mac too, but still I prefer enlarging the code view, I personally don't like "moving lines" :-)

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply Reply Quote 0
                • M
                  maxvanceffer last edited by

                  Maybe make collapsing of functions just like in Qt Creator editor ?

                  1 Reply Last reply Reply Quote 0
                  • M
                    mgran last edited by

                    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.

                    Project Manager - Qt Development Frameworks

                    1 Reply Last reply Reply Quote 0
                    • S
                      Smar last edited by

                      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.

                      1 Reply Last reply Reply Quote 0
                      • F
                        Franzk last edited by

                        [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.

                        "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

                        http://www.catb.org/~esr/faqs/smart-questions.html

                        1 Reply Last reply Reply Quote 0
                        • ?
                          Guest last edited by

                          [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 :(

                          1 Reply Last reply Reply Quote 0
                          • M
                            mgran last edited by

                            I actually have this t-shirt :)

                            "http://atendesigngroup.spreadshirt.com/men-s-black-ie6funeral-com-t-shirt-A5715734/customize/color/2":http://atendesigngroup.spreadshirt.com/men-s-black-ie6funeral-com-t-shirt-A5715734/customize/color/2

                            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+.

                            Project Manager - Qt Development Frameworks

                            1 Reply Last reply Reply Quote 0
                            • ?
                              Guest last edited by

                              good t-shirt ! heh heh

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post