mirror of https://github.com/AxioDL/metaforce.git
Tooltip adjustments
This commit is contained in:
parent
fc50272ea1
commit
5155157b43
|
@ -21,7 +21,7 @@ class ThemeData
|
||||||
Zeus::CColor m_button2Press = {0.2823, 0.2823, 0.2823, 1.0};
|
Zeus::CColor m_button2Press = {0.2823, 0.2823, 0.2823, 1.0};
|
||||||
Zeus::CColor m_button1Disabled = {0.2823, 0.2823, 0.2823, 0.5};
|
Zeus::CColor m_button1Disabled = {0.2823, 0.2823, 0.2823, 0.5};
|
||||||
Zeus::CColor m_button2Disabled = {0.1725, 0.1725, 0.1725, 0.5};
|
Zeus::CColor m_button2Disabled = {0.1725, 0.1725, 0.1725, 0.5};
|
||||||
Zeus::CColor m_tooltipBg = {0.0, 0.0, 0.0, 0.5};
|
Zeus::CColor m_tooltipBg = {0.0, 0.0, 0.0, 0.65};
|
||||||
public:
|
public:
|
||||||
virtual const Zeus::CColor& viewportBackground() const {return m_vpBg;}
|
virtual const Zeus::CColor& viewportBackground() const {return m_vpBg;}
|
||||||
virtual const Zeus::CColor& toolbarBackground() const {return m_tbBg;}
|
virtual const Zeus::CColor& toolbarBackground() const {return m_tbBg;}
|
||||||
|
|
|
@ -15,7 +15,7 @@ RootView::RootView(IViewManager& viewMan, ViewResources& res, boo::IWindow* wind
|
||||||
commitResources(res);
|
commitResources(res);
|
||||||
resized(rect, rect);
|
resized(rect, rect);
|
||||||
|
|
||||||
m_tooltip.reset(new Tooltip(res, *this, "Test", "Testing"));
|
m_tooltip.reset(new Tooltip(res, *this, "Test", "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi hendrerit nisl quis lobortis mattis. Mauris efficitur, est a vestibulum iaculis, leo orci pellentesque nunc, non rutrum ipsum lectus eget nisl. Aliquam accumsan vestibulum turpis. Duis id lacus ac lectus sollicitudin posuere vel sit amet metus. Aenean nec tortor id enim efficitur accumsan vitae eu ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce magna eros, lacinia a leo eget, volutpat rhoncus urna."));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RootView::destroyed()
|
void RootView::destroyed()
|
||||||
|
|
|
@ -6,6 +6,7 @@ namespace Specter
|
||||||
{
|
{
|
||||||
|
|
||||||
#define TOOLTIP_MAX_WIDTH 316
|
#define TOOLTIP_MAX_WIDTH 316
|
||||||
|
#define TOOLTIP_MAX_TEXT_WIDTH 300
|
||||||
#define TOOLTIP_MARGIN 8
|
#define TOOLTIP_MARGIN 8
|
||||||
|
|
||||||
Tooltip::Tooltip(ViewResources& res, View& parentView, const std::string& title,
|
Tooltip::Tooltip(ViewResources& res, View& parentView, const std::string& title,
|
||||||
|
@ -123,7 +124,7 @@ void Tooltip::resetResources(ViewResources& res)
|
||||||
m_title->typesetGlyphs(m_titleStr);
|
m_title->typesetGlyphs(m_titleStr);
|
||||||
m_message.reset(new MultiLineTextView(res, *this, res.m_mainFont));
|
m_message.reset(new MultiLineTextView(res, *this, res.m_mainFont));
|
||||||
m_message->typesetGlyphs(m_messageStr, Zeus::CColor::skWhite,
|
m_message->typesetGlyphs(m_messageStr, Zeus::CColor::skWhite,
|
||||||
int(TOOLTIP_MAX_WIDTH * rootView().viewRes().pixelFactor()));
|
int(TOOLTIP_MAX_TEXT_WIDTH * rootView().viewRes().pixelFactor()));
|
||||||
|
|
||||||
float pf = res.pixelFactor();
|
float pf = res.pixelFactor();
|
||||||
m_nomWidth = std::min(int(TOOLTIP_MAX_WIDTH * pf),
|
m_nomWidth = std::min(int(TOOLTIP_MAX_WIDTH * pf),
|
||||||
|
|
Loading…
Reference in New Issue