panels: implement a small margin on all panels to ensure the focus border is always visible
This commit is contained in:
@@ -39,6 +39,7 @@ CurveWidget::CurveWidget(QWidget *parent) :
|
||||
bridge_(nullptr)
|
||||
{
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
|
||||
QHBoxLayout* top_controls = new QHBoxLayout();
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <QCloseEvent>
|
||||
#include <QDebug>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPainter>
|
||||
#include <QStyle>
|
||||
#include <QStyleOption>
|
||||
@@ -144,4 +145,13 @@ void PanelWidget::Retranslate()
|
||||
{
|
||||
}
|
||||
|
||||
void PanelWidget::SetWidgetWithPadding(QWidget *widget)
|
||||
{
|
||||
QWidget* wrapper = new QWidget();
|
||||
QHBoxLayout* layout = new QHBoxLayout(wrapper);
|
||||
layout->setMargin(layout->margin() / 2);
|
||||
layout->addWidget(widget);
|
||||
setWidget(wrapper);
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
@@ -181,6 +181,8 @@ protected:
|
||||
|
||||
virtual void Retranslate();
|
||||
|
||||
void SetWidgetWithPadding(QWidget* widget);
|
||||
|
||||
protected slots:
|
||||
/**
|
||||
* @brief Set panel's title
|
||||
|
||||
@@ -60,6 +60,7 @@ ManagedPixelSamplerWidget::ManagedPixelSamplerWidget(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
|
||||
display_view_ = new PixelSamplerWidget();
|
||||
display_view_->setTitle(tr("Display"));
|
||||
|
||||
Reference in New Issue
Block a user