Changeset View
Changeset View
Standalone View
Standalone View
src/kaboutkdedialog_p.cpp
Show All 15 Lines | 1 | /* This file is part of the KDE libraries | |||
---|---|---|---|---|---|
16 | You should have received a copy of the GNU Library General Public License | 16 | You should have received a copy of the GNU Library General Public License | ||
17 | along with this library; see the file COPYING.LIB. If not, write to | 17 | along with this library; see the file COPYING.LIB. If not, write to | ||
18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
19 | Boston, MA 02110-1301, USA. | 19 | Boston, MA 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #include "kaboutkdedialog_p.h" | 22 | #include "kaboutkdedialog_p.h" | ||
23 | 23 | | |||
24 | #include <QApplication> | ||||
24 | #include <QDialogButtonBox> | 25 | #include <QDialogButtonBox> | ||
25 | #include <QFrame> | 26 | #include <QFrame> | ||
26 | #include <QLabel> | 27 | #include <QLabel> | ||
27 | #include <QLayout> | 28 | #include <QLayout> | ||
29 | #include <QPixmap> | ||||
28 | #include <QTabWidget> | 30 | #include <QTabWidget> | ||
29 | #include <QStandardPaths> | 31 | #include <QStandardPaths> | ||
30 | 32 | | |||
31 | #include <klocalizedstring.h> | 33 | #include <klocalizedstring.h> | ||
32 | #include <ktitlewidget.h> | 34 | #include <ktitlewidget.h> | ||
33 | 35 | | |||
34 | #include "../kxmlgui_version.h" | 36 | #include "../kxmlgui_version.h" | ||
35 | 37 | | |||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Line(s) | 44 | { | |||
132 | QTabWidget *tabWidget = new QTabWidget; | 134 | QTabWidget *tabWidget = new QTabWidget; | ||
133 | tabWidget->setUsesScrollButtons(false); | 135 | tabWidget->setUsesScrollButtons(false); | ||
134 | tabWidget->addTab(about, i18nc("About KDE", "&About")); | 136 | tabWidget->addTab(about, i18nc("About KDE", "&About")); | ||
135 | tabWidget->addTab(report, i18n("&Report Bugs or Wishes")); | 137 | tabWidget->addTab(report, i18n("&Report Bugs or Wishes")); | ||
136 | tabWidget->addTab(join, i18n("&Join KDE")); | 138 | tabWidget->addTab(join, i18n("&Join KDE")); | ||
137 | tabWidget->addTab(support, i18n("&Support KDE")); | 139 | tabWidget->addTab(support, i18n("&Support KDE")); | ||
138 | 140 | | |||
139 | QLabel *image = new QLabel; | 141 | QLabel *image = new QLabel; | ||
140 | image->setPixmap(QStringLiteral(":/kxmlgui5/aboutkde.png")); | 142 | QPixmap pixmap(QStringLiteral(":/kxmlgui5/aboutkde.png")); | ||
143 | qreal dpr = qApp->devicePixelRatio(); | ||||
144 | pixmap.setDevicePixelRatio(dpr); | ||||
145 | image->setPixmap(pixmap.scaled(150 * dpr, 250 * dpr, Qt::KeepAspectRatio)); | ||||
141 | 146 | | |||
142 | QHBoxLayout *midLayout = new QHBoxLayout; | 147 | QHBoxLayout *midLayout = new QHBoxLayout; | ||
143 | midLayout->addWidget(image); | 148 | midLayout->addWidget(image); | ||
144 | midLayout->addWidget(tabWidget); | 149 | midLayout->addWidget(tabWidget); | ||
145 | 150 | | |||
146 | QDialogButtonBox *buttonBox = new QDialogButtonBox; | 151 | QDialogButtonBox *buttonBox = new QDialogButtonBox; | ||
147 | buttonBox->setStandardButtons(QDialogButtonBox::Close); | 152 | buttonBox->setStandardButtons(QDialogButtonBox::Close); | ||
148 | connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); | 153 | connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); | ||
Show All 12 Lines |