Current Cell Indicator color preference
This commit is contained in:
parent
c0d37f34e0
commit
28e29dae52
6 changed files with 22 additions and 5 deletions
|
@ -410,6 +410,9 @@ public:
|
|||
void getCurrentColumnData(TPixel &color) const {
|
||||
color = getColorValue(currentColumnColor);
|
||||
}
|
||||
void getCurrentCellData(TPixel &color) const {
|
||||
color = getColorValue(currentCellColor);
|
||||
}
|
||||
|
||||
LevelNameDisplayType getLevelNameDisplayType() const {
|
||||
return LevelNameDisplayType(getIntValue(levelNameDisplayType));
|
||||
|
|
|
@ -133,6 +133,7 @@ enum PreferencesItemId {
|
|||
syncLevelRenumberWithXsheet,
|
||||
currentTimelineEnabled,
|
||||
currentColumnColor,
|
||||
currentCellColor,
|
||||
levelNameDisplayType,
|
||||
showFrameNumberWithLetters,
|
||||
|
||||
|
|
|
@ -1211,6 +1211,7 @@ QString PreferencesPopup::getUIString(PreferencesItemId id) {
|
|||
{currentTimelineEnabled,
|
||||
tr("Show Current Time Indicator (Timeline Mode only)")},
|
||||
{currentColumnColor, tr("Current Column Color:")},
|
||||
{currentCellColor, tr("Current Cell Color:")},
|
||||
//{ levelNameOnEachMarkerEnabled, tr("Display Level Name on Each Marker")
|
||||
//},
|
||||
{levelNameDisplayType, tr("Level Name Display:")},
|
||||
|
@ -1892,6 +1893,7 @@ QWidget* PreferencesPopup::createXsheetPage() {
|
|||
// insertUI(syncLevelRenumberWithXsheet, lay);
|
||||
// insertUI(currentTimelineEnabled, lay);
|
||||
insertUI(currentColumnColor, lay);
|
||||
insertUI(currentCellColor, lay);
|
||||
// insertUI(showFrameNumberWithLetters, lay);
|
||||
|
||||
lay->setRowStretch(lay->rowCount(), 1);
|
||||
|
|
|
@ -1950,6 +1950,15 @@ QColor XsheetViewer::getSelectedColumnTextColor() const {
|
|||
return currentColumnColor;
|
||||
}
|
||||
|
||||
QColor XsheetViewer::getCellFocusColor() const {
|
||||
// get colors
|
||||
TPixel currentCellPixel;
|
||||
Preferences::instance()->getCurrentCellData(currentCellPixel);
|
||||
QColor currentCellColor((int)currentCellPixel.r, (int)currentCellPixel.g,
|
||||
(int)currentCellPixel.b, 255);
|
||||
return currentCellColor;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool XsheetViewer::event(QEvent *e) {
|
||||
|
|
|
@ -255,9 +255,9 @@ class XsheetViewer final : public QFrame, public SaveLoadQSettings {
|
|||
setSelectedEmptyCellColor)
|
||||
|
||||
// Cell focus
|
||||
QColor m_cellFocusColor;
|
||||
Q_PROPERTY(
|
||||
QColor CellFocusColor READ getCellFocusColor WRITE setCellFocusColor)
|
||||
// QColor m_cellFocusColor;
|
||||
// Q_PROPERTY(
|
||||
// QColor CellFocusColor READ getCellFocusColor WRITE setCellFocusColor)
|
||||
|
||||
// Play range
|
||||
QColor m_playRangeColor;
|
||||
|
@ -828,8 +828,8 @@ public:
|
|||
QColor getSelectedEmptyCellColor() const { return m_selectedEmptyCellColor; }
|
||||
|
||||
// Cell focus
|
||||
void setCellFocusColor(const QColor &color) { m_cellFocusColor = color; }
|
||||
QColor getCellFocusColor() const { return m_cellFocusColor; }
|
||||
// void setCellFocusColor(const QColor &color) { m_cellFocusColor = color; }
|
||||
QColor getCellFocusColor() const; // { return m_cellFocusColor; }
|
||||
|
||||
// Play range
|
||||
QColor getPlayRangeColor() const { return m_playRangeColor; }
|
||||
|
|
|
@ -582,6 +582,8 @@ void Preferences::definePreferenceItems() {
|
|||
true);
|
||||
define(currentColumnColor, "currentColumnColor", QMetaType::QColor,
|
||||
QColor(Qt::yellow));
|
||||
define(currentCellColor, "currentCellColor", QMetaType::QColor,
|
||||
QColor(Qt::black));
|
||||
// define(levelNameOnEachMarkerEnabled, "levelNameOnEachMarkerEnabled",
|
||||
// QMetaType::Bool, false);
|
||||
define(levelNameDisplayType, "levelNameDisplayType", QMetaType::Int,
|
||||
|
|
Loading…
Reference in a new issue