diff options
| author | Gilles Roudiere <gilles.roudiere@gmail.com> | 2017-07-06 09:16:27 +0200 |
|---|---|---|
| committer | Gilles Roudiere <gilles.roudiere@gmail.com> | 2017-08-13 21:20:13 +0200 |
| commit | 0d35d4d53b12197bea3650293bbc342fc0b57139 (patch) | |
| tree | afd384ffb3f6a8511fb7f052a0ef7da7256bfc05 /scene/gui/item_list.cpp | |
| parent | 9575dbdf788e8a5154b3ec2f66913e731ac02850 (diff) | |
| download | redot-engine-0d35d4d53b12197bea3650293bbc342fc0b57139.tar.gz | |
Replace GUI anchor type by a float between 0 and 1
Diffstat (limited to 'scene/gui/item_list.cpp')
| -rw-r--r-- | scene/gui/item_list.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 484051f546..d90f0c7898 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -736,10 +736,10 @@ void ItemList::_notification(int p_what) { Ref<StyleBox> bg = get_stylebox("bg"); int mw = scroll_bar->get_minimum_size().x; - scroll_bar->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_END, mw + bg->get_margin(MARGIN_RIGHT)); - scroll_bar->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, bg->get_margin(MARGIN_RIGHT)); + scroll_bar->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_END, -mw + bg->get_margin(MARGIN_RIGHT)); + scroll_bar->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -bg->get_margin(MARGIN_RIGHT)); scroll_bar->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, bg->get_margin(MARGIN_TOP)); - scroll_bar->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, bg->get_margin(MARGIN_BOTTOM)); + scroll_bar->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, -bg->get_margin(MARGIN_BOTTOM)); Size2 size = get_size(); |
