diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-16 18:56:01 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-08-16 18:56:01 +0300 |
commit | 69ea47be1cee7298b65db8104f1c88e51554ba48 (patch) | |
tree | bf4cf799be4d9ceacec548edcd1eff30db92d757 /src/gmdocument.c | |
parent | 6d8bf2508f5e2af36b61cca42ed68cad26c41d56 (diff) |
Added Pure Black and Pure White themes
Font changes cause window redrawing to pause so document layout doesn’t get an intermediate update with a different width.
Sheets are mouse-modal.
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r-- | src/gmdocument.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index 83f94a39..8029671b 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -574,7 +574,7 @@ void reset_GmDocument(iGmDocument *d) { | |||
574 | } | 574 | } |
575 | 575 | ||
576 | void setThemeSeed_GmDocument(iGmDocument *d, const iBlock *seed) { | 576 | void setThemeSeed_GmDocument(iGmDocument *d, const iBlock *seed) { |
577 | const iBool isLightMode = (colorTheme_App() == light_ColorTheme); | 577 | const iBool isLightMode = isLight_ColorTheme(colorTheme_App()); |
578 | static const iChar siteIcons[] = { | 578 | static const iChar siteIcons[] = { |
579 | 0x203b, 0x2042, 0x205c, 0x2182, 0x25ed, 0x2600, 0x2601, 0x2604, 0x2605, 0x2606, | 579 | 0x203b, 0x2042, 0x205c, 0x2182, 0x25ed, 0x2600, 0x2601, 0x2604, 0x2605, 0x2606, |
580 | 0x265c, 0x265e, 0x2690, 0x2691, 0x2693, 0x2698, 0x2699, 0x26f0, 0x270e, 0x2728, | 580 | 0x265c, 0x265e, 0x2690, 0x2691, 0x2693, 0x2698, 0x2699, 0x26f0, 0x270e, 0x2728, |
@@ -722,6 +722,7 @@ void setThemeSeed_GmDocument(iGmDocument *d, const iBlock *seed) { | |||
722 | for (int i = tmFirst_ColorId; i < max_ColorId; i++) { | 722 | for (int i = tmFirst_ColorId; i < max_ColorId; i++) { |
723 | iHSLColor color = hsl_Color(get_Color(i)); | 723 | iHSLColor color = hsl_Color(get_Color(i)); |
724 | if (isLightMode) { | 724 | if (isLightMode) { |
725 | if (isLink_ColorId(i)) continue; | ||
725 | color.lum = 1.0f - color.lum; /* All colors invert lightness. */ | 726 | color.lum = 1.0f - color.lum; /* All colors invert lightness. */ |
726 | if (isRegularText_ColorId(i)) { | 727 | if (isRegularText_ColorId(i)) { |
727 | /* Darken paragraphs and default state link text. */ | 728 | /* Darken paragraphs and default state link text. */ |
@@ -734,12 +735,14 @@ void setThemeSeed_GmDocument(iGmDocument *d, const iBlock *seed) { | |||
734 | else if (i == tmHeading3_ColorId) { | 735 | else if (i == tmHeading3_ColorId) { |
735 | color.lum *= 0.75f; | 736 | color.lum *= 0.75f; |
736 | } | 737 | } |
738 | #if 0 | ||
737 | else if (isLink_ColorId(i)) { | 739 | else if (isLink_ColorId(i)) { |
738 | /* Darken links generally to improve visibility against a | 740 | /* Darken links generally to improve visibility against a |
739 | light background. */ | 741 | light background. */ |
740 | color.lum *= 0.5f; | 742 | color.lum *= 0.5f; |
741 | color.sat = 1.0f; | 743 | color.sat = 1.0f; |
742 | } | 744 | } |
745 | #endif | ||
743 | else if (i == tmBannerIcon_ColorId || i == tmBannerTitle_ColorId) { | 746 | else if (i == tmBannerIcon_ColorId || i == tmBannerTitle_ColorId) { |
744 | if (isBannerLighter) { | 747 | if (isBannerLighter) { |
745 | color.lum *= 0.75f; | 748 | color.lum *= 0.75f; |
@@ -750,11 +753,12 @@ void setThemeSeed_GmDocument(iGmDocument *d, const iBlock *seed) { | |||
750 | } | 753 | } |
751 | else if (i == tmBannerBackground_ColorId) { | 754 | else if (i == tmBannerBackground_ColorId) { |
752 | if (isBannerLighter) { | 755 | if (isBannerLighter) { |
753 | color.lum = 1.0f; | 756 | //color.lum = iMin(0.9, color.lum); |
757 | color = hsl_Color(get_Color(tmBackground_ColorId)); | ||
754 | } | 758 | } |
755 | else { | 759 | else { |
756 | color.sat *= 0.8f; | 760 | color.sat *= 0.8f; |
757 | color.lum = 0.4f; | 761 | color.lum = 0.6f; |
758 | } | 762 | } |
759 | } | 763 | } |
760 | else if (isText_ColorId(i)) { | 764 | else if (isText_ColorId(i)) { |