diff options
| author | Daniel J. Ramirez <djrmuv@gmail.com> | 2017-07-18 14:35:37 -0500 |
|---|---|---|
| committer | Daniel J. Ramirez <djrmuv@gmail.com> | 2017-07-19 13:23:16 -0500 |
| commit | 95f55c8f0d0e56fd039333b611d12f88b74cde78 (patch) | |
| tree | 60f4e8a231d9b2c8d1cb84a69b418eac04adabda /scene | |
| parent | 9cf72d0ae174badab07b1461f576955725375046 (diff) | |
| download | redot-engine-95f55c8f0d0e56fd039333b611d12f88b74cde78.tar.gz | |
Icons can now be added inside line edits (Search icon).
Fixed window title bar margins.
fixed compilation error
Diffstat (limited to 'scene')
| -rw-r--r-- | scene/gui/dialogs.cpp | 4 | ||||
| -rw-r--r-- | scene/gui/line_edit.cpp | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index 8885bec03c..7d7c636bc2 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -584,6 +584,8 @@ Button *ConfirmationDialog::get_cancel() { ConfirmationDialog::ConfirmationDialog() { set_title(RTR("Please Confirm...")); - set_custom_minimum_size(Size2(200, 70)); +#ifdef TOOLS_ENABLED + set_custom_minimum_size(Size2(200, 70) * EDSCALE); +#endif cancel = add_cancel(); } diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index adcf86357d..f4dd3e92cd 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -628,6 +628,12 @@ void LineEdit::_notification(int p_what) { font_color.a *= placeholder_alpha; font_color.a *= disabled_alpha; + if (has_icon("right_icon")) { + Ref<Texture> r_icon = Control::get_icon("right_icon"); + ofs_max -= r_icon->get_width(); + r_icon->draw(ci, Point2(width - r_icon->get_width() - x_ofs, y_ofs), Color(1, 1, 1, disabled_alpha * .9)); + } + int caret_height = font->get_height() > y_area ? y_area : font->get_height(); while (true) { |
