mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2304 Property Editor: Box header text not readable
Modify title label palette before modifying the frame palette
This commit is contained in:
parent
5af63f7abd
commit
24aca6edc3
@ -138,6 +138,10 @@ void QMinimizePanel::initialize(const QString &title)
|
||||
m_titleFrame->setFrameStyle(QFrame::Box | QFrame::Plain);
|
||||
m_titleFrame->setAutoFillBackground(true);
|
||||
|
||||
m_titleLabel = new QLabel(title, m_titleFrame);
|
||||
QPalette titleLabelPalette = m_titleLabel->palette();
|
||||
titleLabelPalette.setBrush(QPalette::Foreground, titleLabelPalette.windowText());
|
||||
|
||||
{
|
||||
QLinearGradient titleGrad(QPointF(0, 0), QPointF(0, 1));
|
||||
titleGrad.setCoordinateMode(QGradient::StretchToDeviceMode);
|
||||
@ -150,8 +154,7 @@ void QMinimizePanel::initialize(const QString &title)
|
||||
m_titleFrame->setPalette(titleFramePalette);
|
||||
}
|
||||
|
||||
m_titleLabel = new QLabel(title, m_titleFrame);
|
||||
m_titleLabel->setPalette(QApplication::palette()); // To avoid title foreground color bleeding through
|
||||
m_titleLabel->setPalette(titleLabelPalette);
|
||||
|
||||
m_collapseButton = new QPushButton( m_titleFrame);
|
||||
m_collapseButton->setFlat(true);
|
||||
|
Loading…
Reference in New Issue
Block a user