diff --git a/specter/include/Specter/PathButtons.hpp b/specter/include/Specter/PathButtons.hpp index 845d86eb4..54c4420c2 100644 --- a/specter/include/Specter/PathButtons.hpp +++ b/specter/include/Specter/PathButtons.hpp @@ -70,11 +70,7 @@ public: void setMultiplyColor(const Zeus::CColor& color); /* Fill all available space in container when requested */ - void containerResized(const boo::SWindowRect& root, const boo::SWindowRect& sub) - { - if (m_fillContainer) - View::resized(root, sub); - } + void containerResized(const boo::SWindowRect& root, const boo::SWindowRect& sub); }; } diff --git a/specter/lib/PathButtons.cpp b/specter/lib/PathButtons.cpp index 2641fdd57..a8d095d74 100644 --- a/specter/lib/PathButtons.cpp +++ b/specter/lib/PathButtons.cpp @@ -1,5 +1,6 @@ #include "Specter/PathButtons.hpp" #include "Specter/RootView.hpp" +#include "Specter/ViewResources.hpp" namespace Specter { @@ -73,6 +74,16 @@ void PathButtons::ContentView::resized(const boo::SWindowRect& root, const boo:: } } +void PathButtons::containerResized(const boo::SWindowRect& root, const boo::SWindowRect& sub) +{ + if (m_fillContainer) + { + boo::SWindowRect fillRect = sub; + fillRect.size[1] = 20 * rootView().viewRes().pixelFactor(); + View::resized(root, fillRect); + } +} + void PathButtons::ContentView::draw(boo::IGraphicsCommandQueue* gfxQ) { gfxQ->setScissor(m_scissorRect); diff --git a/specter/lib/Toolbar.cpp b/specter/lib/Toolbar.cpp index 9f49df63b..8f346ae7c 100644 --- a/specter/lib/Toolbar.cpp +++ b/specter/lib/Toolbar.cpp @@ -139,9 +139,9 @@ void Toolbar::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) float gaugeUnit = rootView().viewRes().pixelFactor() * SPECTER_TOOLBAR_GAUGE; float yOff = 0.0; - boo::SWindowRect childRect = sub; for (std::vector>& u : m_children) { + boo::SWindowRect childRect = sub; boo::SWindowRect containRect = sub; containRect.location[0] += m_padding; containRect.size[0] -= m_padding * 2;