summaryrefslogtreecommitdiffstats
path: root/scene/gui/check_box.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/check_box.cpp')
-rw-r--r--scene/gui/check_box.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/check_box.cpp b/scene/gui/check_box.cpp
index 0dcd1d4ac4..99937aaf41 100644
--- a/scene/gui/check_box.cpp
+++ b/scene/gui/check_box.cpp
@@ -59,7 +59,7 @@ Size2 CheckBox::get_icon_size() const {
if (!theme_cache.radio_unchecked_disabled.is_null()) {
tex_size = tex_size.max(theme_cache.radio_unchecked_disabled->get_size());
}
- return tex_size;
+ return _fit_icon_size(tex_size);
}
Size2 CheckBox::get_minimum_size() const {
@@ -127,9 +127,9 @@ void CheckBox::_notification(int p_what) {
ofs.y = int((get_size().height - get_icon_size().height) / 2) + theme_cache.check_v_offset;
if (is_pressed()) {
- on_tex->draw(ci, ofs);
+ on_tex->draw_rect(ci, Rect2(ofs, _fit_icon_size(on_tex->get_size())));
} else {
- off_tex->draw(ci, ofs);
+ off_tex->draw_rect(ci, Rect2(ofs, _fit_icon_size(off_tex->get_size())));
}
} break;
}