Skip to content

Commit

Permalink
Fix changelog background
Browse files Browse the repository at this point in the history
  • Loading branch information
DHD2280 committed May 2, 2024
1 parent f20cb3a commit 0df7b5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
try {
MarkdownView mMarkdownView = view.findViewById(R.id.changelogView);
InternalStyleSheet css = new Github();
css.addRule("body, kbd", "background-color: " + intToHex(getColorFromAttribute(requireContext(), R.attr.colorSurfaceContainerHigh)));
css.addRule("body, kbd", "background-color: " + intToHex(requireContext().getColor(R.color.changelog_bg)));
css.addRule("body, p, h1, h2, h3, h4, h5, h6, span, div", "color: " + intToHex(getColorFromAttribute(requireContext(), R.attr.colorOnSurface)));
css.addRule("kbd", "border-color: " + intToHex(getColorFromAttribute(requireContext(), R.attr.colorSurfaceContainerHigh)));
css.addRule("kbd", "border-color: " + intToHex(requireContext().getColor(R.color.changelog_bg)));
css.addRule("kbd", "color: " + intToHex(getColorFromAttribute(requireContext(), R.attr.colorOnSurface)));
css.addRule("a", "color: " + intToHex(getColorFromAttribute(requireContext(), R.attr.colorPrimary)));
mMarkdownView.addStyleSheet(css);
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
<color name="colorContainerOverlay">@color/color_container_overlay_dark</color>

<color name="textColorPrimary">@android:color/system_neutral1_100</color>
<color name="changelog_bg">@android:color/system_neutral1_900</color>

</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,6 @@

<color name="ic_launcher_background">#2F3B49</color>

<color name="changelog_bg">@android:color/system_neutral1_50</color>

</resources>

0 comments on commit 0df7b5f

Please sign in to comment.