summaryrefslogtreecommitdiff
path: root/wx+/tooltip.cpp
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2024-05-10 11:21:56 -0400
committerB. Stack <bgstack15@gmail.com>2024-05-10 11:21:56 -0400
commit7a5f22cfe87f938ef58f92b48ac379dc1c4c81c7 (patch)
tree3ed84995318afbd82d5d98a2ba044f9ba58b57c6 /wx+/tooltip.cpp
parentadd upstream 13.5 (diff)
downloadFreeFileSync-7a5f22cfe87f938ef58f92b48ac379dc1c4c81c7.tar.gz
FreeFileSync-7a5f22cfe87f938ef58f92b48ac379dc1c4c81c7.tar.bz2
FreeFileSync-7a5f22cfe87f938ef58f92b48ac379dc1c4c81c7.zip
add upstream 13.613.6
Diffstat (limited to 'wx+/tooltip.cpp')
-rw-r--r--wx+/tooltip.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/wx+/tooltip.cpp b/wx+/tooltip.cpp
index 14df955c..5b6b5f45 100644
--- a/wx+/tooltip.cpp
+++ b/wx+/tooltip.cpp
@@ -8,10 +8,10 @@
#include <wx/dialog.h>
#include <wx/stattext.h>
#include <wx/sizer.h>
-#include <wx/statbmp.h>
+//#include <wx/statbmp.h>
#include <wx/settings.h>
#include <wx/app.h>
-#include "image_tools.h"
+//#include "image_tools.h"
#include "bitmap_button.h"
#include "dc.h"
#include <gtk/gtk.h>
@@ -21,7 +21,7 @@ using namespace zen;
namespace
{
-const int TIP_WINDOW_OFFSET_DIP = 30;
+const int TIP_WINDOW_OFFSET_DIP = 20;
}
@@ -88,13 +88,14 @@ void Tooltip::show(const wxString& text, wxPoint mousePos, const wxImage* img)
//=> call wxWindow::Show() to "execute"
#endif
- const wxPoint newPos = wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft ?
- mousePos - wxPoint(dipToWxsize(TIP_WINDOW_OFFSET_DIP) + tipWindow_->GetSize().GetWidth(), 0) :
- mousePos + wxPoint(dipToWxsize(TIP_WINDOW_OFFSET_DIP), 0);
+ const wxPoint newPos = mousePos + wxPoint(wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft ?
+ - dipToWxsize(TIP_WINDOW_OFFSET_DIP) - tipWindow_->GetSize().GetWidth() :
+ dipToWxsize(TIP_WINDOW_OFFSET_DIP),
+ dipToWxsize(TIP_WINDOW_OFFSET_DIP));
if (newPos != tipWindow_->GetScreenPosition())
tipWindow_->Move(newPos);
- //attention!!! possible endless loop: mouse pointer must NOT be within tipWindow!
+ //caveat: possible endless loop! mouse pointer must NOT be within tipWindow!
//else it will trigger a wxEVT_LEAVE_WINDOW on middle grid which will hide the window, causing the window to be shown again via this method, etc.
if (!tipWindow_->IsShown())
bgstack15