help dialog updated

This commit is contained in:
Zira project 2020-07-04 22:02:50 +05:00
parent 23d96c7623
commit 4dbc65bd76
3 changed files with 45 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View file

@ -15,7 +15,6 @@ const QString TPL_APPLICATION_NAME = "<div><center><big><b>%1</b></big></center>
const QString TPL_APPLICATION_VERSION = "<div><center>%1</center></div>";
const QString TPL_ORGANIZATION = "<div><center>(C) 2019 %1 (%2)</center></div>";
const QString TPL_BLANK = "<div>&nbsp;</div>";
const QString TPL_LOGO_IMAGE = "<div><center><img src=\":/image/zira.png\" width=\"150\" height=\"150\" /></center></div>";
HelpDialog::HelpDialog(QWidget *parent) :
QDialog(parent),
@ -24,6 +23,11 @@ HelpDialog::HelpDialog(QWidget *parent) :
{
ui->setupUi(this);
ui->helpDialogIconLayout->setContentsMargins(0, 0, 0, 0);
ui->helpDialogIconLayout->setMargin(0);
ui->helpDialogIconLayout->setSpacing(0);
// maximize dialog in Android
#if defined(Q_OS_ANDROID)
setWindowState( windowState() | Qt::WindowMaximized);
@ -44,6 +48,7 @@ void HelpDialog::shortcutsContent()
f.close();
setWindowTitle(tr("Shortcuts"));
ui->helpDialogIconLabel->hide();
ui->helpLabel->setText(text);
pressed = 10;
@ -58,6 +63,7 @@ void HelpDialog::faqContent()
f.close();
setWindowTitle(tr("FAQ"));
ui->helpDialogIconLabel->hide();
ui->helpLabel->setText(text);
pressed = 10;
@ -65,7 +71,7 @@ void HelpDialog::faqContent()
void HelpDialog::aboutContent()
{
QString text = TPL_LOGO_IMAGE+TPL_APPLICATION_NAME.arg(APPLICATION_NAME);
QString text = TPL_APPLICATION_NAME.arg(APPLICATION_NAME);
text += TPL_APPLICATION_VERSION.arg(APPLICATION_VERSION);
text += TPL_BLANK;
@ -81,6 +87,7 @@ void HelpDialog::aboutContent()
text += TPL_QT_VERSION.arg(qVersion());
setWindowTitle(tr("About"));
ui->helpDialogIconLabel->show();
ui->helpLabel->setText(text);
pressed = 0;

View file

@ -53,6 +53,9 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
@ -65,6 +68,35 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="helpDialogIconLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="helpDialogIconLabel">
<property name="maximumSize">
<size>
<width>150</width>
<height>150</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../qrc/image.qrc">:/image/zira.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="helpLabel">
<property name="text">
@ -77,7 +109,7 @@
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignJustify|Qt::AlignTop</set>
<set>Qt::AlignJustify|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
@ -103,7 +135,9 @@
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../qrc/image.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>