From: <geo...@us...> - 2007-07-17 10:52:32
|
Revision: 2171 http://svn.sourceforge.net/freeorion/revision/?rev=2171&view=rev Author: geoffthemedio Date: 2007-07-17 03:52:35 -0700 (Tue, 17 Jul 2007) Log Message: ----------- Hopefully fixed [ 1755129 ] Planetary Display doesn't scroll. Modified Paths: -------------- trunk/FreeOrion/UI/SidePanel.cpp Modified: trunk/FreeOrion/UI/SidePanel.cpp =================================================================== --- trunk/FreeOrion/UI/SidePanel.cpp 2007-07-16 02:16:50 UTC (rev 2170) +++ trunk/FreeOrion/UI/SidePanel.cpp 2007-07-17 10:52:35 UTC (rev 2171) @@ -1112,17 +1112,14 @@ y += panel->Height(); // may be different for each panel depending whether that panel has been previously left expanded or collapsed } - int available_height = 99999; // impossibly large number + int available_height = y; GG::Wnd* parent = Parent(); if (parent) { int containing_height = parent->Height(); - available_height = containing_height - (UpperLeft() - parent->UpperLeft()).y; // height of visible "page" of panels + available_height = containing_height - 300; // height of visible "page" of panels } - int vscroll_size = std::max(y, available_height); - Resize(GG::Pt(Width(), vscroll_size)); - - m_vscroll->SizeScroll(0, y, MAX_PLANET_DIAMETER, vscroll_size); // adjust size of scrollbar + m_vscroll->SizeScroll(0, y, MAX_PLANET_DIAMETER, available_height); // adjust size of scrollbar m_vscroll->ScrolledSignal(m_vscroll->PosnRange().first, m_vscroll->PosnRange().second, 0, 0); // fake a scroll event in order to update scrollbar and panel container position if (y < available_height + 1) { @@ -1298,7 +1295,7 @@ m_button_next(new GG::Button(w-SystemNameFontSize()-4,4,SystemNameFontSize(),SystemNameFontSize(),"",GG::GUI::GetGUI()->GetFont(ClientUI::Font(),SystemNameFontSize()),GG::CLR_WHITE)), m_star_graphic(0), m_next_pltview_fade_in(0),m_next_pltview_planet_id(UniverseObject::INVALID_OBJECT_ID),m_next_pltview_fade_out(-1), - m_planet_panel_container(new PlanetPanelContainer(0,140,w,h-140)), + m_planet_panel_container(new PlanetPanelContainer(0,140,w,h-170)), m_system_resource_summary(new SystemResourceSummary(MAX_PLANET_DIAMETER,140-20,w-MAX_PLANET_DIAMETER,20)) { TempUISoundDisabler sound_disabler; |