Skip to content

Commit

Permalink
Use constexpr for accentcolor adjustment value
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Nov 19, 2024
1 parent 3770453 commit 69bed21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsync/account.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ QColor Account::accentColor() const

auto darknessAdjustment = static_cast<int>((1 - Theme::getColorDarkness(accentColor)) * effectMultiplier);
darknessAdjustment *= darknessAdjustment; // Square the value to pronounce the darkness more in lighter colours
const auto baseAdjustment = 125;
constexpr auto baseAdjustment = 125;
const auto adjusted = Theme::isDarkColor(accentColor) ? accentColor : accentColor.darker(baseAdjustment + darknessAdjustment);
return adjusted;
}
Expand Down

0 comments on commit 69bed21

Please sign in to comment.