mirror of https://github.com/AxioDL/metaforce.git
Toolbar positioning fix
This commit is contained in:
parent
4197cd69dc
commit
82e7005c41
|
@ -70,11 +70,7 @@ public:
|
||||||
void setMultiplyColor(const Zeus::CColor& color);
|
void setMultiplyColor(const Zeus::CColor& color);
|
||||||
|
|
||||||
/* Fill all available space in container when requested */
|
/* Fill all available space in container when requested */
|
||||||
void containerResized(const boo::SWindowRect& root, const boo::SWindowRect& sub)
|
void containerResized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||||
{
|
|
||||||
if (m_fillContainer)
|
|
||||||
View::resized(root, sub);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "Specter/PathButtons.hpp"
|
#include "Specter/PathButtons.hpp"
|
||||||
#include "Specter/RootView.hpp"
|
#include "Specter/RootView.hpp"
|
||||||
|
#include "Specter/ViewResources.hpp"
|
||||||
|
|
||||||
namespace Specter
|
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)
|
void PathButtons::ContentView::draw(boo::IGraphicsCommandQueue* gfxQ)
|
||||||
{
|
{
|
||||||
gfxQ->setScissor(m_scissorRect);
|
gfxQ->setScissor(m_scissorRect);
|
||||||
|
|
|
@ -139,9 +139,9 @@ void Toolbar::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub)
|
||||||
|
|
||||||
float gaugeUnit = rootView().viewRes().pixelFactor() * SPECTER_TOOLBAR_GAUGE;
|
float gaugeUnit = rootView().viewRes().pixelFactor() * SPECTER_TOOLBAR_GAUGE;
|
||||||
float yOff = 0.0;
|
float yOff = 0.0;
|
||||||
boo::SWindowRect childRect = sub;
|
|
||||||
for (std::vector<ViewChild<View*>>& u : m_children)
|
for (std::vector<ViewChild<View*>>& u : m_children)
|
||||||
{
|
{
|
||||||
|
boo::SWindowRect childRect = sub;
|
||||||
boo::SWindowRect containRect = sub;
|
boo::SWindowRect containRect = sub;
|
||||||
containRect.location[0] += m_padding;
|
containRect.location[0] += m_padding;
|
||||||
containRect.size[0] -= m_padding * 2;
|
containRect.size[0] -= m_padding * 2;
|
||||||
|
|
Loading…
Reference in New Issue