- attached issue-1.PNG
horizontal scroll range too small in diff in workbench
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)
-
-
- attached issue-1-linux.png
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
-
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.
-
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.
-
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?
-
Hmm. Not sure if pt is really unusable.
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qfont.html#details
writes
"It is possible to set the height of characters shown on the screen to a specified number of pixels with setPixelSize(); however using setPointSize() has a similar effect and provides device independence."
(emphasis added)
-
- changed status to open
-
assigned issue to
Hitting [end] also expands the scrollbar. Seemingly permanently.
-
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, buttext_edit.setHtml('<small>foobar</small>')
was okay. -
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.
-
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.
-
- changed status to resolved
the original issue was a side-effect of QScintilla. We now default to wrapping large lines so this no longer a problem.
-
- 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.
-
- 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.
- Log in to comment