Status/tootips additions: Gain, Bookmarks. Fix Bookmark mousewheel handling (for Windows <= 7) for the tree view

This commit is contained in:
vsonnier
2017-03-01 22:13:41 +01:00
parent b149da864a
commit 2760d3d12e
8 changed files with 57 additions and 24 deletions
+5
View File
@@ -113,6 +113,11 @@ void GainCanvas::OnMouseMoved(wxMouseEvent& event) {
if (mouseTracker.mouseDown()) {
SetLevel();
}
else {
if (!helpTip.empty()) {
setStatusText(helpTip);
}
}
}
void GainCanvas::OnMouseDown(wxMouseEvent& event) {
+4 -15
View File
@@ -159,24 +159,13 @@ void InteractiveCanvas::OnMouseEnterWindow(wxMouseEvent& event) {
}
void InteractiveCanvas::setStatusText(std::string statusText) {
wxGetApp().getAppFrame()->GetStatusBar()->SetStatusText(statusText);
if (wxGetApp().getConfig()->getShowTips()) {
if (statusText != lastToolTip) {
wxToolTip::Enable(false);
this->SetToolTip(statusText);
lastToolTip = statusText;
wxToolTip::SetDelay(1000);
wxToolTip::Enable(true);
}
} else {
this->SetToolTip("");
lastToolTip = "";
}
wxGetApp().getAppFrame()->setStatusText(this, statusText);
}
void InteractiveCanvas::setStatusText(std::string statusText, int value) {
wxGetApp().getAppFrame()->GetStatusBar()->SetStatusText(
wxString::Format(statusText.c_str(), wxNumberFormatter::ToString((long) value, wxNumberFormatter::Style_WithThousandsSep)));
wxGetApp().getAppFrame()->setStatusText(statusText, value);
}
void InteractiveCanvas::OnMouseRightDown(wxMouseEvent& event) {
-1
View File
@@ -64,6 +64,5 @@ protected:
long long lastBandwidth;
bool isView;
std::string lastToolTip;
};