diff --git a/YACReader/options_dialog.cpp b/YACReader/options_dialog.cpp index 0eb12d62..612ce881 100644 --- a/YACReader/options_dialog.cpp +++ b/YACReader/options_dialog.cpp @@ -67,6 +67,8 @@ OptionsDialog::OptionsDialog(QWidget * parent) //backgroundColor->setMinimumWidth(100); colorSelection->addWidget(backgroundColor); colorSelection->addWidget(selectBackgroundColorButton = new QPushButton(tr("Choose"))); + colorSelection->setStretchFactor(backgroundColor,1); + colorSelection->setStretchFactor(selectBackgroundColorButton,0); //colorSelection->addStretch(); connect(selectBackgroundColorButton, SIGNAL(clicked()), colorDialog, SLOT(show())); colorBox->setLayout(colorSelection); @@ -173,6 +175,10 @@ void OptionsDialog::updateColor(const QColor & color) backgroundColor->setPalette(pal); backgroundColor->setAutoFillBackground(true); colorDialog->setCurrentColor(color); + + settings->setValue(BACKGROUND_COLOR,color); + + emit(changedOptions()); } void OptionsDialog::fitToWidthRatio(int value) diff --git a/YACReader/viewer.cpp b/YACReader/viewer.cpp index f30983ab..ee28cf0d 100644 --- a/YACReader/viewer.cpp +++ b/YACReader/viewer.cpp @@ -731,6 +731,10 @@ void Viewer::updateFitToWidthRatio(float ratio) void Viewer::updateConfig(QSettings * settings) { goToFlow->updateConfig(settings); + + QPalette palette; + palette.setColor(backgroundRole(), Configuration::getConfiguration().getBackgroundColor()); + setPalette(palette); } void Viewer::setBookmarks()