Issue #1 open

horizontal scroll range too small in diff in workbench

Adrian Buehlmann
created an issue

Using revision 79af6205f5c8.

Open the thg repo itself in workbench ('thg log') and look at the diff of d5646ce28cf4.

The diff can't be scrolled to the full right end of the diff with the scroller on the bottom right, so it's impossible to see the full line of the diff of the file contrib/win32/setup.cfg.

Seen on Windows 7 x64 with PyQt GPL 4.7.3-2 for Python v2.6

Comments (13)

  1. Yuya Nishihara

    FYI, same on Linux.

    But once selected text by mouse, scroll area happened to become wider.

    ii  libqtcore4                              4:4.6.2-4
    ii  libqscintilla2-5                        2.4.3-1
    ii  python-qscintilla2                      2.4.3-1
    ii  python-qt4                              4.7.3-1
    ii  python2.5                               2.5.5-6
    
    % uname -a
    Linux gimlet 2.6.32-3-amd64 #1 SMP Wed Feb 24 18:07:42 UTC 2010 x86_64 GNU/Linux
    
  2. Adrian Buehlmann reporter

    Thanks for the screenshot.

    Side remarks (unrelated to this issue): the font in the diff pane looks rather awful. And the font in the changeset header seems much larger than on Windows. Sigh.

  3. Yuya Nishihara

    And the font in the changeset header seems much larger than on Windows. Sigh.

    Possibly because of screen resolution:

    % xdpyinfo | grep resolution
      resolution:    112x112 dots per inch
    

    On Windows, in most cases, we use 96x96 dpi and 9pt for text font. But on Linux, screen dpi is calculated from actual size, and I set 8pt or 7pt for text font.

  4. Adrian Buehlmann reporter

    Aha. So we should probably research how to set font sizes in a portable manner in Qt programming. "pt" metric seems unusable then.

    A 8pt or even 7pt font setting on Windows is almost illegible. I think I set the font in Qt Designer without knowing better. I am on Windows. IIRC, there was just some fancy settings dialog somewhere in Qt Designer.

    For web pages the standard is to use "em". What's the standard trick for Qt programming?

  5. Yuya Nishihara

    I'm not sure how to set font size by platform-independent manner, but it's pretty easy not to set font size, but set only font family. (For QtDesigner, click small button with arrow icon, which is placed on right of font-size input box)

    And possibly we can use '<small>' or '<big>' tag for rich-text-aware widgets.

    I tried text_edit.setStyleSheet('font-size: small;') and it didn't work, but text_edit.setHtml('<small>foobar</small>') was okay.

  6. Adrian Buehlmann reporter

    For the Windows platform it is pretty clear that we do need to set exact font size in GUI design. GUI design is not like web pages where the user is able to zoom the page.

  7. Yuya Nishihara

    Yes, maybe we need optional font settings like one gtk-tortoisehg already has. But I think most widgets are reasonable with the default font size, which is 9pt on Windows.

  8. Miquel Burns
    • changed status to new

    I just noticed this bug with 2.1.1 while using thg status. Long line is about 630 characters.

    Line is long because of laziness on my end though.

  9. Steve Borho
    • changed status to open

    If you noticed the scrollbar cannot reach the end of the line, this is a QScintilla2 "feature". You have to enable one of the wrap modes to view really long lines.

  10. Log in to comment