Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

keyframe-line-color

koneroc78163e583a4
diff --git a/toonz/sources/include/toonzqt/spreadsheetviewer.h b/toonz/sources/include/toonzqt/spreadsheetviewer.h
index 9995652df..3b85083b3 100644
--- a/toonz/sources/include/toonzqt/spreadsheetviewer.h
+++ b/toonz/sources/include/toonzqt/spreadsheetviewer.h
@@ -242,7 +242,7 @@ class DVAPI SpreadsheetViewer : public QDialog {
QColor m_frameTextColor; // text color for frame numbers
QColor m_groupNameTextColor; // text color for group name
QColor m_channelNameTextColor; // text color for channel name
- QColor m_cycleColor; // color of zig zag line
+ QColor m_keyframeLineColor; // color of keyframe lines
QColor m_verticalLineColor; // vertical line (black)
Q_PROPERTY(QColor CurrentRowBgColor READ getCurrentRowBgColor WRITE
@@ -259,7 +259,8 @@ class DVAPI SpreadsheetViewer : public QDialog {
setGroupNameTextColor)
Q_PROPERTY(QColor ChannelNameTextColor READ getChannelNameTextColor WRITE
setChannelNameTextColor)
- Q_PROPERTY(QColor CycleColor READ getCycleColor WRITE setCycleColor)
+ Q_PROPERTY(QColor KeyframeLineColor READ getKeyframeLineColor WRITE
+ setKeyframeLineColor)
Q_PROPERTY(QColor VerticalLineColor READ getVerticalLineColor WRITE
setVerticalLineColor)
@@ -387,8 +388,8 @@ public:
m_channelNameTextColor = color;
}
QColor getChannelNameTextColor() const { return m_channelNameTextColor; }
- void setCycleColor(const QColor &color) { m_cycleColor = color; }
- QColor getCycleColor() const { return m_cycleColor; }
+ void setKeyframeLineColor(const QColor &color) { m_keyframeLineColor = color; }
+ QColor getKeyframeLineColor() const { return m_keyframeLineColor; }
void setVerticalLineColor(const QColor &color) {
m_verticalLineColor = color;
}
diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cpp
index 4f85af72c..3cfffab67 100644
--- a/toonz/sources/toonz/xshcellviewer.cpp
+++ b/toonz/sources/toonz/xshcellviewer.cpp
@@ -3006,7 +3006,7 @@ void CellArea::drawKeyframe(QPainter &p, const QRect toBeUpdated) {
int qy = icon_frameAxis + 12;
int zig = 2;
int qx = icon_layerAxis + 5;
- p.setPen(m_viewer->getCycleColor());
+ p.setPen(m_viewer->getKeyframeLineColor());
p.drawLine(o->frameLayerToXY(qy, qx),
o->frameLayerToXY(qy + zig, qx - zig));
while (qy < ymax) {
@@ -3031,7 +3031,7 @@ void CellArea::drawKeyframeLine(QPainter &p, int col,
keyRect.center() + m_viewer->positionToXY(CellPosition(rows.from(), col));
QPoint end =
keyRect.center() + m_viewer->positionToXY(CellPosition(rows.to(), col));
- p.setPen(m_viewer->getTextColor());
+ p.setPen(m_viewer->getKeyframeLineColor());
p.drawLine(QLine(begin, end));
}
diff --git a/toonz/sources/toonz/xsheetviewer.h b/toonz/sources/toonz/xsheetviewer.h
index e6c41699f..14d40ec3e 100644
--- a/toonz/sources/toonz/xsheetviewer.h
+++ b/toonz/sources/toonz/xsheetviewer.h
@@ -224,7 +224,7 @@ class XsheetViewer final : public QFrame, public SaveLoadQSettings {
QColor m_errorTextColor; // error text color (red, probably)
QColor m_selectedTextColor; // text color for the selected cells
QColor m_frameTextColor; // text color for frame numbers
- QColor m_cycleColor; // color of the zig zag line
+ QColor m_keyframeLineColor; // color of keyframe lines
QColor m_currentFrameTextColor; // text color for the current frame row
QColor m_previewFrameTextColor; // frame number in preview range (blue)
QColor m_onionSkinAreaBgColor;
@@ -251,7 +251,8 @@ class XsheetViewer final : public QFrame, public SaveLoadQSettings {
setSelectedTextColor)
Q_PROPERTY(QColor FrameTextColor READ getFrameTextColor WRITE
setFrameTextColor)
- Q_PROPERTY(QColor CycleColor READ getCycleColor WRITE setCycleColor)
+ Q_PROPERTY(QColor KeyframeLineColor READ getKeyframeLineColor WRITE
+ setKeyframeLineColor)
Q_PROPERTY(QColor PreviewFrameTextColor READ getPreviewFrameTextColor WRITE
setPreviewFrameTextColor)
Q_PROPERTY(QColor OnionSkinAreaBgColor READ getOnionSkinAreaBgColor WRITE
@@ -859,9 +860,9 @@ public:
void setCurrentFrameTextColor(const QColor &color) {
m_currentFrameTextColor = color;
}
- QColor getCycleColor() const { return m_cycleColor; }
- void setCycleColor(const QColor &color) {
- m_cycleColor = color;
+ QColor getKeyframeLineColor() const { return m_keyframeLineColor; }
+ void setKeyframeLineColor(const QColor &color) {
+ m_keyframeLineColor = color;
}
QColor getCurrentFrameTextColor() const { return m_currentFrameTextColor; }
void setPreviewFrameTextColor(const QColor &color) {
diff --git a/toonz/sources/toonzqt/functionsheet.cpp b/toonz/sources/toonzqt/functionsheet.cpp
index f88985684..9fcb1e299 100644
--- a/toonz/sources/toonzqt/functionsheet.cpp
+++ b/toonz/sources/toonzqt/functionsheet.cpp
@@ -832,7 +832,7 @@ void FunctionSheetCellViewer::drawCells(QPainter &painter, int r0, int c0,
if (drawValue == Key || drawValue == Inbetween)
painter.setPen(getViewer()->getTextColor());
else {
- QColor semiTranspTextColor = getViewer()->getCycleColor();
+ QColor semiTranspTextColor = getViewer()->getKeyframeLineColor();
semiTranspTextColor.setAlpha(128);
painter.setPen(semiTranspTextColor);
}
@@ -880,8 +880,9 @@ void FunctionSheetCellViewer::drawCells(QPainter &painter, int r0, int c0,
int qx = x0 + 4;
int qy = m_sheet->rowToY(kr1 + 1);
int zig = 2;
- QColor zigzagColor = (isStageObjectCycled) ? getViewer()->getCycleColor()
- : KeyFrameBorderColor;
+ QColor zigzagColor = (isStageObjectCycled)
+ ? getViewer()->getKeyframeLineColor()
+ : KeyFrameBorderColor;
painter.setPen(zigzagColor);
painter.drawLine(QPoint(qx, qy), QPoint(qx - zig, qy + zig));
qy += zig;