Allow full cursor height (it is not chopped when line spacing is not zero). This fixes issues with misbehaving fonts.
This commit is contained in:
@@ -345,6 +345,7 @@ TerminalDisplay::TerminalDisplay(QQuickItem *parent)
|
||||
,mMotionAfterPasting(NoMoveScreenWindow)
|
||||
,m_font("Monospace", 12)
|
||||
,m_color_role(QPalette::Background)
|
||||
,m_full_cursor_height(false)
|
||||
{
|
||||
// terminal applications are not designed with Right-To-Left in mind,
|
||||
// so the layout is forced to Left-To-Right
|
||||
@@ -656,7 +657,7 @@ void TerminalDisplay::drawCursor(QPainter& painter,
|
||||
bool& invertCharacterColor)
|
||||
{
|
||||
QRect cursorRect = rect;
|
||||
cursorRect.setHeight(_fontHeight - _lineSpacing - 1);
|
||||
cursorRect.setHeight(_fontHeight - ((m_full_cursor_height) ? 0 : _lineSpacing) - 1);
|
||||
|
||||
if (!_cursorBlinking)
|
||||
{
|
||||
|
||||
@@ -95,7 +95,9 @@ class KONSOLEPRIVATE_EXPORT TerminalDisplay : public QQuickPaintedItem
|
||||
Q_PROPERTY(int scrollbarMaximum READ getScrollbarMaximum NOTIFY scrollbarParamsChanged )
|
||||
Q_PROPERTY(int scrollbarMinimum READ getScrollbarMinimum NOTIFY scrollbarParamsChanged )
|
||||
Q_PROPERTY(QSize fontMetrics READ getFontMetrics NOTIFY changedFontMetricSignal )
|
||||
|
||||
Q_PROPERTY(bool enableBold WRITE setBoldIntense)
|
||||
Q_PROPERTY(bool fullCursorHeight WRITE setFullCursorHeight)
|
||||
|
||||
public:
|
||||
/** Constructs a new terminal display widget with the specified parent. */
|
||||
@@ -879,6 +881,7 @@ private:
|
||||
QPalette m_palette;
|
||||
QPalette::ColorRole m_color_role;
|
||||
KSession *m_session;
|
||||
bool m_full_cursor_height;
|
||||
|
||||
QFont font() const { return m_font; }
|
||||
|
||||
@@ -907,6 +910,8 @@ private:
|
||||
|
||||
QSize getFontMetrics();
|
||||
|
||||
void setFullCursorHeight(bool val) { m_full_cursor_height = val; }
|
||||
|
||||
public:
|
||||
static void setTransparencyEnabled(bool enable)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user