changeset 24133:d52aa3a2794a

fix link underline position in gui terminal * TerminalView.cpp (paintFilters): underline extended by 1 pixel to the right and ignoring font descends
author Torsten <mttl@mailbox.org>
date Sun, 08 Oct 2017 18:47:48 +0200
parents 4e97a92d16c0
children 046593530e95
files libgui/qterminal/libqterminal/unix/TerminalView.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/qterminal/libqterminal/unix/TerminalView.cpp	Thu Jul 14 22:24:05 2016 -0700
+++ b/libgui/qterminal/libqterminal/unix/TerminalView.cpp	Sun Oct 08 18:47:48 2017 +0200
@@ -1206,9 +1206,9 @@
             {
               QFontMetrics metrics(font());
 
-              // find the baseline (which is the invisible line that the characters in the font sit on,
-              // with some having tails dangling below)
-              int baseline = r.bottom() - metrics.descent();
+              // find the baseline (which is the invisible line that the
+              // characters in the font sit on
+              int baseline = r.bottom() + 1;
               // find the position of the underline below that
               int underlinePos = baseline + metrics.underlinePos();
 
@@ -1217,7 +1217,7 @@
                   if (spot->type () == Filter::ErrorLink)
                     painter.setPen (QColor (255,0,0));
                   painter.drawLine (r.left(), underlinePos,
-                                    r.right(), underlinePos);
+                                    r.right() + 2, underlinePos);
                 }
             }
           // Marker hotspots simply have a transparent rectanglular shape