2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 15:07:43 +00:00

Toolbar placement fix

This commit is contained in:
Jack Andersen
2015-12-04 19:13:07 -10:00
parent 857615ab00
commit b7a1ea6251
3 changed files with 9 additions and 4 deletions

View File

@@ -137,6 +137,8 @@ void Button::mouseDown(const boo::SWindowCoord& coord, boo::EMouseButton button,
void Button::mouseUp(const boo::SWindowCoord& coord, boo::EMouseButton button, boo::EModifierKey mod)
{
if (m_pressed && m_hovered)
Log.report(LogVisor::Info, "button '%s' activated", m_textStr.c_str());
m_pressed = false;
if (m_hovered)
setHover();
@@ -181,7 +183,7 @@ void Button::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub)
m_bBlockBuf->load(&m_bBlock, sizeof(ViewBlock));
float pf = rootView().window()->getVirtualPixelFactor();
textRect.location[0] += 5 * pf;
textRect.location[1] = 11 * pf;
textRect.location[1] += 8 * pf;
m_text->resized(root, textRect);
}