elementary / os-patches

Patched packages for elementary OS and the tools that keep them up-to-date
GNU General Public License v3.0
18 stars 10 forks source link

Diff code highlight highlights only in high contrast theme #66

Closed marmeladapk closed 1 month ago

marmeladapk commented 5 years ago

Prerequisites

Describe the bug

Diff code highlight highlights only in high contrast theme.

To Reproduce

Steps to reproduce the behavior:

  1. Open any patch file generated by git (or paste output of diff command)
  2. Select diff code highlight
  3. Change themes in options

Expected behavior

Highlight should work with all themes.

Screenshots or screen recordings

Zrzut ekranu z 2019-09-30 18 20 05 Zrzut ekranu z 2019-09-30 18 20 15 Zrzut ekranu z 2019-09-30 18 20 31

Logs

Platform Information

Zrzut ekranu z 2019-09-30 18 24 03

cassidyjames commented 5 years ago

I can confirm this behavior, but I bet it’s actually caused by the Solarized highlighting themes themselves:

https://github.com/elementary/os-patches/blob/gtksourceview3-bionic-patched/data/styles/solarized-dark.xml https://github.com/elementary/os-patches/blob/gtksourceview3-bionic-patched/data/styles/solarized-light.xml

ryonakano commented 1 month ago

Closing because Code now uses elementary-light and elementary-dark styles instead of solarized ones, which can highlight diffs nicely:

スクリーンショット 2024-09-16 09 39 40 スクリーンショット 2024-09-16 09 39 43

You'll still face this behavior if you set solarized-light or solarized-dark to the /io/elementary/code/settings/style-scheme gschema key directly through gsettings command or dconf-editor, but that operation is not recommended/supported officially. Also, the solarized themes comes with gtksourceview >= 5.5.0 has been updated to highlight diffs, so this corner case should be fixed anyways once Code migrate to gtksourceview 5 (which means migration to GTK 4).