summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2023-10-28 23:19:51 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2023-10-28 23:19:51 -0500
commit505d3d3adf3eeb717b2ee63a695b761226a67a38 (patch)
tree46867938fb7167c7ae7c34027c740cbf287c5821
parent88e66fdabc8c6b5ff049d99514a74fadec2b0e51 (diff)
downloadhorizon-505d3d3adf3eeb717b2ee63a695b761226a67a38.tar.gz
horizon-505d3d3adf3eeb717b2ee63a695b761226a67a38.tar.bz2
horizon-505d3d3adf3eeb717b2ee63a695b761226a67a38.tar.xz
horizon-505d3d3adf3eeb717b2ee63a695b761226a67a38.zip
Qt UI: Enlarge wizard and re-layout pkg/net pages
This ensures that buttons and labels are not cut off.
-rw-r--r--ui/qt5/horizonwizard.cc2
-rw-r--r--ui/qt5/networkingpage.cc3
-rw-r--r--ui/qt5/pkgsimple.cc50
3 files changed, 33 insertions, 22 deletions
diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc
index 5096db9..623a491 100644
--- a/ui/qt5/horizonwizard.cc
+++ b/ui/qt5/horizonwizard.cc
@@ -216,7 +216,7 @@ HorizonWizard::Subarch determinePowerPCPlatform() {
HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) {
setWindowTitle(tr("Adélie Linux System Installation"));
- setFixedSize(QSize(650, 450));
+ setFixedSize(QSize(650, 512));
mirror_domain = "distfiles.adelielinux.org";
version = "stable";
diff --git a/ui/qt5/networkingpage.cc b/ui/qt5/networkingpage.cc
index c00f18f..a242d0b 100644
--- a/ui/qt5/networkingpage.cc
+++ b/ui/qt5/networkingpage.cc
@@ -86,13 +86,16 @@ void NetworkingPage::initializePage() {
layout = new QVBoxLayout;
layout->addWidget(descLabel);
layout->addSpacing(50);
+ layout->addStretch();
#ifdef HAS_INSTALL_ENV
/* The interface list will be empty if we're in a Runtime Environment. */
if(!horizonWizard()->interfaces.empty())
#endif /* HAS_INSTALL_ENV */
{
layout->addWidget(simple);
+ layout->addStretch();
layout->addWidget(advanced);
+ layout->addStretch();
}
layout->addWidget(skip);
diff --git a/ui/qt5/pkgsimple.cc b/ui/qt5/pkgsimple.cc
index 7ad65f8..e168583 100644
--- a/ui/qt5/pkgsimple.cc
+++ b/ui/qt5/pkgsimple.cc
@@ -37,6 +37,7 @@ PkgSimplePage::PkgSimplePage(QWidget *parent) : HorizonWizardPage(parent) {
standardLabel = new QLabel(
tr("Includes a full desktop environment, including Web browser, email client, media player, and office suite."));
standardLabel->setBuddy(standardButton);
+ standardLabel->setIndent(40);
standardLabel->setWordWrap(true);
standardButton->setWhatsThis(standardLabel->text());
@@ -46,6 +47,7 @@ PkgSimplePage::PkgSimplePage(QWidget *parent) : HorizonWizardPage(parent) {
mobileLabel = new QLabel(
tr("Includes the Standard software and additional utilities for notebook and tablet computers."));
mobileLabel->setBuddy(mobileButton);
+ mobileLabel->setIndent(40);
mobileLabel->setWordWrap(true);
mobileButton->setWhatsThis(mobileLabel->text());
@@ -54,6 +56,7 @@ PkgSimplePage::PkgSimplePage(QWidget *parent) : HorizonWizardPage(parent) {
compactButton->setIconSize(QSize(32, 32));
compactLabel = new QLabel(tr("Includes a lightweight LXQt desktop environment and a text editor."));
compactLabel->setBuddy(compactButton);
+ compactLabel->setIndent(40);
compactLabel->setWordWrap(true);
compactButton->setWhatsThis(compactLabel->text());
@@ -63,6 +66,7 @@ PkgSimplePage::PkgSimplePage(QWidget *parent) : HorizonWizardPage(parent) {
textLabel = new QLabel(
tr("Includes only text-mode support. Select for servers, or computers with very limited resources."));
textLabel->setBuddy(textButton);
+ textLabel->setIndent(40);
textLabel->setWordWrap(true);
textButton->setWhatsThis(textLabel->text());
@@ -71,6 +75,7 @@ PkgSimplePage::PkgSimplePage(QWidget *parent) : HorizonWizardPage(parent) {
customButton->setIconSize(QSize(32, 32));
customLabel = new QLabel(tr("Customise the packages installed on your computer."));
customLabel->setBuddy(customButton);
+ customLabel->setIndent(40);
customLabel->setWordWrap(true);
customButton->setWhatsThis(customLabel->text());
@@ -79,27 +84,27 @@ PkgSimplePage::PkgSimplePage(QWidget *parent) : HorizonWizardPage(parent) {
deskMATEButton = new QRadioButton(tr("MATE"));
deskXFCEButton = new QRadioButton(tr("XFCE"));
- QButtonGroup *desktopGroup = new QButtonGroup(this);
+ auto *desktopGroup = new QButtonGroup(this);
desktopGroup->addButton(deskPlasmaButton, HorizonWizard::Plasma);
desktopGroup->addButton(deskLXQtButton, HorizonWizard::LXQt);
desktopGroup->addButton(deskMATEButton, HorizonWizard::MATE);
desktopGroup->addButton(deskXFCEButton, HorizonWizard::XFCE);
connect(desktopGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
- [=](QAbstractButton *choice) {
+ [this, desktopGroup](QAbstractButton *choice) {
horizonWizard()->desktopType = static_cast<HorizonWizard::DesktopType>(desktopGroup->id(choice));
});
- QGridLayout *buttonLayout = new QGridLayout;
- buttonLayout->addWidget(standardButton, 0, 0);
- buttonLayout->addWidget(standardLabel, 0, 1);
- buttonLayout->addWidget(mobileButton, 2, 0);
- buttonLayout->addWidget(mobileLabel, 2, 1);
- buttonLayout->addWidget(compactButton, 3, 0);
- buttonLayout->addWidget(compactLabel, 3, 1);
- buttonLayout->addWidget(textButton, 4, 0);
- buttonLayout->addWidget(textLabel, 4, 1);
- buttonLayout->addWidget(customButton, 5, 0);
- buttonLayout->addWidget(customLabel, 5, 1);
+ auto *buttonLayout = new QVBoxLayout;
+ buttonLayout->addWidget(standardButton);
+ buttonLayout->addWidget(standardLabel);
+ buttonLayout->addWidget(mobileButton);
+ buttonLayout->addWidget(mobileLabel);
+ buttonLayout->addWidget(compactButton);
+ buttonLayout->addWidget(compactLabel);
+ buttonLayout->addWidget(textButton);
+ buttonLayout->addWidget(textLabel);
+ buttonLayout->addWidget(customButton);
+ buttonLayout->addWidget(customLabel);
QButtonGroup *group = new QButtonGroup(this);
group->addButton(standardButton, HorizonWizard::Standard);
@@ -108,26 +113,29 @@ PkgSimplePage::PkgSimplePage(QWidget *parent) : HorizonWizardPage(parent) {
group->addButton(textButton, HorizonWizard::TextOnly);
group->addButton(customButton, HorizonWizard::Custom);
connect(group, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
- [=](QAbstractButton *choice) {
+ [this, group, buttonLayout](QAbstractButton *choice) {
horizonWizard()->pkgtype = static_cast<HorizonWizard::PackageType>(group->id(choice));
if(choice == standardButton) {
- QHBoxLayout *desktopLayout = new QHBoxLayout;
+ auto *desktopLayout = new QHBoxLayout;
+ desktopLayout->setObjectName("desk-buttons");
for(auto button: {deskPlasmaButton, deskLXQtButton, deskMATEButton, deskXFCEButton}) {
button->show();
desktopLayout->addWidget(button);
}
- buttonLayout->addLayout(desktopLayout, 1, 1);
+ buttonLayout->insertLayout(2, desktopLayout);
layout()->invalidate();
} else {
- auto item = buttonLayout->itemAtPosition(1, 1);
- buttonLayout->removeItem(item);
- for(auto button: {deskPlasmaButton, deskLXQtButton, deskMATEButton, deskXFCEButton}) {
- button->hide();
+ auto item = buttonLayout->itemAt(2);
+ if(item->layout() && item->layout()->objectName() == "desk-buttons") {
+ buttonLayout->removeItem(item);
+ for (auto button: {deskPlasmaButton, deskLXQtButton, deskMATEButton, deskXFCEButton}) {
+ button->hide();
+ }
}
}
});
- QVBoxLayout *mainLayout = new QVBoxLayout;
+ auto *mainLayout = new QVBoxLayout;
mainLayout->addWidget(descLabel);
mainLayout->addStretch();
mainLayout->addLayout(buttonLayout);