mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
[escher] TextView: avoid useless markRectAsDirty when updating
backgroundColor and textColor
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
#include <escher/text_view.h>
|
||||
|
||||
void TextView::setBackgroundColor(KDColor backgroundColor) {
|
||||
m_backgroundColor = backgroundColor;
|
||||
markRectAsDirty(bounds());
|
||||
if (m_backgroundColor != backgroundColor) {
|
||||
m_backgroundColor = backgroundColor;
|
||||
markRectAsDirty(bounds());
|
||||
}
|
||||
}
|
||||
|
||||
void TextView::setTextColor(KDColor textColor) {
|
||||
m_textColor = textColor;
|
||||
markRectAsDirty(bounds());
|
||||
if (m_textColor != textColor) {
|
||||
m_textColor = textColor;
|
||||
markRectAsDirty(bounds());
|
||||
}
|
||||
}
|
||||
|
||||
void TextView::setAlignment(float horizontalAlignment, float verticalAlignment) {
|
||||
|
||||
Reference in New Issue
Block a user