mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-09 01:14:51 -04:00
Band activity & Rx frequency widget enhancements
Ensure that these windows have their viewport scrolled fully to the left after deocdes and font changes. Add the band to the separator line but only if we are certain that the decodes below it are on that band. Thanks to Ton PA0TBR for the implementation and testing of the core features of this change. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5207 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+12
-4
@@ -28,6 +28,11 @@ void DisplayText::setContentFont(QFont const& font)
|
||||
cursor.mergeCharFormat (m_charFormat);
|
||||
cursor.clearSelection ();
|
||||
cursor.movePosition (QTextCursor::End);
|
||||
|
||||
// position so viewport scrolled to left
|
||||
cursor.movePosition (QTextCursor::Up);
|
||||
cursor.movePosition (QTextCursor::StartOfLine);
|
||||
|
||||
setTextCursor (cursor);
|
||||
ensureCursorVisible ();
|
||||
}
|
||||
@@ -40,11 +45,9 @@ void DisplayText::mouseDoubleClickEvent(QMouseEvent *e)
|
||||
QTextEdit::mouseDoubleClickEvent(e);
|
||||
}
|
||||
|
||||
void DisplayText::insertLineSpacer()
|
||||
void DisplayText::insertLineSpacer(QString const& line)
|
||||
{
|
||||
QString tt="----------------------------------------";
|
||||
QString bg="#d3d3d3";
|
||||
_insertText(tt,bg);
|
||||
_insertText (line, "#d3d3d3");
|
||||
}
|
||||
|
||||
void DisplayText::_insertText(const QString text, const QString bg)
|
||||
@@ -59,6 +62,11 @@ void DisplayText::_insertText(const QString text, const QString bg)
|
||||
cursor.movePosition (QTextCursor::End, QTextCursor::KeepAnchor);
|
||||
cursor.mergeCharFormat (m_charFormat);
|
||||
cursor.clearSelection ();
|
||||
|
||||
// position so viewport scrolled to left
|
||||
cursor.movePosition (QTextCursor::Up);
|
||||
cursor.movePosition (QTextCursor::StartOfLine);
|
||||
|
||||
setTextCursor (cursor);
|
||||
ensureCursorVisible ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user