mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 05:07:55 +00:00
Another small cleanup.
Now that we only have screen coordinates the set_size hacks in the generator and scroll_container are no longer needed and thus removed.
This commit is contained in:
parent
f3bb08a911
commit
f469350d31
@ -126,16 +126,7 @@ void tvertical_list::set_size(const tpoint& origin, const tpoint& size)
|
||||
// FIXME should we look at grow factors???
|
||||
best_size.x = size.x;
|
||||
|
||||
/*
|
||||
* For set_size to work properly, we need to disable the parent
|
||||
* temporary. Without a parent the screen coordinates won't be
|
||||
* remapped, which is wanted in this case. For event handling the
|
||||
* parent is needed.
|
||||
*/
|
||||
twidget* parent = grid.parent();
|
||||
grid.set_parent(NULL);
|
||||
grid.set_size(current_origin, best_size);
|
||||
grid.set_parent(parent);
|
||||
|
||||
current_origin.y += best_size.y;
|
||||
}
|
||||
|
@ -232,17 +232,7 @@ void tscrollbar_container::
|
||||
std::max(best_size.x, content_size.x),
|
||||
std::max(best_size.y, content_size.y));
|
||||
|
||||
/*
|
||||
* For set_size to work properly, we need to disable the parent
|
||||
* temporary. Without a parent the screen coordinates won't be
|
||||
* remapped, which is wanted in this case. For event handling the
|
||||
* parent is needed.
|
||||
*/
|
||||
twidget* parent = content_grid_->parent();
|
||||
content_grid_->set_parent(NULL);
|
||||
content_grid_->set_size(content_origin, content_grid_size);
|
||||
content_grid_->set_parent(parent);
|
||||
|
||||
|
||||
// Set vertical scrollbar
|
||||
set_scrollbar_mode(vertical_scrollbar_grid_, vertical_scrollbar_,
|
||||
|
Loading…
x
Reference in New Issue
Block a user