mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/regression] even_odd_double_buffer_text_cell_with_separator:
simplify selectFirstText code
This commit is contained in:
committed by
LeaNumworks
parent
2c84bb1031
commit
38eaf9b051
@@ -36,8 +36,7 @@ bool EvenOddDoubleBufferTextCellWithSeparator::firstTextSelected() {
|
||||
|
||||
void EvenOddDoubleBufferTextCellWithSeparator::selectFirstText(bool selectFirstText) {
|
||||
m_firstTextSelected = selectFirstText;
|
||||
m_firstBufferTextView.setHighlighted(selectFirstText);
|
||||
m_secondBufferTextView.setHighlighted(!selectFirstText);
|
||||
setHighlighted(isHighlighted());
|
||||
}
|
||||
|
||||
void EvenOddDoubleBufferTextCellWithSeparator::reloadCell() {
|
||||
@@ -46,16 +45,9 @@ void EvenOddDoubleBufferTextCellWithSeparator::reloadCell() {
|
||||
}
|
||||
|
||||
void EvenOddDoubleBufferTextCellWithSeparator::setHighlighted(bool highlight) {
|
||||
m_firstBufferTextView.setHighlighted(false);
|
||||
m_secondBufferTextView.setHighlighted(false);
|
||||
HighlightCell::setHighlighted(highlight);
|
||||
if (isHighlighted()) {
|
||||
if (m_firstTextSelected) {
|
||||
m_firstBufferTextView.setHighlighted(true);
|
||||
} else {
|
||||
m_secondBufferTextView.setHighlighted(true);
|
||||
}
|
||||
}
|
||||
m_firstBufferTextView.setHighlighted(highlight && m_firstTextSelected);
|
||||
m_secondBufferTextView.setHighlighted(highlight && !m_firstTextSelected);
|
||||
}
|
||||
|
||||
void EvenOddDoubleBufferTextCellWithSeparator::setEven(bool even) {
|
||||
|
||||
Reference in New Issue
Block a user