os-patches icon indicating copy to clipboard operation
os-patches copied to clipboard

Diff code highlight highlights only in high contrast theme

Open marmeladapk opened this issue 6 years ago • 1 comments

Prerequisites

  • [x] I have searched open and closed issues for duplicates.

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

  • [ ] I'm using the latest version from git that I've manually compiled
  • [x] I'm using the latest released stable version

marmeladapk avatar Sep 30 '19 16:09 marmeladapk

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

cassidyjames avatar Sep 30 '19 18:09 cassidyjames

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).

ryonakano avatar Sep 16 '24 00:09 ryonakano