ui: Show title bar at top and scroll bar at bottom in code view snippet list if necessary (issues #432, #479)

* Show title bar at top of snippet list if first file is cut off
* Show scrollbar at bottom of snippet list if last snippet if cut off and horizontally scrollable
* Extended scrollRequest API to different ScrollTarget modes
* Fixed snippet extension broken if maximized first
* Split off title bar functionality to separate class QtCodeFileTitleBar
This commit is contained in:
Eberhard Graether
2017-12-17 13:25:11 +01:00
parent c91f5282f5
commit 8672d14319
17 changed files with 736 additions and 289 deletions
@@ -126,6 +126,21 @@ void QtCodeFileTitleButton::updateTexts()
setToolTip(toolTip.c_str());
}
void QtCodeFileTitleButton::updateFromOther(const QtCodeFileTitleButton* other)
{
if (!other->m_filePath.empty())
{
setFilePath(other->m_filePath);
}
else
{
setProject(other->text().toStdString());
}
setModificationTime(other->m_modificationTime);
setIsComplete(other->m_isComplete);
}
void QtCodeFileTitleButton::contextMenuEvent(QContextMenuEvent* event)
{
FilePath path = m_filePath;