From b7a1ea6251556f6d78ec403fb190c2dd37204096 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 4 Dec 2015 19:13:07 -1000 Subject: [PATCH] Toolbar placement fix --- specter/lib/Button.cpp | 4 +++- specter/lib/RootView.cpp | 1 + specter/lib/Toolbar.cpp | 8 +++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/specter/lib/Button.cpp b/specter/lib/Button.cpp index 9d8d6c996..2bfb8d4a8 100644 --- a/specter/lib/Button.cpp +++ b/specter/lib/Button.cpp @@ -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); } diff --git a/specter/lib/RootView.cpp b/specter/lib/RootView.cpp index eac1a913f..3c3d7a763 100644 --- a/specter/lib/RootView.cpp +++ b/specter/lib/RootView.cpp @@ -19,6 +19,7 @@ RootView::RootView(ViewResources& res, boo::IWindow* window) MultiLineTextView* textView1 = new MultiLineTextView(res, *this, res.m_heading18); space1->setContentView(std::unique_ptr(textView1)); Space* space2 = new Space(res, *m_splitView, Toolbar::Position::Bottom); + space2->toolbar().push_back(std::make_unique