Commit ee8d97ea authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

PreviewWidget: Fix layout on MacOS

parent e06111b4
......@@ -29,6 +29,7 @@
#include "Clip.h"
#include <QMessageBox>
#include <QLayout>
PreviewWidget::PreviewWidget( QWidget *parent ) :
QWidget( parent ),
......@@ -37,6 +38,14 @@ PreviewWidget::PreviewWidget( QWidget *parent ) :
{
m_ui->setupUi( this );
// Prevent buttons overlap on MacOS
for (int i = 0; i < m_ui->toolsWidget->layout()->count(); ++i)
{
QWidget* w = m_ui->toolsWidget->layout()->itemAt( i )->widget();
if ( w != NULL )
w->setAttribute( Qt::WA_LayoutUsesWidgetRect );
}
m_ui->rulerWidget->setFocusPolicy( Qt::NoFocus );
// Prepare and set the black background
......
......@@ -29,7 +29,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
......@@ -53,9 +62,10 @@
</widget>
</item>
<item>
<widget class="QWidget" name="toolsWidget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
<number>2</number>
</property>
<item>
<widget class="QPushButton" name="pushButtonPreviousFrame">
......@@ -345,6 +355,12 @@
<iconset resource="../../../../resources.qrc">
<normaloff>:/images/editcut</normaloff>:/images/editcut</iconset>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item>
......@@ -418,7 +434,7 @@
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="numDigits">
<property name="digitCount">
<number>11</number>
</property>
<property name="segmentStyle">
......@@ -427,6 +443,7 @@
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment