From b8996ed039c2305661a30f867521f4974aa1f10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= Date: Fri, 16 Oct 2020 22:02:50 +0300 Subject: [PATCH 1/1] Fixed: Color saturation for default theme colors The color saturation user preference was not being applied to the default color palette. --- src/gmdocument.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gmdocument.c b/src/gmdocument.c index 87b8a22c..4240b960 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c @@ -713,6 +713,14 @@ void setThemeSeed_GmDocument(iGmDocument *d, const iBlock *seed) { set_Color(tmGopherLinkLastVisitDate_ColorId, get_Color(blue_ColorId)); } set_Color(tmBadLink_ColorId, get_Color(red_ColorId)); + /* Apply the saturation setting. */ + for (int i = tmFirst_ColorId; i < max_ColorId; i++) { + if (!isLink_ColorId(i)) { + iHSLColor color = get_HSLColor(i); + color.sat *= prefs->saturation; + setHsl_Color(i, color); + } + } } if (seed && !isEmpty_Block(seed)) { d->themeSeed = crc32_Block(seed); -- 2.34.1