Make page container hug edges of dialog <3

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2025-11-23 16:25:33 +00:00
parent 40d1dccb9b
commit 2b949d5fdd
9 changed files with 28 additions and 11 deletions

View File

@@ -61,6 +61,8 @@ ResourceDownloadDialog::ResourceDownloadDialog(QWidget* parent, const std::share
setWindowIcon(QIcon::fromTheme("new"));
m_buttons.setContentsMargins(0, 0, 6, 6);
// Bonk Qt over its stupid head and make sure it understands which button is the default one...
// See: https://stackoverflow.com/questions/24556831/qbuttonbox-set-default-button
auto OkButton = m_buttons.button(QDialogButtonBox::Ok);
@@ -114,6 +116,8 @@ void ResourceDownloadDialog::reject()
// won't work with subclasses if we put it in this ctor.
void ResourceDownloadDialog::initializeContainer()
{
layout()->setContentsMargins(0, 0, 0, 0);
m_container = new PageContainer(this, {}, this);
m_container->setSizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Expanding);
m_container->layout()->setContentsMargins(0, 0, 0, 0);