highlight active thumbnail view

preferencesAboutTextFull
Clément Fauconnier 7 years ago
parent 3c6b06e332
commit 8645c28471
  1. 3
      src/board/UBBoardController.cpp
  2. 2
      src/document/UBDocumentContainer.cpp
  3. 7
      src/gui/UBThumbnailWidget.h

@ -1598,6 +1598,9 @@ void UBBoardController::moveSceneToIndex(int source, int target)
setActiveDocumentScene(target);
mMovingSceneIndex = -1;
//on board thumbnails view
emit moveThumbnailRequired(source, target);
emit activeSceneChanged();
}
}

@ -76,8 +76,6 @@ bool UBDocumentContainer::movePageToIndex(int source, int target)
insertThumbPage(target);
emit documentThumbnailsUpdated(this);
//on board thumbnails view
emit moveThumbnailRequired(source, target);
return true;
}

@ -35,6 +35,8 @@
#include <QTime>
#include <QGraphicsSceneHoverEvent>
#include "core/UBApplication.h"
#include "board/UBBoardController.h"
#include "frameworks/UBCoreGraphicsScene.h"
#include "core/UBSettings.h"
#include "domain/UBItem.h"
@ -486,12 +488,15 @@ class UBDraggableThumbnailView : public UBDraggableThumbnail
void setPageNumber(int i)
{
mPageNumber->setPlainText(tr("Page %0").arg(i+1));
if (UBApplication::boardController->activeSceneIndex() == i)
mPageNumber->setDefaultTextColor(QColor("#6682b5"));
else
mPageNumber->setDefaultTextColor(QColor("#000000"));
}
private:
UBThumbnailView* mThumbnailView;
UBThumbnailTextItem* mPageNumber;
};
namespace UBThumbnailUI

Loading…
Cancel
Save