ui: improved ui of maximized code file window
* Annotations updated when active token Id changes * FileName in window title * Maximize button not shown * Scrolls roughly to the maximized location. * Maximizing also on double click in code snippet
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
QtCodeFileList::QtCodeFileList(QWidget* parent)
|
||||
: QScrollArea(parent)
|
||||
, m_showMaximizeButton(true)
|
||||
{
|
||||
m_frame = std::make_shared<QFrame>(this);
|
||||
|
||||
@@ -52,6 +53,8 @@ void QtCodeFileList::addCodeSnippet(
|
||||
|
||||
file = filePtr.get();
|
||||
m_frame->layout()->addWidget(file);
|
||||
|
||||
file->setShowMaximizeButton(m_showMaximizeButton);
|
||||
}
|
||||
|
||||
file->addCodeSnippet(startLineNumber, code, locationFile, activeTokenIds);
|
||||
@@ -61,3 +64,16 @@ void QtCodeFileList::clearCodeSnippets()
|
||||
{
|
||||
m_files.clear();
|
||||
}
|
||||
|
||||
void QtCodeFileList::setActiveTokenIds(const std::vector<Id>& activeTokenIds)
|
||||
{
|
||||
for (std::shared_ptr<QtCodeFile> file: m_files)
|
||||
{
|
||||
file->setActiveTokenIds(activeTokenIds);
|
||||
}
|
||||
}
|
||||
|
||||
void QtCodeFileList::setShowMaximizeButton(bool show)
|
||||
{
|
||||
m_showMaximizeButton = show;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user