More attempts at tweaking ribbon row-count decision formula
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8695 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
d75a365da9
commit
ab3822242f
@ -227,8 +227,9 @@ void DynamicRibbonWidget::add()
|
||||
// will be penalized. A configuration that makes items much smaller than
|
||||
// requested in the XML file will also be penalized.
|
||||
float ratio = (float)item_height / (float)m_child_height;
|
||||
float total_area = m_w * m_h;
|
||||
const int score = int(log(2.0f*visible_items) *
|
||||
std::min(ratio, 1.0f) * taken_area);
|
||||
std::min(ratio, 1.0f) * std::min(taken_area/total_area, 1.0f));
|
||||
|
||||
//std::cout << " " << row_count << " rows : " << visible_items << " visible items; area = "
|
||||
// << taken_area << "; size penalty = " << std::min((float)item_height / (float)m_child_height, 1.0f)
|
||||
|
Loading…
Reference in New Issue
Block a user