Display/Editor colors fixed

This commit is contained in:
serso
2015-02-16 22:30:56 +01:00
parent 70f4ec953a
commit 880343bba4
9 changed files with 22 additions and 20 deletions

View File

@@ -155,7 +155,7 @@ public final class Preferences {
TextColor textColor = textColors.get(themeId);
if (textColor == null) {
final ContextThemeWrapper themeContext = new ContextThemeWrapper(context, themeId);
final TypedArray a = themeContext.obtainStyledAttributes(new int[]{android.R.attr.textColorPrimary, android.R.attr.textColorPrimaryInverse});
final TypedArray a = themeContext.obtainStyledAttributes(themeId, new int[]{R.attr.cpp_text_color, R.attr.cpp_text_color_error});
final int normal = a.getColor(0, Color.BLACK);
final int error = a.getColor(1, Color.WHITE);
a.recycle();

View File

@@ -30,7 +30,6 @@ import org.solovyev.common.MutableObject;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.HashMap;
import java.util.Map;
/**
@@ -40,14 +39,6 @@ import java.util.Map;
*/
public class TextHighlighter implements TextProcessor<TextProcessorEditorResult, String> {
public static final int WHITE = -1;
private static final Map<String, String> nbFontAttributes = new HashMap<String, String>();
static {
nbFontAttributes.put("color", "#008000");
}
private final int red;
private final int green;
private final int blue;
@@ -108,7 +99,7 @@ public class TextHighlighter implements TextProcessor<TextProcessorEditorResult,
MathType.Result mathType = MathType.getType(text, i, numberBuilder.isHexMode());
if (numberBuilder instanceof NumberBuilder) {
final MutableObject<Integer> numberOffset = new MutableObject<Integer>(0);
final MutableObject<Integer> numberOffset = new MutableObject<>(0);
((NumberBuilder) numberBuilder).process(text1, mathType, numberOffset);
resultOffset += numberOffset.getObject();
} else {