}
///////////////////////////////////////////////////////////////////////////////
-/// \brief FolderPanel::folderView
-/// \return フォルダビューを返します。
-///
-//FolderView *FolderPanel::folderView() const
-//{
-// return ui->folderView;
-//}
-
-///////////////////////////////////////////////////////////////////////////////
/// \brief FolderPanel::model
/// \return 関連付けられたフォルダモデルを返します。
///
void FolderPanel::toggleSearch(bool checked)
{
qDebug() << "FolderPanel::toggleSearch()" << checked;
+ if (!isVisible()) {
+ return;
+ }
if (checked) {
if (!model()->isActive()) {
///
/// 外観を変更します。
///
-void FolderPanel::updateAppearance()
+void FolderPanel::updateAppearance(const Preferences &prefs)
{
qDebug() << "FolderPanel::updateAppearance()";
- Preferences prefs(this);
QPalette pal;
+ pal = ui->filterLabel->palette();
+ pal.setColor(ui->filterLabel->backgroundRole(), prefs.folderViewBgColor(model()->isActive()));
+ pal.setColor(ui->filterLabel->foregroundRole(), prefs.folderViewFgColor(model()->isActive()));
+ ui->filterLabel->setAutoFillBackground(true);
+ ui->filterLabel->setPalette(pal);
+
pal = ui->locationBox->palette();
pal.setColor(QPalette::Base, prefs.locationBoxBgColor(model()->isActive()));
pal.setColor(QPalette::Text, prefs.locationBoxFgColor(model()->isActive()));
ui->locationBox->setPalette(pal);
+ ui->locationBox->setFont(prefs.getLocationBoxFont());
pal = ui->searchBox->palette();
pal.setColor(QPalette::Base, prefs.getSearchBoxBgColor());
pal.setColor(QPalette::Text, prefs.getSearchBoxFgColor());
ui->searchBox->setPalette(pal);
+ ui->searchBox->setFont(prefs.getSearchBoxFont());
pal = ui->folderView->palette();
pal.setColor(QPalette::Base, prefs.folderViewBgColor(model()->isActive()));