summaryrefslogtreecommitdiff
path: root/scene/gui/spin_box.cpp
diff options
context:
space:
mode:
authorDaniel J. Ramirez <djrmuv@gmail.com>2017-01-22 22:40:43 -0600
committerRĂ©mi Verschelde <rverschelde@gmail.com>2017-04-27 08:04:57 +0200
commitf045efe007cffb87238ee519b7f33d710814ded7 (patch)
tree9cb7b21ee73cd6a184ef2b18daff6867b98062d8 /scene/gui/spin_box.cpp
parent5993a5fac9a108297fc7909d1a38abac471d037d (diff)
Add new editor and default theme (WIP)
Diffstat (limited to 'scene/gui/spin_box.cpp')
-rw-r--r--scene/gui/spin_box.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 049adc6fb4..ba8ca63721 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -192,7 +192,12 @@ void SpinBox::_notification(int p_what) {
RID ci = get_canvas_item();
Size2i size = get_size();
- updown->draw(ci, Point2i(size.width - updown->get_width(), (size.height - updown->get_height()) / 2));
+ Color color = has_focus() ? line_edit->get_color("font_color_active") : line_edit->get_color("font_color");
+ if (!is_editable())
+ color = line_edit->get_color("font_color_read_only");
+ updown->draw(ci, Point2i(size.width - updown->get_width(), (size.height - updown->get_height()) / 2), color);
+
+ } else if (p_what == NOTIFICATION_FOCUS_EXIT) {
} else if (p_what == NOTIFICATION_FOCUS_EXIT) {