2023-03-10 06:32 AM
Hi,
As the TextArea::setBaselineY() is not mirrored with a getter TextArea::getBaselineY() I wonder whether it is a design decision or simply overlook.
Thanks
2023-03-14 07:36 AM
Hello ferro,
Actually the setBaseline() function will move the widget entirely, so getting a value like this would not be different than getting your widget Y-position. This is not the same for the setIndentation() function however, where only the text will "move" and not the widget.
/Osman
2023-03-15 04:29 AM
Hi @Osman SOYKURT
"Actually the setBaseline() function will move the widget entirely"
Yes ! I realized that while tinkering with a vertical alignment.
"getting a value like this [ getBaseline () ] would not be different than getting your widget Y-position"
I think the hypothetical getBaseline () sbould differ from getY() by getTypedText().getFont()->getBaseline() as
//TextArea.hpp
virtual void TextArea::setBaselineY(int16_t baselineY)
{
setY(baselineY - getTypedText().getFont()->getBaseline());
}