Add the display of the space and tabulation
This commit is contained in:
parent
43c3092fe3
commit
ee80871434
@ -348,7 +348,7 @@ int32_t BufferText::Display(ewol::OObject2DTextColored* OOText, ewol::OObject2DC
|
|||||||
uint32_t xx = 0;
|
uint32_t xx = 0;
|
||||||
int32_t idX = 0;
|
int32_t idX = 0;
|
||||||
|
|
||||||
color_ts bgColor; //!< Text color
|
color_ts bgColor;
|
||||||
color_ts & tmpppppp = myColorManager->Get(COLOR_CODE_BASIC_BG);
|
color_ts & tmpppppp = myColorManager->Get(COLOR_CODE_BASIC_BG);
|
||||||
OOColored->SetColor(tmpppppp);
|
OOColored->SetColor(tmpppppp);
|
||||||
OOColored->Rectangle( 0, 0, sizeX, sizeY);
|
OOColored->Rectangle( 0, 0, sizeX, sizeY);
|
||||||
@ -391,19 +391,36 @@ int32_t BufferText::Display(ewol::OObject2DTextColored* OOText, ewol::OObject2DC
|
|||||||
selectColor = HLColor->patern->GetColor();
|
selectColor = HLColor->patern->GetColor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bool haveBg = false;
|
||||||
if( true == selHave
|
if( true == selHave
|
||||||
&& selStart <= iii
|
&& selStart <= iii
|
||||||
&& selEnd > iii)
|
&& selEnd > iii)
|
||||||
{
|
{
|
||||||
selectColor = myColorSel;
|
selectColor = myColorSel;
|
||||||
|
OOColored->SetColor(selectColor->GetBG());
|
||||||
|
haveBg = selectColor->HaveBg();
|
||||||
|
} else {
|
||||||
|
if( ' ' == currentChar
|
||||||
|
&& true == globals::IsSetDisplaySpaceChar() )
|
||||||
|
{
|
||||||
|
OOColored->SetColor(myColorSpace);
|
||||||
|
haveBg = true;
|
||||||
|
} else if( '\t' == currentChar
|
||||||
|
&& true == globals::IsSetDisplaySpaceChar() )
|
||||||
|
{
|
||||||
|
OOColored->SetColor(myColorTab);
|
||||||
|
haveBg = true;
|
||||||
|
} else {
|
||||||
|
OOColored->SetColor(selectColor->GetBG());
|
||||||
|
haveBg = selectColor->HaveBg();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
OOColored->SetColor(selectColor->GetBG());
|
|
||||||
OOText->SetColor(selectColor->GetFG());
|
OOText->SetColor(selectColor->GetFG());
|
||||||
coord2D_ts textPos;
|
coord2D_ts textPos;
|
||||||
textPos.x = pixelX-m_displayStartPixelX;
|
textPos.x = pixelX-m_displayStartPixelX;
|
||||||
textPos.y = y;
|
textPos.y = y;
|
||||||
drawSize = OOText->TextAdd(textPos, drawClipping, displayChar);
|
drawSize = OOText->TextAdd(textPos, drawClipping, displayChar);
|
||||||
if (true == selectColor->HaveBg() ) {
|
if (true == haveBg ) {
|
||||||
OOColored->Rectangle( pixelX, y, drawSize, letterHeight, drawClipping);
|
OOColored->Rectangle( pixelX, y, drawSize, letterHeight, drawClipping);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user