mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
Fix colours of buttons in notification frame
This commit is contained in:
parent
752a0a1e48
commit
700225c26f
@ -2220,10 +2220,7 @@ GuiWorkAreaContainer::GuiWorkAreaContainer(GuiWorkArea * wa, QWidget * parent)
|
||||
this, SLOT(updateDisplay()));
|
||||
connect(reloadPB, SIGNAL(clicked()), this, SLOT(reload()));
|
||||
connect(ignorePB, SIGNAL(clicked()), this, SLOT(ignore()));
|
||||
QPalette const & pal = notificationFrame->palette();
|
||||
QPalette newpal(pal.color(QPalette::Active, QPalette::HighlightedText),
|
||||
pal.color(QPalette::Active, QPalette::Highlight));
|
||||
notificationFrame->setPalette(newpal);
|
||||
setMessageColour({notificationFrame}, {reloadPB, ignorePB});
|
||||
updateDisplay();
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "support/PathChanger.h"
|
||||
#include "support/Systemcall.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCheckBox>
|
||||
#include <QComboBox>
|
||||
#include <QLineEdit>
|
||||
@ -239,6 +240,18 @@ void focusAndHighlight(QAbstractItemView * w)
|
||||
}
|
||||
|
||||
|
||||
void setMessageColour(list<QWidget *> highlighted, list<QWidget *> plain)
|
||||
{
|
||||
QPalette pal = QApplication::palette();
|
||||
QPalette newpal(pal.color(QPalette::Active, QPalette::HighlightedText),
|
||||
pal.color(QPalette::Active, QPalette::Highlight));
|
||||
for (QWidget * w : highlighted)
|
||||
w->setPalette(newpal);
|
||||
for (QWidget * w : plain)
|
||||
w->setPalette(pal);
|
||||
}
|
||||
|
||||
|
||||
/// wrapper to hide the change of method name to setSectionResizeMode
|
||||
void setSectionResizeMode(QHeaderView * view,
|
||||
int logicalIndex, QHeaderView::ResizeMode mode) {
|
||||
|
@ -83,6 +83,11 @@ void setValid(QWidget * widget, bool valid);
|
||||
// set focus and highlight the current item if there is no selection already
|
||||
void focusAndHighlight(QAbstractItemView * w);
|
||||
|
||||
// Sets all widget in highlighted in highlighted colour, and their children in
|
||||
// plain in standard colours.
|
||||
void setMessageColour(std::list<QWidget *> highlighted,
|
||||
std::list<QWidget *> plain);
|
||||
|
||||
/// Qt5 changed setSectionMode to setSectionResizeMode
|
||||
/// These wrappers work for Qt4 and Qt5
|
||||
void setSectionResizeMode(QHeaderView * view,
|
||||
|
Loading…
Reference in New Issue
Block a user