Use setContentsMargins instead of setMargin

This commit is contained in:
Luis Ángel San Martín 2021-10-07 22:16:33 +02:00
parent 4c2d6be1ef
commit 8173f9f94c
13 changed files with 13 additions and 13 deletions

View File

@ -76,7 +76,7 @@ ClassicComicsView::ClassicComicsView(QWidget *parent)
layout->addWidget(sVertical); layout->addWidget(sVertical);
setLayout(layout); setLayout(layout);
layout->setMargin(0); layout->setContentsMargins(0, 0, 0, 0);
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
sVertical->setCollapsible(1, false); sVertical->setCollapsible(1, false);

View File

@ -114,7 +114,7 @@ EmptyFolderWidget::EmptyFolderWidget(QWidget *parent)
layout->addSpacing(12); layout->addSpacing(12);
layout->addWidget(foldersView, 1); layout->addWidget(foldersView, 1);
layout->addStretch(); layout->addStretch();
layout->setMargin(0); layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0); layout->setSpacing(0);
setContentsMargins(0, 0, 0, 0); setContentsMargins(0, 0, 0, 0);

View File

@ -208,7 +208,7 @@ void GridComicsView::createCoverSizeSliderWidget()
bigLabel->setPixmap(QPixmap(":/images/comics_view_toolbar/big_size_grid_zoom.png")); bigLabel->setPixmap(QPixmap(":/images/comics_view_toolbar/big_size_grid_zoom.png"));
horizontalLayout->addWidget(bigLabel); horizontalLayout->addWidget(bigLabel);
horizontalLayout->addSpacing(10); horizontalLayout->addSpacing(10);
horizontalLayout->setMargin(0); horizontalLayout->setContentsMargins(0, 0, 0, 0);
coverSizeSliderWidget->setLayout(horizontalLayout); coverSizeSliderWidget->setLayout(horizontalLayout);
// TODO add shortcuts (ctrl-+ and ctrl-- for zooming in out, + ctrl-0 for reseting the zoom) // TODO add shortcuts (ctrl-+ and ctrl-- for zooming in out, + ctrl-0 for reseting the zoom)

View File

@ -48,7 +48,7 @@ YACReaderActivityIndicatorWidget::YACReaderActivityIndicatorWidget(QWidget *pare
setLayout(layout); setLayout(layout);
layout->setMargin(4); layout->setContentsMargins(4, 4, 4, 4);
layout->setSpacing(0); layout->setSpacing(0);
// setFixedHeight(3); // setFixedHeight(3);

View File

@ -285,7 +285,7 @@ void LibraryWindow::doLayout()
rightLayout->addWidget(libraryToolBar); rightLayout->addWidget(libraryToolBar);
rightLayout->addWidget(comicsViewsManager->containerWidget()); rightLayout->addWidget(comicsViewsManager->containerWidget());
rightLayout->setMargin(0); rightLayout->setContentsMargins(0, 0, 0, 0);
rightLayout->setSpacing(0); rightLayout->setSpacing(0);
QWidget *rightWidget = new QWidget(); QWidget *rightWidget = new QWidget();

View File

@ -52,7 +52,7 @@ NoLibrariesWidget::NoLibrariesWidget(QWidget *parent)
topLayout->addSpacing(30); topLayout->addSpacing(30);
topLayout->addLayout(textLayout, 1); topLayout->addLayout(textLayout, 1);
topLayout->addStretch(); topLayout->addStretch();
topLayout->setMargin(0); topLayout->setContentsMargins(0, 0, 0, 0);
topWidget->setLayout(topLayout); topWidget->setLayout(topLayout);

View File

@ -33,7 +33,7 @@ NoSearchResultsWidget::NoSearchResultsWidget(QWidget *parent)
layout->addSpacing(30); layout->addSpacing(30);
layout->addWidget(titleLabel); layout->addWidget(titleLabel);
layout->addStretch(); layout->addStretch();
layout->setMargin(0); layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0); layout->setSpacing(0);
setContentsMargins(0, 0, 0, 0); setContentsMargins(0, 0, 0, 0);

View File

@ -135,7 +135,7 @@ ServerConfigDialog::ServerConfigDialog(QWidget *parent)
auto portWidgetLayout = new QHBoxLayout(this); auto portWidgetLayout = new QHBoxLayout(this);
portWidgetLayout->addWidget(port); portWidgetLayout->addWidget(port);
portWidgetLayout->addWidget(accept); portWidgetLayout->addWidget(accept);
portWidgetLayout->setMargin(0); portWidgetLayout->setContentsMargins(0, 0, 0, 0);
portWidget->setLayout(portWidgetLayout); portWidget->setLayout(portWidgetLayout);
portWidget->move(332, 244); portWidget->move(332, 244);
// accept->move(514,149); // accept->move(514,149);

View File

@ -50,7 +50,7 @@ YACReaderMainToolBar::YACReaderMainToolBar(QWidget *parent)
fullscreenButton->setStyleSheet(qToolButtonStyleSheet); fullscreenButton->setStyleSheet(qToolButtonStyleSheet);
fullscreenButton->setIconSize(QSize(24, 24)); fullscreenButton->setIconSize(QSize(24, 24));
mainLayout->setMargin(0); mainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->setSpacing(0); mainLayout->setSpacing(0);
mainLayout->addSpacing(12); mainLayout->addSpacing(12);

View File

@ -46,7 +46,7 @@ YACReaderDeletingProgress::YACReaderDeletingProgress(QWidget *parent)
contentLayout->addWidget(button, 0, Qt::AlignHCenter); contentLayout->addWidget(button, 0, Qt::AlignHCenter);
contentLayout->addSpacing(18); contentLayout->addSpacing(18);
contentLayout->setMargin(0); contentLayout->setContentsMargins(0, 0, 0, 0);
setLayout(contentLayout); setLayout(contentLayout);

View File

@ -9,7 +9,7 @@ YACReaderLibraryItemWidget::YACReaderLibraryItemWidget(QString n /*ame*/, QStrin
: QWidget(parent), name(n), path(p), isSelected(false) : QWidget(parent), name(n), path(p), isSelected(false)
{ {
QHBoxLayout *mainLayout = new QHBoxLayout; QHBoxLayout *mainLayout = new QHBoxLayout;
mainLayout->setMargin(0); mainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->setSpacing(0); mainLayout->setSpacing(0);
// installEventFilter(this); // installEventFilter(this);

View File

@ -11,7 +11,7 @@ YACReaderLibraryListWidget::YACReaderLibraryListWidget(QWidget *parent)
{ {
QVBoxLayout *mainLayout = new QVBoxLayout; QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->setSpacing(0); mainLayout->setSpacing(0);
mainLayout->setMargin(0); mainLayout->setContentsMargins(0, 0, 0, 0);
this->setLayout(mainLayout); this->setLayout(mainLayout);
} }

View File

@ -60,7 +60,7 @@ YACReaderTitledToolBar::YACReaderTitledToolBar(const QString &title, QWidget *pa
: QWidget(parent) : QWidget(parent)
{ {
QHBoxLayout *mainLayout = new QHBoxLayout; QHBoxLayout *mainLayout = new QHBoxLayout;
mainLayout->setMargin(0); mainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->setSpacing(0); mainLayout->setSpacing(0);
QString styleSheet = "QWidget {border:0px;}"; QString styleSheet = "QWidget {border:0px;}";