Skip to content
Snippets Groups Projects
Commit 87c06f0f authored by Joe Donofry's avatar Joe Donofry
Browse files

Merge branch 'decrypt-sidebar' of ssh://github.com/Nheko-Reborn/nheko into decrypt-sidebar

parents 994edb83 69b0b68f
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@
- Fix Binding restorMode flooding logs on Qt 5.14.2+
- Fix with some qml styles hidden menu items leave empty space
- Fix encrypted messages not showing a user in the sidebar
- Fix hangs when generating colors with some system theme color schemes (#172)
## [0.7.0] -- 2020-04-19
......
......@@ -541,6 +541,7 @@ utils::generateContrastingHexColor(const QString &input, const QString &backgrou
// If the contrast doesn't meet our criteria,
// try again and again until they do by modifying first
// the lightness and then the saturation of the color.
int iterationCount = 9;
while (contrast < 5) {
// if our lightness is at it's bounds, try changing
// saturation instead.
......@@ -587,6 +588,11 @@ utils::generateContrastingHexColor(const QString &input, const QString &backgrou
}
}
}
// don't loop forever, just give up at some point!
// Someone smart may find a better solution
if (--iterationCount < 0)
break;
}
// get the hex value of the generated color.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment