Skip to content

Commit

Permalink
feat: allow to customize blacklist and favorite borders (fix #3095)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Feb 3, 2024
1 parent dc1595a commit 147cac2
Show file tree
Hide file tree
Showing 4 changed files with 168 additions and 82 deletions.
16 changes: 16 additions & 0 deletions src/gui/src/settings/options-window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,10 @@ OptionsWindow::OptionsWindow(Profile *profile, ThemeLoader *themeLoader, QWidget
ui->lineColoringBlacklisteds->setFont(qFontFromString(settings->value("blacklisteds").toString()));
ui->lineColoringIgnoreds->setFont(qFontFromString(settings->value("ignoreds").toString()));
settings->endGroup();
settings->beginGroup("Borders");
ui->lineColoringFavoritesBorder->setText(settings->value("favorites", "#ffc0cb").toString());
ui->lineColoringBlacklistedsBorder->setText(settings->value("blacklisteds", "#000000").toString());
settings->endGroup();
settings->endGroup();

settings->beginGroup("Margins");
Expand Down Expand Up @@ -987,10 +991,14 @@ void OptionsWindow::on_lineColoringGenerals_textChanged()
{ setColor(ui->lineColoringGenerals); }
void OptionsWindow::on_lineColoringFavorites_textChanged()
{ setColor(ui->lineColoringFavorites); }
void OptionsWindow::on_lineColoringFavoritesBorder_textChanged()
{ setColor(ui->lineColoringFavoritesBorder); }
void OptionsWindow::on_lineColoringKeptForLater_textChanged()
{ setColor(ui->lineColoringKeptForLater); }
void OptionsWindow::on_lineColoringBlacklisteds_textChanged()
{ setColor(ui->lineColoringBlacklisteds); }
void OptionsWindow::on_lineColoringBlacklistedsBorder_textChanged()
{ setColor(ui->lineColoringBlacklistedsBorder); }
void OptionsWindow::on_lineColoringIgnoreds_textChanged()
{ setColor(ui->lineColoringIgnoreds); }
void OptionsWindow::on_lineBorderColor_textChanged()
Expand All @@ -1014,10 +1022,14 @@ void OptionsWindow::on_buttonColoringGeneralsColor_clicked()
{ setColor(ui->lineColoringGenerals, true); }
void OptionsWindow::on_buttonColoringFavoritesColor_clicked()
{ setColor(ui->lineColoringFavorites, true); }
void OptionsWindow::on_buttonColoringFavoritesBorderColor_clicked()
{ setColor(ui->lineColoringFavoritesBorder, true); }
void OptionsWindow::on_buttonColoringKeptForLaterColor_clicked()
{ setColor(ui->lineColoringKeptForLater, true); }
void OptionsWindow::on_buttonColoringBlacklistedsColor_clicked()
{ setColor(ui->lineColoringBlacklisteds, true); }
void OptionsWindow::on_buttonColoringBlacklistedsBorderColor_clicked()
{ setColor(ui->lineColoringBlacklistedsBorder, true); }
void OptionsWindow::on_buttonColoringIgnoredsColor_clicked()
{ setColor(ui->lineColoringIgnoreds, true); }
void OptionsWindow::on_buttonBorderColor_clicked()
Expand Down Expand Up @@ -1435,6 +1447,10 @@ void OptionsWindow::save()
settings->setValue("blacklisteds", ui->lineColoringBlacklisteds->font().toString());
settings->setValue("ignoreds", ui->lineColoringIgnoreds->font().toString());
settings->endGroup();
settings->beginGroup("Borders");
settings->setValue("favorites", ui->lineColoringFavoritesBorder->text());
settings->setValue("blacklisteds", ui->lineColoringBlacklistedsBorder->text());
settings->endGroup();
settings->endGroup();

settings->beginGroup("Margins");
Expand Down
4 changes: 4 additions & 0 deletions src/gui/src/settings/options-window.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ class OptionsWindow : public QDialog
void on_lineColoringModels_textChanged();
void on_lineColoringGenerals_textChanged();
void on_lineColoringFavorites_textChanged();
void on_lineColoringFavoritesBorder_textChanged();
void on_lineColoringKeptForLater_textChanged();
void on_lineColoringBlacklisteds_textChanged();
void on_lineColoringBlacklistedsBorder_textChanged();
void on_lineColoringIgnoreds_textChanged();
void on_buttonColoringArtistsColor_clicked();
void on_buttonColoringCirclesColor_clicked();
Expand All @@ -58,8 +60,10 @@ class OptionsWindow : public QDialog
void on_buttonColoringModelsColor_clicked();
void on_buttonColoringGeneralsColor_clicked();
void on_buttonColoringFavoritesColor_clicked();
void on_buttonColoringFavoritesBorderColor_clicked();
void on_buttonColoringKeptForLaterColor_clicked();
void on_buttonColoringBlacklistedsColor_clicked();
void on_buttonColoringBlacklistedsBorderColor_clicked();
void on_buttonColoringIgnoredsColor_clicked();
void on_buttonColoringArtistsFont_clicked();
void on_buttonColoringCirclesFont_clicked();
Expand Down
Loading

0 comments on commit 147cac2

Please # to comment.