Skip to content
Snippets Groups Projects
Commit 81ce6e54 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Style sheet fix in ClickableFrame

parent 05ca6482
No related branches found
No related tags found
No related merge requests found
......@@ -15,10 +15,13 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "ClickableFrame.h"
#include <QDebug>
#include <QStyleOption>
ClickableFrame::ClickableFrame(QString header, QWidget *parent,
Qt::WindowFlags f)
: header(header), QFrame(parent, f)
: QFrame(parent, f)
, header(header)
{
this->setAttribute(Qt::WA_Hover, true);
this->clickable = true;
......@@ -26,7 +29,7 @@ ClickableFrame::ClickableFrame(QString header, QWidget *parent,
QColor background = this->palette().color(QPalette::ColorRole::Background);
QColor lighter = background.lighter(110);
this->normalStylesheet = "";
this->hoverStylesheet = "background-color: " + lighter.name() + ";";
this->hoverStylesheet = "QFrame {background-color: " + lighter.name() + ";}";
this->initFrame();
}
......
......@@ -57,6 +57,7 @@ MaskEditorPropertyPanel::MaskEditorPropertyPanel(QWidget *parent)
setup_MaskStack(accordion);
setup_MaskProperties(accordion);
setup_PlotProperties(accordion);
// mainLayout->addWidget(m_plotPropertyEditor);
setLayout(mainLayout);
}
......@@ -139,7 +140,7 @@ void MaskEditorPropertyPanel::setup_MaskStack(AccordionWidget *accordion)
void MaskEditorPropertyPanel::setup_MaskProperties(AccordionWidget *accordion)
{
ContentPane *cp = accordion->getContentPane(accordion->addContentPane("Mask properties"));
cp->setMaximumHeight(300);
cp->setMaximumHeight(400);
cp->setHeaderTooltip("Property editor for currently selected mask.");
cp->setContainerFrameStyle(QFrame::Plain);
QFrame *contentFrame = cp->getContentFrame();
......@@ -158,8 +159,11 @@ void MaskEditorPropertyPanel::setup_PlotProperties(AccordionWidget *accordion)
cp->setContainerFrameStyle(QFrame::Plain);
QFrame *contentFrame = cp->getContentFrame();
//contentFrame->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
QVBoxLayout *layout = new QVBoxLayout();
layout->setContentsMargins(0, 0, 0, 0);
m_plotPropertyEditor->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
layout->addWidget(m_plotPropertyEditor);
contentFrame->setLayout(layout);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment