mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Add support for minimize and start to tray.
This commit is contained in:
committed by
Luis Ángel San Martín
parent
23c597d444
commit
e587f59ddb
@ -43,6 +43,9 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
#ifndef NO_OPENGL
|
||||
sw->hide();
|
||||
#endif
|
||||
// Tray icon settings
|
||||
QGroupBox * trayIconBox = new QGroupBox(tr("Tray icon settings"));
|
||||
QVBoxLayout * trayLayout = new QVBoxLayout();
|
||||
|
||||
auto apiKeyLayout = new QVBoxLayout();
|
||||
auto apiKeyButton = new QPushButton(tr("Edit Comic Vine API key"));
|
||||
@ -115,6 +118,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
|
||||
auto generalW = new QWidget;
|
||||
generalW->setLayout(generalLayout);
|
||||
generalLayout->addWidget(trayIconBox);
|
||||
generalLayout->addWidget(shortcutsBox);
|
||||
generalLayout->addWidget(apiKeyBox);
|
||||
generalLayout->addStretch();
|
||||
@ -146,6 +150,10 @@ void OptionsDialog::restoreOptions(QSettings *settings)
|
||||
{
|
||||
YACReaderOptionsDialog::restoreOptions(settings);
|
||||
|
||||
trayIconCheckbox->setChecked(settings->value(MINIMIZE_TO_TRAY, true).toBool());
|
||||
startToTrayCheckbox->setChecked(settings->value(START_TO_TRAY, false).toBool());
|
||||
startToTrayCheckbox->setEnabled(trayIconCheckbox->isChecked());
|
||||
|
||||
bool useBackgroundImage = settings->value(USE_BACKGROUND_IMAGE_IN_GRID_VIEW, true).toBool();
|
||||
|
||||
useBackgroundImageCheck->setChecked(useBackgroundImage);
|
||||
|
Reference in New Issue
Block a user