Fixed the small icons in the race paused screen that looked weird
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5881 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
</buttonbar>
|
||||
|
||||
<spacer width="20" height="20" />
|
||||
<spacer width="20" height="35" />
|
||||
</div>
|
||||
|
||||
</stkgui>
|
||||
@@ -115,6 +115,11 @@
|
||||
\note Ribbons (e.g. tabs) can have their elements dynamically added at
|
||||
runtime, too. Just add no children to the ribbon in the XML file, and
|
||||
add them at runtime through the method for this.
|
||||
\note The layout algorithm will reserve space for at most one line of text
|
||||
(if needed) for ribbon elements. If you have ribbon elements will
|
||||
long texts that spawn many lines, expect that the extra lines will
|
||||
not be accounted for in the sizing algorithms (i.e. extra lines will
|
||||
just expand over whatever is located under the ribbon)
|
||||
|
||||
\n
|
||||
\subsection widget2 WTYPE_SPINNER
|
||||
|
||||
@@ -121,6 +121,7 @@ void IconButtonWidget::add()
|
||||
false, true /* word wrap */, m_parent);
|
||||
m_label->setTextAlignment(EGUIA_CENTER, EGUIA_UPPERLEFT);
|
||||
m_label->setTabStop(false);
|
||||
m_label->setNotClipped(true);
|
||||
}
|
||||
|
||||
// ---- IDs
|
||||
|
||||
@@ -185,14 +185,7 @@ void RibbonWidget::add()
|
||||
// consider font size, whether the label is multiline, etc...
|
||||
const bool has_label = m_children[i].m_text.size() > 0;
|
||||
|
||||
int line_count = 1;
|
||||
core::dimension2d< u32 > dim = GUIEngine::getFont()->getDimension( m_children[i].m_text.c_str() );
|
||||
if ((int)dim.Width > one_button_space)
|
||||
{
|
||||
line_count = (int)(std::ceil((float)dim.Width/(float)one_button_space));
|
||||
}
|
||||
|
||||
const int needed_space_under_button = has_label ? GUIEngine::getFontHeight()*line_count : 10;
|
||||
const int needed_space_under_button = has_label ? GUIEngine::getFontHeight() : 10;
|
||||
|
||||
float imageRatio = (float)m_children[i].m_w / (float)m_children[i].m_h;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user