Improve button min. size calculation.
This commit is contained in:
parent
5708a3a02e
commit
ea379e3b3a
5 changed files with 104 additions and 26 deletions
|
|
@ -66,7 +66,7 @@ Size2 CheckBox::get_minimum_size() const {
|
|||
Size2 minsize = Button::get_minimum_size();
|
||||
const Size2 tex_size = get_icon_size();
|
||||
if (tex_size.width > 0 || tex_size.height > 0) {
|
||||
const Size2 padding = _get_current_stylebox()->get_minimum_size();
|
||||
const Size2 padding = _get_largest_stylebox_size();
|
||||
Size2 content_size = minsize - padding;
|
||||
if (content_size.width > 0 && tex_size.width > 0) {
|
||||
content_size.width += MAX(0, theme_cache.h_separation);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue