Skip to content

Commit

Permalink
getter for mCursorStyle, make it a private member
Browse files Browse the repository at this point in the history
  • Loading branch information
yatli committed Sep 2, 2016
1 parent 103b9c5 commit ee57c30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ abstract class BaseTextRenderer implements TextRenderer {
private Bitmap mCursorBitmap;
private Bitmap mWorkBitmap;
private int mCursorBitmapCursorMode = -1;
protected int mCursorStyle = 0;
private int mCursorStyle = 0;

public BaseTextRenderer(ColorScheme scheme) {
if (scheme == null) {
Expand Down Expand Up @@ -459,9 +459,12 @@ private void drawCursorHelper(Canvas canvas, Path path, int mode, int shift) {
}
}

public void setCursorStyle(int cursorStyle)
{
public void setCursorStyle(int cursorStyle) {
mCursorStyle = cursorStyle;
}

public int getCursorStyle(){
return mCursorStyle;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void drawTextRun(Canvas canvas, float x, float y, int lineOffset,
// Text at cursor
// Only use invert color with BLOCK cursor.
// For underdash and vertical line, use normal color.
if(mCursorStyle == 0) {
if(getCursorStyle() == 0) {
mTextPaint.setColor(mPalette[TextStyle.ciCursorForeground]);
}
canvas.drawText(text, cursorIndex, cursorIncr, cursorX,
Expand Down

0 comments on commit ee57c30

Please sign in to comment.