Commit 6be4d3df authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Give the scroll area a bit more vertical space

Move the top and bottom margins of the page layout to the scroll area
layout. This way the scroll area gets more vertical space, but the overall
margins stay the same.

GnuPG-bug-id: 5969
parent a86697dc
Pipeline #177624 passed with stage
in 3 minutes and 37 seconds
......@@ -47,7 +47,8 @@ struct ChooseProtocolPage::UI {
parent->setSubTitle(i18n("Please choose which type of key pair you want to create."));
auto mainLayout = new QVBoxLayout{parent};
mainLayout->setContentsMargins(0, 0, 0, 0);
const auto margins = mainLayout->contentsMargins();
mainLayout->setContentsMargins(margins.left(), 0, margins.right(), 0);
auto scrollArea = new ScrollArea{parent};
scrollArea->setFocusPolicy(Qt::NoFocus);
......@@ -55,7 +56,7 @@ struct ChooseProtocolPage::UI {
scrollArea->setBackgroundRole(parent->backgroundRole());
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
auto scrollAreaLayout = qobject_cast<QBoxLayout *>(scrollArea->widget()->layout());
scrollAreaLayout->setContentsMargins(0, 0, 0, 0);
scrollAreaLayout->setContentsMargins(0, margins.top(), 0, margins.bottom());
pgpCLB = new QCommandLinkButton{parent};
pgpCLB->setText(i18n("Create a personal OpenPGP key pair"));
......
......@@ -105,6 +105,8 @@ struct EnterDetailsPage::UI
parent->setTitle(i18nc("@title", "Enter Details"));
auto mainLayout = new QVBoxLayout{parent};
const auto margins = mainLayout->contentsMargins();
mainLayout->setContentsMargins(margins.left(), 0, margins.right(), 0);
auto scrollArea = new ScrollArea{parent};
scrollArea->setFocusPolicy(Qt::NoFocus);
......@@ -113,7 +115,7 @@ struct EnterDetailsPage::UI
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
scrollArea->setSizeAdjustPolicy(QScrollArea::AdjustToContents);
auto scrollAreaLayout = qobject_cast<QBoxLayout *>(scrollArea->widget()->layout());
scrollAreaLayout->setContentsMargins(0, 0, 0, 0);
scrollAreaLayout->setContentsMargins(0, margins.top(), 0, margins.bottom());
gridLayout = new QGridLayout;
int row = 0;
......
......@@ -71,6 +71,8 @@ struct ResultPage::UI
UI(QWizardPage *parent)
{
auto mainLayout = new QVBoxLayout{parent};
const auto margins = mainLayout->contentsMargins();
mainLayout->setContentsMargins(margins.left(), 0, margins.right(), 0);
auto scrollArea = new ScrollArea{parent};
scrollArea->setFocusPolicy(Qt::NoFocus);
......@@ -79,7 +81,7 @@ struct ResultPage::UI
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
scrollArea->setSizeAdjustPolicy(QScrollArea::AdjustToContents);
auto scrollAreaLayout = qobject_cast<QBoxLayout *>(scrollArea->widget()->layout());
scrollAreaLayout->setContentsMargins(0, 0, 0, 0);
scrollAreaLayout->setContentsMargins(0, margins.top(), 0, margins.bottom());
auto resultGB = new QGroupBox{i18nc("@title:group", "Result"), parent};
auto resultGBLayout = new QHBoxLayout{resultGB};
......
Supports Markdown
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