[dark mode] No CSS styling for the commit message in the staging view
commitb07cc4fb86ee71b020e2a7dd6b72f6e3fd22cac7
authorThomas Wolf <thomas.wolf@paranor.ch>
Tue, 8 Feb 2022 15:28:58 +0000 (8 16:28 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 10 Feb 2022 00:22:28 +0000 (9 19:22 -0500)
treeb94fa448c54e5cc1d33faef89ff747e9bbfa516f
parent72a5e0a17a7b6c5270df0d5f55e393fa491b37f8
[dark mode] No CSS styling for the commit message in the staging view

The commit message editor in the staging view behaves like a text
editor and uses the text editor preferences for colors and fonts.
Unfortunately, the text editor color preferences are overwritten
by CSS styling, with the result that they are effectively ignored
in dark mode. But if a user defines non-standard colors, these choices
should be respected no matter what the CSS defines. The CSS should only
define the default appearance if not overridden by user-settable
preferences.

The fix is to disable CSS styling of the StyledText widget. The
SpellcheckableMessageArea is implemented like a text editor, updating
correctly when the editor preferences change. Themeing updates these
preferences, and thus the net result is that the commit message editor
still honors the theme, plus additionally any overrides the user might
have defined via the preferences.

Bug: 559321
Change-Id: I88e4b1d8d2653aec275241a78064a7e2511a0380
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui/css/e4-dark_egit_prefstyle.css
org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitAndDiffComponent.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FindToolbar.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java