Commit feb31753 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove not necessary margin

parent 07ed743c
Pipeline #160693 passed with stages
in 2 minutes and 52 seconds
......@@ -7,6 +7,7 @@
#include "texttospeechwidgettest.h"
#include "../abstracttexttospeechinterface.h"
#include "texttospeech/texttospeechwidget.h"
#include <QHBoxLayout>
#include <QSignalSpy>
#include <QSlider>
#include <QTest>
......@@ -32,6 +33,11 @@ void TextToSpeechWidgetTest::shouldHaveDefaultValue()
{
KPIMTextEdit::TextToSpeechWidget textToSpeechWidget;
addInterface(&textToSpeechWidget);
auto hbox = textToSpeechWidget.findChild<QHBoxLayout *>(QStringLiteral("hbox"));
QVERIFY(hbox);
QCOMPARE(hbox->contentsMargins(), QMargins{});
QCOMPARE(textToSpeechWidget.state(), KPIMTextEdit::TextToSpeechWidget::Stop);
auto closeButton = textToSpeechWidget.findChild<QToolButton *>(QStringLiteral("close-button"));
......
......@@ -37,6 +37,8 @@ TextToSpeechWidget::TextToSpeechWidget(QWidget *parent)
, d(new KPIMTextEdit::TextToSpeechWidgetPrivate)
{
auto hbox = new QHBoxLayout(this);
hbox->setObjectName(QStringLiteral("hbox"));
hbox->setContentsMargins(QMargins{});
d->mTextToSpeechActions = new TextToSpeechActions(this);
connect(d->mTextToSpeechActions, &TextToSpeechActions::stateChanged, this, &TextToSpeechWidget::stateChanged);
......
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