- version 0.0.6 - fix autostart + add icon to about dialog

This commit is contained in:
Dmytro Bogovych 2022-04-18 10:27:23 +03:00
parent 8745fbe6a0
commit 48454a64cc
5 changed files with 24 additions and 8 deletions

View File

@ -7,7 +7,7 @@ AboutDlg::AboutDlg(QWidget *parent) :
ui(new Ui::AboutDlg) ui(new Ui::AboutDlg)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->mAppIcon->setPixmap(QPixmap(":/assets/images/coffee_cup/icon_96x96"));
auto version_text = QString("Version %1.%2.%3") auto version_text = QString("Version %1.%2.%3")
.arg(QBREAK_VERSION_MAJOR) .arg(QBREAK_VERSION_MAJOR)
.arg(QBREAK_VERSION_MINOR) .arg(QBREAK_VERSION_MINOR)

View File

@ -16,10 +16,26 @@
<height>300</height> <height>300</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>800</width>
<height>600</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>Dialog</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="mAppIcon">
<property name="text">
<string>TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item> <item>
<widget class="QLabel" name="mAppNameLabel"> <widget class="QLabel" name="mAppNameLabel">
<property name="maximumSize"> <property name="maximumSize">
@ -104,8 +120,8 @@
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>248</x> <x>257</x>
<y>254</y> <y>290</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>157</x> <x>157</x>
@ -120,8 +136,8 @@
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>316</x> <x>325</x>
<y>260</y> <y>290</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>286</x> <x>286</x>

View File

@ -1,7 +1,7 @@
[Desktop Entry] [Desktop Entry]
GenericName=App to make the breaks GenericName=App to make the breaks
Name=QBreak Name=QBreak
Version=0.0.5 Version=0.0.6
Exec=/usr/bin/qbreak Exec=/usr/bin/qbreak
Comment=App to make periodical breaks Comment=App to make periodical breaks
Icon=qbreak Icon=qbreak

View File

@ -4,6 +4,6 @@
// App version // App version
#define QBREAK_VERSION_MAJOR 0 #define QBREAK_VERSION_MAJOR 0
#define QBREAK_VERSION_MINOR 0 #define QBREAK_VERSION_MINOR 0
#define QBREAK_VERSION_SUFFIX 5 #define QBREAK_VERSION_SUFFIX 6
#endif // CONFIG_H #endif // CONFIG_H

View File

@ -143,7 +143,7 @@ void MainWindow::applyConfig()
if (mAppConfig.autostart) if (mAppConfig.autostart)
{ {
QString path_to_me = QFileInfo(QApplication::arguments().front()).canonicalPath(); auto path_to_me = QFileInfo(QApplication::arguments().front()).absoluteFilePath();
autostart::enable(path_to_me.toStdString()); autostart::enable(path_to_me.toStdString());
} }
else else