Camera Column Cell color
This commit is contained in:
parent
5e9945cb2d
commit
89d222fa51
2 changed files with 32 additions and 17 deletions
|
@ -1190,7 +1190,7 @@ void CellArea::drawCells(QPainter &p, const QRect toBeUpdated) {
|
||||||
|
|
||||||
// for each frame
|
// for each frame
|
||||||
for (row = r0; row <= r1; row++) {
|
for (row = r0; row <= r1; row++) {
|
||||||
if (!isColumn) {
|
if (col >= 0 && !isColumn) {
|
||||||
drawFrameSeparator(p, row, col, true);
|
drawFrameSeparator(p, row, col, true);
|
||||||
if (TApp::instance()->getCurrentFrame()->isEditingScene() &&
|
if (TApp::instance()->getCurrentFrame()->isEditingScene() &&
|
||||||
!m_viewer->orientation()->isVerticalTimeline() &&
|
!m_viewer->orientation()->isVerticalTimeline() &&
|
||||||
|
@ -1677,8 +1677,38 @@ void CellArea::drawLevelCell(QPainter &p, int row, int col, bool isReference) {
|
||||||
xy.setX(xy.x() + 1);
|
xy.setX(xy.x() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TXshCell nextCell;
|
||||||
|
nextCell = xsh->getCell(row + 1, col); // cell in next frame
|
||||||
|
|
||||||
|
int frameAdj = m_viewer->getFrameZoomAdjustment();
|
||||||
|
QRect cellRect = o->rect(PredefinedRect::CELL).translated(QPoint(x, y));
|
||||||
|
cellRect.adjust(0, 0, -frameAdj, 0);
|
||||||
|
QRect rect = cellRect.adjusted(
|
||||||
|
1, 1,
|
||||||
|
(!m_viewer->orientation()->isVerticalTimeline() && !nextCell.isEmpty()
|
||||||
|
? 2
|
||||||
|
: 0),
|
||||||
|
0);
|
||||||
|
|
||||||
|
// get cell colors
|
||||||
|
QColor cellColor, sideColor;
|
||||||
|
|
||||||
// nothing to draw
|
// nothing to draw
|
||||||
if (cell.isEmpty() && prevCell.isEmpty()) {
|
if (cell.isEmpty() && prevCell.isEmpty()) {
|
||||||
|
if (col < 0) {
|
||||||
|
TStageObjectId cameraId =
|
||||||
|
m_viewer->getXsheet()->getStageObjectTree()->getCurrentCameraId();
|
||||||
|
bool isActive =
|
||||||
|
cameraId.getIndex() == m_viewer->getXsheet()->getCameraColumnIndex();
|
||||||
|
cellColor = (isSelected)
|
||||||
|
? (isActive ? m_viewer->getSelectedActiveCameraColor()
|
||||||
|
: m_viewer->getSelectedOtherCameraColor())
|
||||||
|
: (isActive ? m_viewer->getActiveCameraColor()
|
||||||
|
: m_viewer->getOtherCameraColor());
|
||||||
|
cellColor.setAlpha(50);
|
||||||
|
// paint cell
|
||||||
|
p.fillRect(rect, QBrush(cellColor));
|
||||||
|
}
|
||||||
drawFrameSeparator(p, row, col, true);
|
drawFrameSeparator(p, row, col, true);
|
||||||
|
|
||||||
if (TApp::instance()->getCurrentFrame()->isEditingScene() &&
|
if (TApp::instance()->getCurrentFrame()->isEditingScene() &&
|
||||||
|
@ -1693,18 +1723,6 @@ void CellArea::drawLevelCell(QPainter &p, int row, int col, bool isReference) {
|
||||||
prevCell.m_frameId == cell.m_frameId);
|
prevCell.m_frameId == cell.m_frameId);
|
||||||
drawFrameSeparator(p, row, col, false, heldFrame);
|
drawFrameSeparator(p, row, col, false, heldFrame);
|
||||||
|
|
||||||
TXshCell nextCell;
|
|
||||||
nextCell = xsh->getCell(row + 1, col); // cell in next frame
|
|
||||||
|
|
||||||
int frameAdj = m_viewer->getFrameZoomAdjustment();
|
|
||||||
QRect cellRect = o->rect(PredefinedRect::CELL).translated(QPoint(x, y));
|
|
||||||
cellRect.adjust(0, 0, -frameAdj, 0);
|
|
||||||
QRect rect = cellRect.adjusted(
|
|
||||||
1, 1,
|
|
||||||
(!m_viewer->orientation()->isVerticalTimeline() && !nextCell.isEmpty()
|
|
||||||
? 2
|
|
||||||
: 0),
|
|
||||||
0);
|
|
||||||
if (cell.isEmpty()) { // it means previous is not empty
|
if (cell.isEmpty()) { // it means previous is not empty
|
||||||
// diagonal cross meaning end of level
|
// diagonal cross meaning end of level
|
||||||
QColor levelEndColor = m_viewer->getTextColor();
|
QColor levelEndColor = m_viewer->getTextColor();
|
||||||
|
@ -1722,8 +1740,6 @@ void CellArea::drawLevelCell(QPainter &p, int row, int col, bool isReference) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get cell colors
|
|
||||||
QColor cellColor, sideColor;
|
|
||||||
if (isReference) {
|
if (isReference) {
|
||||||
cellColor = (isSelected) ? m_viewer->getSelectedReferenceColumnColor()
|
cellColor = (isSelected) ? m_viewer->getSelectedReferenceColumnColor()
|
||||||
: m_viewer->getReferenceColumnColor();
|
: m_viewer->getReferenceColumnColor();
|
||||||
|
|
|
@ -698,8 +698,7 @@ void ColumnArea::DrawHeader::drawBaseFill(const QColor &columnColor,
|
||||||
|
|
||||||
QColor colorSelection(m_viewer->getSelectedColumnHead());
|
QColor colorSelection(m_viewer->getSelectedColumnHead());
|
||||||
colorSelection.setAlpha(170);
|
colorSelection.setAlpha(170);
|
||||||
p.fillRect(rect,
|
p.fillRect(rect, isSelected ? colorSelection : pastelizer);
|
||||||
(isSelected || isCameraSelected) ? colorSelection : pastelizer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColumnArea::DrawHeader::drawEye() const {
|
void ColumnArea::DrawHeader::drawEye() const {
|
||||||
|
|
Loading…
Reference in a new issue