mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-30 12:26:39 -05:00
Replaced deprecated QPalette::foreground by QPalette::windowText and QPalette::background by QPalette::window
This commit is contained in:
parent
484d220b04
commit
88230fd9bd
4 changed files with 7 additions and 7 deletions
|
|
@ -775,7 +775,7 @@ void TBoard::showNextPiece() {
|
|||
|
||||
QPixmap pixmap(dx * squareWidth(), dy * squareHeight());
|
||||
QPainter painter(&pixmap);
|
||||
painter.fillRect(pixmap.rect(), nextPieceLabel->palette().background());
|
||||
painter.fillRect(pixmap.rect(), nextPieceLabel->palette().window());
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
int x = nextPiece.x(i) - nextPiece.minX();
|
||||
|
|
|
|||
|
|
@ -645,7 +645,7 @@ void FlowLayout::performDrag()
|
|||
if (curs==0) dragPixmap = itemPixmap;
|
||||
QPixmap oldPixmap = dragPixmap;
|
||||
if (curs!=0) dragPixmap = QPixmap(oldPixmap.width() + 20 , oldPixmap.height());
|
||||
dragPixmap.fill(widget->palette().background().color());
|
||||
dragPixmap.fill(widget->palette().window().color());
|
||||
QPainter painter(&dragPixmap);
|
||||
painter.drawPixmap(0, 0, oldPixmap);
|
||||
if (curs!=0) painter.drawPixmap((20 * curs), 0, itemPixmap);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ void IMHistoryItemPainter::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||
// if (mode == Editable) {
|
||||
// painter->setBrush(option.palette.highlight());
|
||||
// } else {
|
||||
painter->setBrush(option.palette.foreground());
|
||||
painter->setBrush(option.palette.windowText());
|
||||
// }
|
||||
if (option.state & QStyle::State_Selected) {
|
||||
painter->fillRect(option.rect, option.palette.highlight());
|
||||
|
|
|
|||
|
|
@ -181,14 +181,14 @@ RichTextEdit::RichTextEdit(QWidget *parent) : QWidget(parent) {
|
|||
// text foreground color
|
||||
|
||||
QPixmap pix(16, 16);
|
||||
pix.fill(QApplication::palette().foreground().color());
|
||||
pix.fill(QApplication::palette().windowText().color());
|
||||
f_fgcolor->setIcon(pix);
|
||||
|
||||
connect(f_fgcolor, SIGNAL(clicked()), this, SLOT(textFgColor()));
|
||||
|
||||
// text background color
|
||||
|
||||
pix.fill(QApplication::palette().background().color());
|
||||
pix.fill(QApplication::palette().window().color());
|
||||
f_bgcolor->setIcon(pix);
|
||||
|
||||
connect(f_bgcolor, SIGNAL(clicked()), this, SLOT(textBgColor()));
|
||||
|
|
@ -519,7 +519,7 @@ void RichTextEdit::fgColorChanged(const QColor &c) {
|
|||
if (c.isValid()) {
|
||||
pix.fill(c);
|
||||
} else {
|
||||
pix.fill(QApplication::palette().foreground().color());
|
||||
pix.fill(QApplication::palette().windowText().color());
|
||||
}
|
||||
f_fgcolor->setIcon(pix);
|
||||
}
|
||||
|
|
@ -529,7 +529,7 @@ void RichTextEdit::bgColorChanged(const QColor &c) {
|
|||
if (c.isValid()) {
|
||||
pix.fill(c);
|
||||
} else {
|
||||
pix.fill(QApplication::palette().background().color());
|
||||
pix.fill(QApplication::palette().window().color());
|
||||
}
|
||||
f_bgcolor->setIcon(pix);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue