FIX:linux hms text display bug
Change-Id: Ia7c51c8233acba2e529a2ba878698bf9c1f567f6
This commit is contained in:
parent
f59d59fbe8
commit
d3e6455cf7
1 changed files with 33 additions and 4 deletions
|
@ -62,7 +62,8 @@ HMSNotifyItem::HMSNotifyItem(wxWindow *parent, HMSItem& item)
|
||||||
this->SetSizer(main_sizer);
|
this->SetSizer(main_sizer);
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
|
||||||
m_hms_content->Bind(wxEVT_ENTER_WINDOW, [this](wxMouseEvent &e) {
|
#ifdef __linux__
|
||||||
|
m_panel_hms->Bind(wxEVT_ENTER_WINDOW, [this](wxMouseEvent& e) {
|
||||||
e.Skip();
|
e.Skip();
|
||||||
if (!m_url.empty()) {
|
if (!m_url.empty()) {
|
||||||
auto font = m_hms_content->GetFont();
|
auto font = m_hms_content->GetFont();
|
||||||
|
@ -72,7 +73,7 @@ HMSNotifyItem::HMSNotifyItem(wxWindow *parent, HMSItem& item)
|
||||||
SetCursor(wxCURSOR_HAND);
|
SetCursor(wxCURSOR_HAND);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
m_hms_content->Bind(wxEVT_LEAVE_WINDOW, [this](wxMouseEvent &e) {
|
m_panel_hms->Bind(wxEVT_LEAVE_WINDOW, [this](wxMouseEvent& e) {
|
||||||
e.Skip();
|
e.Skip();
|
||||||
if (!m_url.empty()) {
|
if (!m_url.empty()) {
|
||||||
auto font = m_hms_content->GetFont();
|
auto font = m_hms_content->GetFont();
|
||||||
|
@ -82,9 +83,37 @@ HMSNotifyItem::HMSNotifyItem(wxWindow *parent, HMSItem& item)
|
||||||
SetCursor(wxCURSOR_ARROW);
|
SetCursor(wxCURSOR_ARROW);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
m_hms_content->Bind(wxEVT_LEFT_UP, [this](wxMouseEvent &e) {
|
m_panel_hms->Bind(wxEVT_LEFT_UP, [this](wxMouseEvent& e) {
|
||||||
if (!m_url.empty()) wxLaunchDefaultBrowser(m_url);
|
if (!m_url.empty()) wxLaunchDefaultBrowser(m_url);
|
||||||
});
|
});
|
||||||
|
m_hms_content->Bind(wxEVT_LEFT_UP, [this](wxMouseEvent& e) {
|
||||||
|
if (!m_url.empty()) wxLaunchDefaultBrowser(m_url);
|
||||||
|
});
|
||||||
|
#else
|
||||||
|
m_hms_content->Bind(wxEVT_ENTER_WINDOW, [this](wxMouseEvent& e) {
|
||||||
|
e.Skip();
|
||||||
|
if (!m_url.empty()) {
|
||||||
|
auto font = m_hms_content->GetFont();
|
||||||
|
font.SetUnderlined(true);
|
||||||
|
m_hms_content->SetFont(font);
|
||||||
|
Layout();
|
||||||
|
SetCursor(wxCURSOR_HAND);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
m_hms_content->Bind(wxEVT_LEAVE_WINDOW, [this](wxMouseEvent& e) {
|
||||||
|
e.Skip();
|
||||||
|
if (!m_url.empty()) {
|
||||||
|
auto font = m_hms_content->GetFont();
|
||||||
|
font.SetUnderlined(false);
|
||||||
|
m_hms_content->SetFont(font);
|
||||||
|
Layout();
|
||||||
|
SetCursor(wxCURSOR_ARROW);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
m_hms_content->Bind(wxEVT_LEFT_UP, [this](wxMouseEvent& e) {
|
||||||
|
if (!m_url.empty()) wxLaunchDefaultBrowser(m_url);
|
||||||
|
});
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
HMSNotifyItem ::~HMSNotifyItem() {
|
HMSNotifyItem ::~HMSNotifyItem() {
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue