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