Skip to content

Commit

Permalink
バージョン情報ダイアログ修正、Qt 5.6、MSVC2015
Browse files Browse the repository at this point in the history
  • Loading branch information
soramimi committed Mar 17, 2016
1 parent 8665349 commit 06d7c83
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
Binary file modified image/about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 16 additions & 6 deletions src/AboutDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,26 @@ AboutDialog::AboutDialog(QWidget *parent) :
auto flags = windowFlags();
flags &= ~Qt::WindowContextHelpButtonHint;
setWindowFlags(flags);
setFixedSize(width(), height());

pixmap.load(":/image/about.png");
setFixedSize(pixmap.width(), pixmap.height());

setWindowTitle(tr("About SkyMPC"));

ui->label_title->setText(QString("SkyMPC, v") + SkyMPC_Version + " (" + QString(source_revision) + ")");
ui->label_copyright->setText(QString("Copyright (C) ") + QString::number(SkyMPC_Year) + " S.Fuchita");
ui->label_title->setText(QString("SkyMPC, v%1 (%2)").arg(SkyMPC_Version).arg(source_revision));
ui->label_copyright->setText(QString("Copyright (C) %1 S.Fuchita").arg(SkyMPC_Year));
ui->label_twitter->setText("(@soramimi_jp)");
// ui->label_qt->setText(QString("Powered by Qt, v") + qVersion());

pixmap.load(":/image/about.png");
QString t = QString("Powered by Qt %1").arg(qVersion());
#ifdef _MSC_VER
t += QString(", msc=%1").arg(_MSC_VER);
#endif
#ifdef __GNUC__
t += QString(", gcc=%1.%2.%3").arg(__GNUC__).arg(__GNUC_MINOR__).arg(__GNUC_PATCHLEVEL__);
#endif
#ifdef __clang__
t += QString(", clang=%1.%2").arg(__clang_major__).arg(__clang_minor__);
#endif
ui->label_qt->setText(t);
}

AboutDialog::~AboutDialog()
Expand Down
12 changes: 11 additions & 1 deletion src/AboutDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>253</height>
<height>40</height>
</size>
</property>
</spacer>
Expand Down Expand Up @@ -83,6 +83,16 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_qt">
<property name="text">
<string>Qt</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
Expand Down

0 comments on commit 06d7c83

Please sign in to comment.