mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4956 caf: Fixed background color change problem in List Editor
This commit is contained in:
parent
dbd09e97e3
commit
11f42fcc7b
@ -201,10 +201,17 @@ void PdmUiListEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
{
|
{
|
||||||
uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &attributes);
|
uiObject->editorAttribute(uiField()->fieldHandle(), uiConfigName, &attributes);
|
||||||
|
|
||||||
QPalette myPalette(m_listView->palette());
|
QPalette myPalette;
|
||||||
myPalette.setColor(QPalette::Base, attributes.m_baseColor);
|
|
||||||
|
if (attributes.m_baseColor == myPalette.color(QPalette::Active, QPalette::Base))
|
||||||
|
{
|
||||||
|
m_listView->setStyleSheet("");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_listView->setStyleSheet("background-color: " + attributes.m_baseColor.name() + ";");
|
||||||
|
}
|
||||||
|
|
||||||
m_listView->setPalette(myPalette);
|
|
||||||
m_listView->setHeightHint(attributes.m_heightHint);
|
m_listView->setHeightHint(attributes.m_heightHint);
|
||||||
if (!attributes.m_allowHorizontalScrollBar)
|
if (!attributes.m_allowHorizontalScrollBar)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user