mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 10:51:22 +00:00
Merge main
This commit is contained in:
@@ -512,8 +512,8 @@ void Button::OnParentMotion(wxMouseEvent& event)
|
||||
{
|
||||
if (!tipWindow)
|
||||
{
|
||||
tipWindow = new wxTipWindow(this, tip);
|
||||
tipWindow->Bind(wxEVT_DESTROY, [this](wxEvent& event) { this->tipWindow = nullptr;});
|
||||
tipWindow = wxTipWindow::New(this, tip);
|
||||
if (!tipWindow) return event.Skip();
|
||||
tipWindow->Enable(false);
|
||||
}
|
||||
|
||||
@@ -531,7 +531,8 @@ void Button::OnParentMotion(wxMouseEvent& event)
|
||||
{
|
||||
if (tipWindow)
|
||||
{
|
||||
delete tipWindow;
|
||||
tipWindow->Dismiss();
|
||||
tipWindow->Destroy();
|
||||
tipWindow = nullptr;
|
||||
}
|
||||
}
|
||||
@@ -552,7 +553,7 @@ void Button::OnParentLeave(wxMouseEvent& event)
|
||||
if (!screen_rect.Contains(pos))
|
||||
{
|
||||
tipWindow->Dismiss();
|
||||
delete tipWindow;
|
||||
tipWindow->Destroy();
|
||||
tipWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "../wxExtensions.hpp"
|
||||
#include "StaticBox.hpp"
|
||||
#include <wx/tipwin.h>
|
||||
|
||||
class ButtonProps
|
||||
{
|
||||
@@ -28,9 +29,9 @@ enum class ButtonType {
|
||||
Expanded, // Font14 Semi-Rounded For full length buttons. ex. buttons in static box
|
||||
};
|
||||
|
||||
class wxTipWindow;
|
||||
class Button : public StaticBox
|
||||
{
|
||||
wxTipWindow::Ref tipWindow;
|
||||
wxRect textSize;
|
||||
wxSize minSize; // set by outer
|
||||
wxSize paddingSize;
|
||||
|
||||
Reference in New Issue
Block a user