Mercurial > octave
changeset 28572:7f233261e268
avoid deprecated Qt QPalette::background function
* TerminalView.cpp: Use QPalette::window instead of QPalette::background.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 14 Jul 2020 00:48:10 -0400 |
parents | dea121672378 |
children | 1fca7db5994e |
files | libgui/qterminal/libqterminal/unix/TerminalView.cpp |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/qterminal/libqterminal/unix/TerminalView.cpp Tue Jul 14 00:45:39 2020 -0400 +++ b/libgui/qterminal/libqterminal/unix/TerminalView.cpp Tue Jul 14 00:48:10 2020 -0400 @@ -447,7 +447,7 @@ QRect contentsRect = contentsRegion.boundingRect(); painter.fillRect(contentsRect, backgroundColor); - painter.fillRect(scrollBarArea,_scrollBar->palette().background()); + painter.fillRect(scrollBarArea,_scrollBar->palette().window()); } void TerminalView::drawCursor(QPainter& painter, @@ -556,7 +556,7 @@ const QColor backgroundColor = style->backgroundColor.color(_colorTable); // draw background if different from the display's background color - if ( backgroundColor != palette().background().color() ) + if ( backgroundColor != palette().window().color() ) drawBackground(painter,rect,backgroundColor); // draw cursor shape if the current character is the cursor @@ -966,7 +966,7 @@ foreach (QRect rect, (pe->region() & contentsRect()).rects()) { - drawBackground(paint,rect,palette().background().color()); + drawBackground(paint,rect,palette().window().color()); drawContents(paint, rect); } // drawBackground(paint,contentsRect(),palette().background().color(), true /* use opacity setting */);