Make text boxes perfectly respect the allocated size
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13478 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
9fb7593efe
commit
9f0bc16ebf
@ -2020,8 +2020,8 @@ void Skin::draw3DSunkenPane (IGUIElement *element, video::SColor bgcolor,
|
|||||||
SColor& border_color_focus = SkinConfig::m_colors["text_field::focused"];
|
SColor& border_color_focus = SkinConfig::m_colors["text_field::focused"];
|
||||||
|
|
||||||
core::recti borderArea = rect;
|
core::recti borderArea = rect;
|
||||||
borderArea.UpperLeftCorner -= position2d< s32 >( 2, 2 );
|
//borderArea.UpperLeftCorner -= position2d< s32 >( 2, 2 );
|
||||||
borderArea.LowerRightCorner += position2d< s32 >( 2, 2 );
|
//borderArea.LowerRightCorner += position2d< s32 >( 2, 2 );
|
||||||
|
|
||||||
// if within an appearing dialog, grow
|
// if within an appearing dialog, grow
|
||||||
if (m_dialog && m_dialog_size < 1.0f && widget->m_parent != NULL &&
|
if (m_dialog && m_dialog_size < 1.0f && widget->m_parent != NULL &&
|
||||||
@ -2046,8 +2046,8 @@ void Skin::draw3DSunkenPane (IGUIElement *element, video::SColor bgcolor,
|
|||||||
GUIEngine::getDriver()->draw2DRectangle(focused ? border_color_focus : border_color, borderArea);
|
GUIEngine::getDriver()->draw2DRectangle(focused ? border_color_focus : border_color, borderArea);
|
||||||
|
|
||||||
core::recti innerArea = borderArea;
|
core::recti innerArea = borderArea;
|
||||||
innerArea.UpperLeftCorner += position2d< s32 >( 2, 2 );
|
innerArea.UpperLeftCorner += position2d< s32 >( 3, 3 );
|
||||||
innerArea.LowerRightCorner -= position2d< s32 >( 2, 2 );
|
innerArea.LowerRightCorner -= position2d< s32 >( 3, 3 );
|
||||||
GUIEngine::getDriver()->draw2DRectangle(focused ? bg_color_focused : bg_color, innerArea);
|
GUIEngine::getDriver()->draw2DRectangle(focused ? bg_color_focused : bg_color, innerArea);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user