@@ -95,6 +95,7 @@ public class Theme {
95
95
96
96
public SyntaxScheme scheme ;
97
97
98
+ public Color gutterBackgroundColor ;
98
99
public Color gutterBorderColor ;
99
100
public Color activeLineRangeColor ;
100
101
public boolean iconRowHeaderInheritsGutterBG ;
@@ -158,7 +159,7 @@ public Theme(RSyntaxTextArea textArea) {
158
159
159
160
Gutter gutter = RSyntaxUtilities .getGutter (textArea );
160
161
if (gutter !=null ) {
161
- bgColor = gutter .getBackground ();
162
+ gutterBackgroundColor = gutter .getBackground ();
162
163
gutterBorderColor = gutter .getBorderColor ();
163
164
activeLineRangeColor = gutter .getActiveLineRangeColor ();
164
165
iconRowHeaderInheritsGutterBG = gutter .getIconRowHeaderInheritsGutterBackground ();
@@ -208,7 +209,7 @@ public void apply(RSyntaxTextArea textArea) {
208
209
209
210
Gutter gutter = RSyntaxUtilities .getGutter (textArea );
210
211
if (gutter !=null ) {
211
- gutter .setBackground (bgColor );
212
+ gutter .setBackground (gutterBackgroundColor );
212
213
gutter .setBorderColor (gutterBorderColor );
213
214
gutter .setActiveLineRangeColor (activeLineRangeColor );
214
215
gutter .setIconRowHeaderInheritsGutterBackground (iconRowHeaderInheritsGutterBG );
@@ -444,6 +445,10 @@ public void save(OutputStream out) throws IOException {
444
445
}
445
446
root .appendChild (elem );
446
447
448
+ elem = doc .createElement ("gutterBackground" );
449
+ elem .setAttribute ("color" , colorToString (gutterBackgroundColor ));
450
+ root .appendChild (elem );
451
+
447
452
elem = doc .createElement ("gutterBorder" );
448
453
elem .setAttribute ("color" , colorToString (gutterBorderColor ));
449
454
root .appendChild (elem );
@@ -620,7 +625,7 @@ public static void load(Theme theme, InputStream in) throws IOException {
620
625
is .setEncoding ("UTF-8" );
621
626
reader .parse (is );
622
627
} catch (/*SAX|ParserConfiguration*/ Exception se ) {
623
- se .printStackTrace ();
628
+ // se.printStackTrace();
624
629
throw new IOException (se .toString ());
625
630
}
626
631
}
@@ -655,6 +660,7 @@ public void startElement(String uri, String localName, String qName,
655
660
String color = attrs .getValue ("color" );
656
661
if (color !=null ) {
657
662
theme .bgColor = stringToColor (color , getDefaultBG ());
663
+ theme .gutterBackgroundColor = theme .bgColor ;
658
664
}
659
665
else {
660
666
String img = attrs .getValue ("image" );
@@ -703,6 +709,13 @@ else if ("foldIndicator".equals(qName)) {
703
709
theme .armedFoldBG = stringToColor (color );
704
710
}
705
711
712
+ else if ("gutterBackground" .equals (qName )) {
713
+ String color = attrs .getValue ("color" );
714
+ if (color !=null ) {
715
+ theme .gutterBackgroundColor = stringToColor (color );
716
+ }
717
+ }
718
+
706
719
else if ("gutterBorder" .equals (qName )) {
707
720
String color = attrs .getValue ("color" );
708
721
theme .gutterBorderColor = stringToColor (color );
0 commit comments