mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-08 00:44:56 -04:00
Status/tootips additions: Gain, Bookmarks. Fix Bookmark mousewheel handling (for Windows <= 7) for the tree view
This commit is contained in:
@@ -113,6 +113,11 @@ void GainCanvas::OnMouseMoved(wxMouseEvent& event) {
|
||||
if (mouseTracker.mouseDown()) {
|
||||
SetLevel();
|
||||
}
|
||||
else {
|
||||
if (!helpTip.empty()) {
|
||||
setStatusText(helpTip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GainCanvas::OnMouseDown(wxMouseEvent& event) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -64,6 +64,5 @@ protected:
|
||||
long long lastBandwidth;
|
||||
|
||||
bool isView;
|
||||
std::string lastToolTip;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user