mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
kdeui: rework KAboutKdeDialog to expand the text as much as possible
also to parent widgets properly Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
ddd6e8a034
commit
4857f6cd17
1 changed files with 37 additions and 34 deletions
|
@ -21,13 +21,12 @@
|
|||
|
||||
#include "kaboutkdedialog_p.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <QLabel>
|
||||
#include <QLayout>
|
||||
#include <QTabWidget>
|
||||
|
||||
#include <kdeversion.h>
|
||||
#include <kglobalsettings.h>
|
||||
#include <kpixmapwidget.h>
|
||||
#include <klocale.h>
|
||||
#include <kstandarddirs.h>
|
||||
#include <ktitlewidget.h>
|
||||
|
@ -42,44 +41,48 @@ KAboutKdeDialog::KAboutKdeDialog(QWidget *parent)
|
|||
setWindowTitle(i18n("About Katana"));
|
||||
setButtons(KDialog::Close);
|
||||
|
||||
KTitleWidget *titleWidget = new KTitleWidget(this);
|
||||
titleWidget->setText(i18n("<html><font size=\"5\">Katana - Be Free and Be Efficient!</font><br /><b>Platform Version %1</b></html>",
|
||||
QString(KDE_VERSION_STRING)));
|
||||
titleWidget->setPixmap(KIcon("kde").pixmap(48), KTitleWidget::ImageLeft);
|
||||
QWidget *mainWidget = new QWidget(this);
|
||||
QGridLayout *mainLayout = new QGridLayout(mainWidget);
|
||||
mainLayout->setMargin(0);
|
||||
mainWidget->setLayout(mainLayout);
|
||||
|
||||
QLabel *about = new QLabel;
|
||||
KTitleWidget *titleWidget = new KTitleWidget(mainWidget);
|
||||
titleWidget->setText(
|
||||
i18n(
|
||||
"<html><font size=\"5\">Katana - Be Free and Be Efficient!</font><br /><b>Platform Version %1</b></html>",
|
||||
QString(KDE_VERSION_STRING)
|
||||
)
|
||||
);
|
||||
titleWidget->setPixmap(KIcon("kde").pixmap(48), KTitleWidget::ImageLeft);
|
||||
mainLayout->addWidget(titleWidget, 0, 0, 1, 2);
|
||||
|
||||
KPixmapWidget *image = new KPixmapWidget(mainWidget);
|
||||
image->setPixmap(KStandardDirs::locate("data", "kdeui/pics/aboutkde.png"));
|
||||
mainLayout->addWidget(image, 1, 0, 1, 1);
|
||||
|
||||
QLabel *about = new QLabel(mainWidget);
|
||||
about->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
about->setMargin(10);
|
||||
about->setAlignment(Qt::AlignTop);
|
||||
about->setWordWrap(true);
|
||||
about->setOpenExternalLinks(true);
|
||||
about->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
about->setText(i18n("<html>"
|
||||
"<b>Katana</b> is fork of KDE Software Distribution with emphasis on efficiency."
|
||||
"<br /><br />"
|
||||
"Software can always be improved, and the Katana team is ready to do so. "
|
||||
"However, you - the user - must tell us when something does not work as "
|
||||
"expected or could be done better. You do not have to be a software developer "
|
||||
"to be a member of the Katana team. You can join the national teams that "
|
||||
"translate program interfaces. You can provide graphics, themes, sounds, and "
|
||||
"improved documentation. You decide!</html>"
|
||||
"<br /><br />"
|
||||
"Visit <a href=\"%1\">%1</a> to learn more about Katana.</html>",
|
||||
QLatin1String(KDE_HOME_URL)));
|
||||
|
||||
QLabel *image = new QLabel;
|
||||
image->setPixmap(KStandardDirs::locate("data", "kdeui/pics/aboutkde.png"));
|
||||
|
||||
QHBoxLayout *midLayout = new QHBoxLayout;
|
||||
midLayout->addWidget(image);
|
||||
midLayout->addWidget(about);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||
mainLayout->addWidget(titleWidget);
|
||||
mainLayout->addLayout(midLayout);
|
||||
mainLayout->setMargin(0);
|
||||
|
||||
QWidget *mainWidget = new QWidget;
|
||||
mainWidget->setLayout(mainLayout);
|
||||
about->setText(
|
||||
i18n("<html>"
|
||||
"<b>Katana</b> is fork of KDE Software Distribution with emphasis on efficiency."
|
||||
"<br /><br />"
|
||||
"Software can always be improved, and the Katana team is ready to do so. "
|
||||
"However, you - the user - must tell us when something does not work as "
|
||||
"expected or could be done better. You do not have to be a software developer "
|
||||
"to be a member of the Katana team. You can join the national teams that "
|
||||
"translate program interfaces. You can provide graphics, themes, sounds, and "
|
||||
"improved documentation. You decide!</html>"
|
||||
"<br /><br />"
|
||||
"Visit <a href=\"%1\">%1</a> to learn more about Katana.</html>",
|
||||
QLatin1String(KDE_HOME_URL)
|
||||
)
|
||||
);
|
||||
mainLayout->addWidget(about, 1, 1, 1, 1);
|
||||
|
||||
setMainWidget(mainWidget);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue