@@ -95,6 +95,7 @@ public class Theme {
9595
9696 public SyntaxScheme scheme ;
9797
98+ public Color gutterBackgroundColor ;
9899 public Color gutterBorderColor ;
99100 public Color activeLineRangeColor ;
100101 public boolean iconRowHeaderInheritsGutterBG ;
@@ -158,7 +159,7 @@ public Theme(RSyntaxTextArea textArea) {
158159
159160 Gutter gutter = RSyntaxUtilities .getGutter (textArea );
160161 if (gutter !=null ) {
161- bgColor = gutter .getBackground ();
162+ gutterBackgroundColor = gutter .getBackground ();
162163 gutterBorderColor = gutter .getBorderColor ();
163164 activeLineRangeColor = gutter .getActiveLineRangeColor ();
164165 iconRowHeaderInheritsGutterBG = gutter .getIconRowHeaderInheritsGutterBackground ();
@@ -208,7 +209,7 @@ public void apply(RSyntaxTextArea textArea) {
208209
209210 Gutter gutter = RSyntaxUtilities .getGutter (textArea );
210211 if (gutter !=null ) {
211- gutter .setBackground (bgColor );
212+ gutter .setBackground (gutterBackgroundColor );
212213 gutter .setBorderColor (gutterBorderColor );
213214 gutter .setActiveLineRangeColor (activeLineRangeColor );
214215 gutter .setIconRowHeaderInheritsGutterBackground (iconRowHeaderInheritsGutterBG );
@@ -444,6 +445,10 @@ public void save(OutputStream out) throws IOException {
444445 }
445446 root .appendChild (elem );
446447
448+ elem = doc .createElement ("gutterBackground" );
449+ elem .setAttribute ("color" , colorToString (gutterBackgroundColor ));
450+ root .appendChild (elem );
451+
447452 elem = doc .createElement ("gutterBorder" );
448453 elem .setAttribute ("color" , colorToString (gutterBorderColor ));
449454 root .appendChild (elem );
@@ -620,7 +625,7 @@ public static void load(Theme theme, InputStream in) throws IOException {
620625 is .setEncoding ("UTF-8" );
621626 reader .parse (is );
622627 } catch (/*SAX|ParserConfiguration*/ Exception se ) {
623- se .printStackTrace ();
628+ // se.printStackTrace();
624629 throw new IOException (se .toString ());
625630 }
626631 }
@@ -655,6 +660,7 @@ public void startElement(String uri, String localName, String qName,
655660 String color = attrs .getValue ("color" );
656661 if (color !=null ) {
657662 theme .bgColor = stringToColor (color , getDefaultBG ());
663+ theme .gutterBackgroundColor = theme .bgColor ;
658664 }
659665 else {
660666 String img = attrs .getValue ("image" );
@@ -703,6 +709,13 @@ else if ("foldIndicator".equals(qName)) {
703709 theme .armedFoldBG = stringToColor (color );
704710 }
705711
712+ else if ("gutterBackground" .equals (qName )) {
713+ String color = attrs .getValue ("color" );
714+ if (color !=null ) {
715+ theme .gutterBackgroundColor = stringToColor (color );
716+ }
717+ }
718+
706719 else if ("gutterBorder" .equals (qName )) {
707720 String color = attrs .getValue ("color" );
708721 theme .gutterBorderColor = stringToColor (color );
0 commit comments