mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 03:30:44 +00:00
fix turn graph tooltips off problem.
This commit is contained in:
parent
c5aa443a4e
commit
570915e6c1
@ -169,8 +169,11 @@ w+=m_spacer*2;
|
|||||||
h+=m_spacer*2; */
|
h+=m_spacer*2; */
|
||||||
//}
|
//}
|
||||||
|
|
||||||
void gToolTip::display(QString text, int x, int y, ToolTipAlignment align, int timeout)
|
void gToolTip::display(QString text, int x, int y, ToolTipAlignment align, int timeout,bool alwaysShow)
|
||||||
{
|
{
|
||||||
|
if (!alwaysShow && !AppSetting->graphTooltips()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (timeout <= 0) {
|
if (timeout <= 0) {
|
||||||
timeout = AppSetting->tooltipTimeout();
|
timeout = AppSetting->tooltipTimeout();
|
||||||
}
|
}
|
||||||
@ -343,7 +346,7 @@ void gParentToolTip::paint(QPainter &painter,int width,int height) {
|
|||||||
if (!m_parent_visible) {return ;};
|
if (!m_parent_visible) {return ;};
|
||||||
m_width=width;
|
m_width=width;
|
||||||
m_height=height;
|
m_height=height;
|
||||||
gToolTip::display(m_text, 0, 0,m_alignment, m_timeout);
|
gToolTip::display(m_text, 0, 0,m_alignment, m_timeout,true);
|
||||||
gToolTip::paint(painter);
|
gToolTip::paint(painter);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ class gToolTip : public QObject
|
|||||||
/*! \fn virtual void display(QString text, int x, int y, int timeout=2000);
|
/*! \fn virtual void display(QString text, int x, int y, int timeout=2000);
|
||||||
\brief Set the tooltips display message, position, and timeout value
|
\brief Set the tooltips display message, position, and timeout value
|
||||||
*/
|
*/
|
||||||
virtual void display(QString text, int x, int y, ToolTipAlignment align = TT_AlignCenter, int timeout = 0);
|
virtual void display(QString text, int x, int y, ToolTipAlignment align = TT_AlignCenter, int timeout = 0,bool alwaysShow=false);
|
||||||
|
|
||||||
//! \brief Draw the tooltip
|
//! \brief Draw the tooltip
|
||||||
virtual void paint(QPainter &paint); //actually paints it.
|
virtual void paint(QPainter &paint); //actually paints it.
|
||||||
|
Loading…
Reference in New Issue
Block a user