Skip to content

Commit

Permalink
Merge pull request #61496 from timothyqiu/asymmetric-le-3.x
Browse files Browse the repository at this point in the history
[3.x] Fix LineEdit clear button for asymmetric stylebox
  • Loading branch information
akien-mga authored May 31, 2022
2 parents 6047d09 + 1e6747d commit 51e52b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/gui/line_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ bool LineEdit::_is_over_clear_button(const Point2 &p_pos) const {
return false;
}
Ref<Texture> icon = Control::get_icon("clear");
int x_ofs = get_stylebox("normal")->get_offset().x;
int x_ofs = get_stylebox("normal")->get_margin(MARGIN_RIGHT);
return p_pos.x > get_size().width - icon->get_width() - x_ofs;
}

Expand Down

0 comments on commit 51e52b5

Please sign in to comment.