aboutsummaryrefslogtreecommitdiff
path: root/src/ui/control.cpp
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2018-11-19 18:24:32 +0800
committerGitHub <noreply@github.com>2018-11-19 18:24:32 +0800
commit3edc249f48b4d7e692c782c1ca4809e07fa0726f (patch)
tree1fe286351460e13af044346fc444e2189d49a0f4 /src/ui/control.cpp
parentf78359cc042f089b2f99b23dd3df7ae02ecdabec (diff)
parenta8f9fac512cf3e4884cee3b7f655429ece89a025 (diff)
downloadcru-3edc249f48b4d7e692c782c1ca4809e07fa0726f.tar.gz
cru-3edc249f48b4d7e692c782c1ca4809e07fa0726f.tar.bz2
cru-3edc249f48b4d7e692c782c1ca4809e07fa0726f.zip
Merge pull request #21 from crupest/20-rename-methods
Rename two methods in Control.
Diffstat (limited to 'src/ui/control.cpp')
-rw-r--r--src/ui/control.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/control.cpp b/src/ui/control.cpp
index 0595bf5d..8b91b25a 100644
--- a/src/ui/control.cpp
+++ b/src/ui/control.cpp
@@ -152,7 +152,7 @@ namespace cru::ui
LayoutManager::GetInstance()->InvalidateControlPositionCache(this);
if (auto window = GetWindow())
{
- window->Repaint();
+ window->InvalidateDraw();
}
}
}
@@ -169,7 +169,7 @@ namespace cru::ui
SizeChangedEventArgs args(this, this, old_size, size);
RaiseSizeChangedEvent(args);
if (auto window = GetWindow())
- window->Repaint();
+ window->InvalidateDraw();
}
Point Control::GetPositionAbsolute() const
@@ -227,10 +227,10 @@ namespace cru::ui
device_context->SetTransform(old_transform);
}
- void Control::Repaint()
+ void Control::InvalidateDraw()
{
if (window_ != nullptr)
- window_->Repaint();
+ window_->InvalidateDraw();
}
bool Control::RequestFocus()
@@ -333,11 +333,11 @@ namespace cru::ui
return p;
}
- void Control::InvalidateBorder()
+ void Control::UpdateBorder()
{
RegenerateBorderGeometry();
InvalidateLayout();
- Repaint();
+ InvalidateDraw();
}
void Control::SetBordered(const bool bordered)
@@ -345,7 +345,7 @@ namespace cru::ui
if (bordered != is_bordered_)
{
is_bordered_ = bordered;
- InvalidateBorder();
+ UpdateBorder();
}
}