connect(ui->boxClrBg, SIGNAL(clicked()), this, SLOT(selectBoxColor()));
connect(ui->boxClrFg, SIGNAL(clicked()), this, SLOT(selectBoxColor()));
+ connect(ui->chooseBoxFont, SIGNAL(clicked()), this, SLOT(chooseFont()));
connect(ui->clrBgMark, SIGNAL(clicked()), this, SLOT(selectViewColor()));
connect(ui->clrBgNormal, SIGNAL(clicked()), this, SLOT(selectViewColor()));
connect(ui->clrFgNormal, SIGNAL(clicked()), this, SLOT(selectViewColor()));
connect(ui->clrFgReadonly, SIGNAL(clicked()), this, SLOT(selectViewColor()));
connect(ui->clrFgSystem, SIGNAL(clicked()), this, SLOT(selectViewColor()));
-
- connect(ui->chooseBoxFont, SIGNAL(clicked()), this, SLOT(chooseFont()));
connect(ui->chooseViewFont, SIGNAL(clicked()), this, SLOT(chooseFont()));
+ connect(ui->enableDarker, SIGNAL(toggled(bool)), this, SLOT(setControlsEnabled(bool)));
+
connect(ui->importAppearance, SIGNAL(clicked()), this, SLOT(importAppearance()));
connect(ui->exportAppearance, SIGNAL(clicked()), this, SLOT(exportAppearance()));
+
connect(ui->termBrowse, SIGNAL(clicked()), this, SLOT(browseApp()));
connect(ui->editorBrowse, SIGNAL(clicked()), this, SLOT(browseApp()));
QRadioButton *radioBtn;
//>>>>> 起動と終了
- // 終了時の確認ダイアログ
- ui->confirmExit->setChecked(settings.value(IniKey_ConfirmExit).toBool());
// 起動時のサイズ
ui->bootSize->setChecked(true);
strValue = settings.value(IniKey_BootSizeSpec).toString();
ui->relativeTop->setValue(point.y());
// 起動時の設定削除
ui->resetOnBoot->setChecked(settings.value(IniKey_ResetOnBoot).toBool());
+ // アップデートの確認
+ ui->checkUpdates->setChecked(settings.value(IniKey_CheckUpdates).toBool());
+ // 終了時の確認ダイアログ
+ ui->confirmExit->setChecked(settings.value(IniKey_ConfirmExit).toBool());
//>>>>> 色とフォント、テキストビューア
loadAppearance(settings, false);
+ ui->enableDarker->setChecked(settings.value(IniKey_EnableDarker).toBool());
+ ui->dark->setValue(settings.value(IniKey_Darkness).toInt());
//>>>>> ファイル操作
// 確認ダイアログの表示
font = settings.value(IniKey_ViewFont).value<QFont>();
ui->viewFont->setText(tr("%1, %2pt").arg(font.family()).arg(font.pointSize()));
// サンプル表示
+ QHeaderView *header = ui->sampleTable->verticalHeader();
+ header->setDefaultSectionSize(QFontMetrics(font).height() * 1.5);
+ ui->sampleTable->setMinimumHeight(header->sectionSize(0) * 5);
+ ui->sampleTable->setMaximumHeight(ui->sampleTable->minimumHeight() + 2);
m_model.setFont(font);
m_model.update();
label = ui->boxFont;
}
else if (sender() == ui->chooseViewFont) {
+ QHeaderView *header = ui->sampleTable->verticalHeader();
+ header->setDefaultSectionSize(QFontMetrics(font).height() * 1.5);
+ ui->sampleTable->setMinimumHeight(header->sectionSize(0) * 5);
+ ui->sampleTable->setMaximumHeight(ui->sampleTable->minimumHeight() + 2);
m_model.setFont(font);
m_model.update();
label = ui->viewFont;
else if (sender() == ui->viewerInherit) {
ui->viewerClrBg->setEnabled(!enabled);
ui->viewerClrFg->setEnabled(!enabled);
+ // サンプル表示も更新
+ QPalette pal = ui->viewerSample->palette();
+ if (enabled) {
+ pal.setColor(QPalette::Base, m_colorMap["clrBgNormal"]);
+ pal.setColor(QPalette::Text, m_colorMap["clrFgNormal"]);
+ }
+ else {
+ QSettings settings;
+ pal.setColor(QPalette::Base, settings.value(IniKey_ViewerColorBg).value<QColor>());
+ pal.setColor(QPalette::Text, settings.value(IniKey_ViewerColorFg).value<QColor>());
+ }
+ ui->viewerSample->setPalette(pal);
}
else if (sender() == ui->enableViewerIgnoreExt) {
ui->viewerIgnoreExt->setEnabled(enabled);
}
+ else if (sender() == ui->enableDarker) {
+ ui->dark->setEnabled(enabled);
+ }
}
void PreferenceDialog::setIgnoreExtDefault()
QAbstractButton *selected;
//>>>>> 起動と終了
- // 終了時の確認ダイアログ
- settings.setValue(IniKey_ConfirmExit, ui->confirmExit->isChecked());
// 起動時のサイズ
if (!ui->bootSize->isChecked()) {
settings.setValue(IniKey_BootSizeSpec, "");
}
// 起動時の設定削除
settings.setValue(IniKey_ResetOnBoot, ui->resetOnBoot->isChecked());
+ // 終了時の確認ダイアログ
+ settings.setValue(IniKey_ConfirmExit, ui->confirmExit->isChecked());
+ // アップデートのチェック
+ settings.setValue(IniKey_CheckUpdates, ui->checkUpdates->isChecked());
//>>>>> 色とフォント
saveAppearance(settings);
+ settings.setValue(IniKey_EnableDarker, ui->enableDarker->isChecked());
+ settings.setValue(IniKey_Darkness, ui->dark->value());
//>>>>> ファイル操作
settings.setValue(IniKey_ConfirmCopy, ui->confirmCopy->isChecked());