mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-11 08:39:21 +00:00
* Starting work on resource manager.
* Modified rak::accumulate to require accessing ::result instead of using a reference. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@568 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -64,11 +64,12 @@ Manager::find(Window* w) {
|
||||
|
||||
void
|
||||
Manager::adjust_layout() {
|
||||
int countDynamic = 0;
|
||||
int staticHeight = 0;
|
||||
|
||||
std::for_each(begin(), end(), rak::if_then(std::mem_fun(&Window::is_active), rak::accumulate(staticHeight, std::mem_fun(&Window::get_min_height))));
|
||||
std::for_each(begin(), end(), rak::if_then(std::mem_fun(&Window::is_active), rak::accumulate(countDynamic, std::mem_fun(&Window::is_dynamic))));
|
||||
int staticHeight = std::for_each(begin(), end(),
|
||||
rak::if_then(std::mem_fun(&Window::is_active),
|
||||
rak::accumulate(0, std::mem_fun(&Window::get_min_height)))).m_then.result;
|
||||
int countDynamic = std::for_each(begin(), end(),
|
||||
rak::if_then(std::mem_fun(&Window::is_active),
|
||||
rak::accumulate(0, std::mem_fun(&Window::is_dynamic)))).m_then.result;
|
||||
|
||||
int dynamic = std::max(0, Canvas::get_screen_height() - staticHeight);
|
||||
int height = 0, h;
|
||||
|
||||
Reference in New Issue
Block a user