Vertically center Camera column's keyframe icons

This commit is contained in:
manongjohn 2021-08-24 17:56:35 -04:00
parent 532d68ba71
commit c5750d5af7
2 changed files with 9 additions and 3 deletions

View file

@ -1707,11 +1707,17 @@ void CellArea::drawFrameMarker(QPainter &p, const QPoint &xy, QColor color,
->rect(PredefinedRect::FRAME_MARKER_AREA) ->rect(PredefinedRect::FRAME_MARKER_AREA)
.translated(xy) .translated(xy)
.translated(-frameAdj / 2); .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, m_viewer->drawPredefinedPath(p, PredefinedPath::FRAME_MARKER_DIAMOND,
dotRect.adjusted(1, 1, 1, 1).center(), color, dotRect.adjusted(1, 1, 1, 1).center(), color,
outlineColor); outlineColor);
else { } else {
// move to column center // move to column center
if (m_viewer->orientation()->isVerticalTimeline()) { if (m_viewer->orientation()->isVerticalTimeline()) {
PredefinedLine which = PredefinedLine which =

View file

@ -988,7 +988,7 @@ LeftToRightOrientation::LeftToRightOrientation() {
CELL_HEIGHT - KEY_ICON_HEIGHT - 2, KEY_ICON_WIDTH, CELL_HEIGHT - KEY_ICON_HEIGHT - 2, KEY_ICON_WIDTH,
KEY_ICON_HEIGHT); KEY_ICON_HEIGHT);
addRect(PredefinedRect::KEY_ICON, keyRect); 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); QRect nameRect = cellRect.adjusted(4, 4, -6, 0);
addRect(PredefinedRect::CELL_NAME, nameRect); addRect(PredefinedRect::CELL_NAME, nameRect);
addRect(PredefinedRect::CELL_NAME_WITH_KEYFRAME, nameRect); addRect(PredefinedRect::CELL_NAME_WITH_KEYFRAME, nameRect);