panels: implement a small margin on all panels to ensure the focus border is always visible
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user