Skip to content

Commit

Permalink
Merge pull request #12478 from ronso0/lib-comment-editor-fix
Browse files Browse the repository at this point in the history
multi-line delegate: fix bg color, Qt6 on Linux
  • Loading branch information
daschuer authored Jan 1, 2024
2 parents 5b4abf7 + b413337 commit 17fd47b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/library/multilineeditdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ MultiLineEditor::MultiLineEditor(QWidget* pParent,
document()->setDocumentMargin(0);
setContentsMargins(0, 0, 0, 0);
setCenterOnScroll(false);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// Paint the entire rectangle, i.e. expand document background in order to
// cover all underlying index text. Seems to be required for one-liners on macOS.
// Disabled for Qt6 since it does the exact opposite, i.e. the bottom margin
// is painted with the OS theme's background color
setBackgroundVisible(true);
#endif
// Add event filter to catch right-clicks and key presses, see eventFilter()
installEventFilter(this);

Expand Down

0 comments on commit 17fd47b

Please sign in to comment.