From c5750d5af72c26e027a6ccf144a42171c29b4c1c Mon Sep 17 00:00:00 2001 From: manongjohn Date: Tue, 24 Aug 2021 17:56:35 -0400 Subject: [PATCH] Vertically center Camera column's keyframe icons --- toonz/sources/toonz/xshcellviewer.cpp | 10 ++++++++-- toonz/sources/toonzlib/orientation.cpp | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cpp index 839c8484..6f6f1e65 100644 --- a/toonz/sources/toonz/xshcellviewer.cpp +++ b/toonz/sources/toonz/xshcellviewer.cpp @@ -1707,11 +1707,17 @@ void CellArea::drawFrameMarker(QPainter &p, const QPoint &xy, QColor color, ->rect(PredefinedRect::FRAME_MARKER_AREA) .translated(xy) .translated(-frameAdj / 2); - if (isKeyFrame) + if (isKeyFrame) { + if (isCamera && !m_viewer->orientation()->isVerticalTimeline() && + m_viewer->getFrameZoomFactor() <= + m_viewer->orientation()->dimension( + PredefinedDimension::SCALE_THRESHOLD)) + dotRect.adjust(0, -3, 0, -3); + m_viewer->drawPredefinedPath(p, PredefinedPath::FRAME_MARKER_DIAMOND, dotRect.adjusted(1, 1, 1, 1).center(), color, outlineColor); - else { + } else { // move to column center if (m_viewer->orientation()->isVerticalTimeline()) { PredefinedLine which = diff --git a/toonz/sources/toonzlib/orientation.cpp b/toonz/sources/toonzlib/orientation.cpp index efe0c2bb..2ba3b960 100644 --- a/toonz/sources/toonzlib/orientation.cpp +++ b/toonz/sources/toonzlib/orientation.cpp @@ -988,7 +988,7 @@ LeftToRightOrientation::LeftToRightOrientation() { CELL_HEIGHT - KEY_ICON_HEIGHT - 2, KEY_ICON_WIDTH, KEY_ICON_HEIGHT); addRect(PredefinedRect::KEY_ICON, keyRect); - addRect(PredefinedRect::CAMERA_KEY_ICON, keyRect); + addRect(PredefinedRect::CAMERA_KEY_ICON, keyRect.adjusted(0, -4, 0, -4)); QRect nameRect = cellRect.adjusted(4, 4, -6, 0); addRect(PredefinedRect::CELL_NAME, nameRect); addRect(PredefinedRect::CELL_NAME_WITH_KEYFRAME, nameRect);