From 1803705749617fb436a34941f64487cd1770d51f Mon Sep 17 00:00:00 2001 From: "jonas@jkvinge.net" Date: Tue, 11 May 2021 19:40:47 +0200 Subject: [PATCH] Add option to turn off playlist alternating row colors --- src/playlist/playlistview.cpp | 1 + src/settings/playlistsettingspage.cpp | 3 +++ src/settings/playlistsettingspage.ui | 7 +++++++ 3 files changed, 11 insertions(+) diff --git a/src/playlist/playlistview.cpp b/src/playlist/playlistview.cpp index 14dce7026..23bdd59c6 100644 --- a/src/playlist/playlistview.cpp +++ b/src/playlist/playlistview.cpp @@ -1155,6 +1155,7 @@ void PlaylistView::ReloadSettings() { bool editmetadatainline = s.value("editmetadatainline", false).toBool(); select_track_ = s.value("select_track", false).toBool(); auto_sort_ = s.value("auto_sort", false).toBool(); + setAlternatingRowColors(s.value("alternating_row_colors", true).toBool()); s.endGroup(); s.beginGroup(AppearanceSettingsPage::kSettingsGroup); diff --git a/src/settings/playlistsettingspage.cpp b/src/settings/playlistsettingspage.cpp index 9319c382a..3c649be4e 100644 --- a/src/settings/playlistsettingspage.cpp +++ b/src/settings/playlistsettingspage.cpp @@ -52,6 +52,8 @@ void PlaylistSettingsPage::Load() { QSettings s; s.beginGroup(kSettingsGroup); + ui_->checkbox_alternating_row_colors->setChecked(s.value("alternating_row_colors", true).toBool()); + #ifdef Q_OS_MACOS bool glow_effect = false; #else @@ -118,6 +120,7 @@ void PlaylistSettingsPage::Save() { QSettings s; s.beginGroup(kSettingsGroup); + s.setValue("alternating_row_colors", ui_->checkbox_alternating_row_colors->isChecked()); s.setValue("glow_effect", ui_->checkbox_glowcurrenttrack->isChecked()); s.setValue("warn_close_playlist", ui_->checkbox_warncloseplaylist->isChecked()); s.setValue("continue_on_error", ui_->checkbox_continueonerror->isChecked()); diff --git a/src/settings/playlistsettingspage.ui b/src/settings/playlistsettingspage.ui index 5a1ee8bcb..a758ee824 100644 --- a/src/settings/playlistsettingspage.ui +++ b/src/settings/playlistsettingspage.ui @@ -14,6 +14,13 @@ Playlist + + + + Use alternating row colors + + +