ui: switch to single file mode with snippet maximize
* switch back to snippet view with snippet button in file title bar * use new title bar widget in single view as well * restore view mode on undo, store current view mode for every message id (added id to message) * treat view mode switch as adapt message on undo stack * fixed crash after snippet expansion * fixed hatching in file title not shown
This commit is contained in:
@@ -43,15 +43,10 @@ void QtCodeNavigateable::ensureWidgetVisibleAnimated(
|
||||
switch (target)
|
||||
{
|
||||
case SCROLL_VISIBLE:
|
||||
if (focusRect.top() < visibleRect.top())
|
||||
if (focusRect.top() > visibleRect.top() && focusRect.bottom() < visibleRect.bottom())
|
||||
{
|
||||
value = focusRect.top() - visibleRect.top() - 20;
|
||||
return;
|
||||
}
|
||||
else if (focusRect.bottom() > visibleRect.bottom())
|
||||
{
|
||||
value = focusRect.bottom() - visibleRect.bottom() + 20;
|
||||
}
|
||||
break;
|
||||
|
||||
case SCROLL_CENTER:
|
||||
value = focusRect.center().y() - visibleRect.center().y();
|
||||
|
||||
Reference in New Issue
Block a user