From 766801d0b1c62a97b1dc826234f6b1f881ea569b Mon Sep 17 00:00:00 2001 From: bob Date: Mon, 21 Nov 2016 17:01:18 -0500 Subject: [PATCH 1/2] Fixed Child ToolTip not clearing on OnMouseLeave, added SetSplitPosX to Properties --- gwen/include/Gwen/Controls/Properties.h | 1 + gwen/src/Controls/Base.cpp | 4 ++++ gwen/src/Controls/Properties.cpp | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/gwen/include/Gwen/Controls/Properties.h b/gwen/include/Gwen/Controls/Properties.h index bf3872e5..c1007345 100644 --- a/gwen/include/Gwen/Controls/Properties.h +++ b/gwen/include/Gwen/Controls/Properties.h @@ -37,6 +37,7 @@ namespace Gwen PropertyRow* Find( const TextObject & text ); virtual int GetSplitWidth(); + virtual void SetSplitPosX(int x); virtual void Clear(); diff --git a/gwen/src/Controls/Base.cpp b/gwen/src/Controls/Base.cpp index 93fa8c49..58497224 100644 --- a/gwen/src/Controls/Base.cpp +++ b/gwen/src/Controls/Base.cpp @@ -645,6 +645,10 @@ void Base::OnMouseLeave() if ( GetToolTip() ) { ToolTip::Disable( this ); } + else if (GetParent() && GetParent()->GetToolTip()) + { + ToolTip::Disable(GetParent()); + } Redraw(); } diff --git a/gwen/src/Controls/Properties.cpp b/gwen/src/Controls/Properties.cpp index 1c667f6f..d77d4699 100644 --- a/gwen/src/Controls/Properties.cpp +++ b/gwen/src/Controls/Properties.cpp @@ -23,6 +23,12 @@ GWEN_CONTROL_CONSTRUCTOR( Properties ) m_SplitterBar->DoNotIncludeInSize(); } +void Properties::SetSplitPosX(int x) +{ + m_SplitterBar->SetPos(x, 0); + InvalidateChildren(); +} + void Properties::PostLayout( Gwen::Skin::Base* /*skin*/ ) { if ( SizeToChildren( false, true ) ) From c105b9be5fbc93421bdf8b038a6b343419715162 Mon Sep 17 00:00:00 2001 From: bob Date: Mon, 21 Nov 2016 19:46:39 -0500 Subject: [PATCH 2/2] Renamed SetSplitPosX to SetSplitWidth for consistency --- gwen/include/Gwen/Controls/Properties.h | 2 +- gwen/src/Controls/Properties.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gwen/include/Gwen/Controls/Properties.h b/gwen/include/Gwen/Controls/Properties.h index c1007345..bfe33df6 100644 --- a/gwen/include/Gwen/Controls/Properties.h +++ b/gwen/include/Gwen/Controls/Properties.h @@ -37,7 +37,7 @@ namespace Gwen PropertyRow* Find( const TextObject & text ); virtual int GetSplitWidth(); - virtual void SetSplitPosX(int x); + virtual void SetSplitWidth(int x); virtual void Clear(); diff --git a/gwen/src/Controls/Properties.cpp b/gwen/src/Controls/Properties.cpp index d77d4699..fa6a90b9 100644 --- a/gwen/src/Controls/Properties.cpp +++ b/gwen/src/Controls/Properties.cpp @@ -23,7 +23,7 @@ GWEN_CONTROL_CONSTRUCTOR( Properties ) m_SplitterBar->DoNotIncludeInSize(); } -void Properties::SetSplitPosX(int x) +void Properties::SetSplitWidth(int x) { m_SplitterBar->SetPos(x, 0); InvalidateChildren();