OpenToonz - An open-source full-featured 2D animation creation software
C
Add customizable current Xsheet cell and column outlines
Rodneybf0092be7492
diff --git a/stuff/config/qss/Blue/Blue.qss b/stuff/config/qss/Blue/Blue.qssindex 3e8339ffc..1395e5ee6 100644--- a/stuff/config/qss/Blue/Blue.qss+++ b/stuff/config/qss/Blue/Blue.qss@@ -3120,6 +3120,7 @@ XsheetViewer {qproperty-CurrentTimeIndicatorColor: hsl(0, 100%, 64%);qproperty-EmptyColumnHeadColor: #43464d;qproperty-CellFocusColor: cyan;+ qproperty-ColumnFocusColor: #79b5ec;qproperty-ColumnHeadPastelizer: transparent;qproperty-SelectedColumnHead: rgba(255, 255, 255, 0.3);qproperty-FoldedColumnBGColor: rgba(255, 255, 255, 0.45);diff --git a/stuff/config/qss/Clay/Clay.qss b/stuff/config/qss/Clay/Clay.qssindex e0a0c50d3..e3e0e5a69 100644--- a/stuff/config/qss/Clay/Clay.qss+++ b/stuff/config/qss/Clay/Clay.qss@@ -3120,6 +3120,7 @@ XsheetViewer {qproperty-CurrentTimeIndicatorColor: hsl(0, 100%, 64%);qproperty-EmptyColumnHeadColor: #514d4c;qproperty-CellFocusColor: orange;+ qproperty-ColumnFocusColor: #80b5e6;qproperty-ColumnHeadPastelizer: transparent;qproperty-SelectedColumnHead: rgba(255, 255, 255, 0.3);qproperty-FoldedColumnBGColor: rgba(255, 255, 255, 0.45);diff --git a/stuff/config/qss/Dark/Dark.qss b/stuff/config/qss/Dark/Dark.qssindex 446d5cb85..5ee6889d4 100644--- a/stuff/config/qss/Dark/Dark.qss+++ b/stuff/config/qss/Dark/Dark.qss@@ -3120,6 +3120,7 @@ XsheetViewer {qproperty-CurrentTimeIndicatorColor: hsl(0, 100%, 64%);qproperty-EmptyColumnHeadColor: #303030;qproperty-CellFocusColor: cyan;+ qproperty-ColumnFocusColor: #69ade8;qproperty-ColumnHeadPastelizer: transparent;qproperty-SelectedColumnHead: rgba(255, 255, 255, 0.3);qproperty-FoldedColumnBGColor: rgba(255, 255, 255, 0.45);diff --git a/stuff/config/qss/Darker/Darker.qss b/stuff/config/qss/Darker/Darker.qssindex 82ffab3b5..e80c55bba 100644--- a/stuff/config/qss/Darker/Darker.qss+++ b/stuff/config/qss/Darker/Darker.qss@@ -3120,6 +3120,7 @@ XsheetViewer {qproperty-CurrentTimeIndicatorColor: hsl(52, 100%, 64%);qproperty-EmptyColumnHeadColor: #333333;qproperty-CellFocusColor: #9b4141;+ qproperty-ColumnFocusColor: #74aee4;qproperty-ColumnHeadPastelizer: transparent;qproperty-SelectedColumnHead: rgba(130, 131, 135, 0.5);qproperty-FoldedColumnBGColor: rgba(151, 151, 157, 0.45);diff --git a/stuff/config/qss/Default-Green/Default-Green.qss b/stuff/config/qss/Default-Green/Default-Green.qssindex 11363e210..ac47b147f 100644--- a/stuff/config/qss/Default-Green/Default-Green.qss+++ b/stuff/config/qss/Default-Green/Default-Green.qss@@ -3120,6 +3120,7 @@ XsheetViewer {qproperty-CurrentTimeIndicatorColor: hsl(0, 100%, 64%);qproperty-EmptyColumnHeadColor: #484848;qproperty-CellFocusColor: lime;+ qproperty-ColumnFocusColor: #73ace4;qproperty-ColumnHeadPastelizer: transparent;qproperty-SelectedColumnHead: rgba(255, 255, 255, 0.3);qproperty-FoldedColumnBGColor: rgba(255, 255, 255, 0.45);diff --git a/stuff/config/qss/Default/Default.qss b/stuff/config/qss/Default/Default.qssindex 8a6665d0d..317cc642f 100644--- a/stuff/config/qss/Default/Default.qss+++ b/stuff/config/qss/Default/Default.qss@@ -3120,6 +3120,7 @@ XsheetViewer {qproperty-CurrentTimeIndicatorColor: hsl(0, 100%, 64%);qproperty-EmptyColumnHeadColor: #484848;qproperty-CellFocusColor: cyan;+ qproperty-ColumnFocusColor: #69ade8;qproperty-ColumnHeadPastelizer: transparent;qproperty-SelectedColumnHead: rgba(255, 255, 255, 0.3);qproperty-FoldedColumnBGColor: rgba(255, 255, 255, 0.45);diff --git a/stuff/config/qss/Light/Light.qss b/stuff/config/qss/Light/Light.qssindex 4b4217234..8224e2e5a 100644--- a/stuff/config/qss/Light/Light.qss+++ b/stuff/config/qss/Light/Light.qss@@ -3121,6 +3121,7 @@ XsheetViewer {qproperty-CurrentTimeIndicatorColor: hsl(0, 100%, 64%);qproperty-EmptyColumnHeadColor: #d1d1d1;qproperty-CellFocusColor: #6d00d2;+ qproperty-ColumnFocusColor: #2d609d;qproperty-ColumnHeadPastelizer: transparent;qproperty-SelectedColumnHead: rgba(255, 255, 255, 0.3);qproperty-FoldedColumnBGColor: rgba(255, 255, 255, 0.45);diff --git a/stuff/config/qss/Neutral/Neutral.qss b/stuff/config/qss/Neutral/Neutral.qssindex 3965f0fa0..420c53d67 100644--- a/stuff/config/qss/Neutral/Neutral.qss+++ b/stuff/config/qss/Neutral/Neutral.qss@@ -3121,6 +3121,7 @@ XsheetViewer {qproperty-CurrentTimeIndicatorColor: #ff0000;qproperty-EmptyColumnHeadColor: #808080;qproperty-CellFocusColor: #000000;+ qproperty-ColumnFocusColor: #062040;qproperty-ColumnHeadPastelizer: transparent;qproperty-SelectedColumnHead: rgba(255, 255, 255, 0.5);qproperty-FoldedColumnBGColor: rgba(255, 255, 255, 0.45);diff --git a/toonz/sources/include/toonz/preferences.h b/toonz/sources/include/toonz/preferences.hindex d718ca8be..a85834f3f 100644--- a/toonz/sources/include/toonz/preferences.h+++ b/toonz/sources/include/toonz/preferences.h@@ -451,6 +451,18 @@ public:void getCurrentColumnData(TPixel &color) const {color = getColorValue(currentColumnColor);}+ bool isCustomCurrentCellColorEnabled() const {+ return getBoolValue(customCurrentCellColorEnabled);+ }+ void getCurrentCellData(TPixel &color) const {+ color = getColorValue(currentCellColor);+ }+ bool isCustomCurrentColumnOutlineColorEnabled() const {+ return getBoolValue(customCurrentColumnOutlineColorEnabled);+ }+ void getCurrentColumnOutlineColor(TPixel &color) const {+ color = getColorValue(currentColumnOutlineColor);+ }LevelNameDisplayType getLevelNameDisplayType() const {return LevelNameDisplayType(getIntValue(levelNameDisplayType));diff --git a/toonz/sources/include/toonz/preferencesitemids.h b/toonz/sources/include/toonz/preferencesitemids.hindex b20050e27..c50927bc1 100644--- a/toonz/sources/include/toonz/preferencesitemids.h+++ b/toonz/sources/include/toonz/preferencesitemids.h@@ -158,6 +158,10 @@ enum PreferencesItemId {syncLevelRenumberWithXsheet,currentTimelineEnabled,currentColumnColor,+ customCurrentCellColorEnabled,+ currentCellColor,+ customCurrentColumnOutlineColorEnabled,+ currentColumnOutlineColor,levelNameDisplayType,showFrameNumberWithLetters,linkColumnNameWithLevel,diff --git a/toonz/sources/include/toonzqt/colorfield.h b/toonz/sources/include/toonzqt/colorfield.hindex 763cf3bdf..4d353aee1 100644--- a/toonz/sources/include/toonzqt/colorfield.h+++ b/toonz/sources/include/toonzqt/colorfield.h@@ -172,7 +172,8 @@ public:ColorField(QWidget *parent = 0, bool isAlphaActive = true,TPixel32 color = TPixel32(0, 0, 0, 255), int squareSize = 40,- bool useStyleEditor = true, int sliderWidth = -1);+ bool useStyleEditor = true, int sliderWidth = -1,+ bool horizontalChannels = false);~ColorField() {}diff --git a/toonz/sources/toonz/preferencespopup.cpp b/toonz/sources/toonz/preferencespopup.cppindex 91d83f1e2..c3ea3aa46 100644--- a/toonz/sources/toonz/preferencespopup.cpp+++ b/toonz/sources/toonz/preferencespopup.cpp@@ -49,6 +49,8 @@#include <QComboBox>#include <QFontComboBox>#include <QLabel>+#include <QScreen>+#include <QScrollArea>#include <QStackedWidget>#include <QLineEdit>#include <QFileDialog>@@ -746,6 +748,11 @@ void PreferencesPopup::onShowKeyframesOnCellAreaChanged() {TApp::instance()->getCurrentScene()->notifyPreferenceChanged("XsheetCamera");}+void PreferencesPopup::onCurrentCellColorChanged() {+ TApp::instance()->getCurrentScene()->notifyPreferenceChanged(+ "CurrentCellColor");+}+//-----------------------------------------------------------------------------void PreferencesPopup::onShowXSheetToolbarClicked() {@@ -1118,7 +1125,8 @@ QWidget* PreferencesPopup::createUI(PreferencesItemId id,case QMetaType::QColor: // create ColorField{ColorField* field =- new ColorField(this, false, colorToTPixel(item.value.value<QColor>()));+ new ColorField(this, false, colorToTPixel(item.value.value<QColor>()),+ 24, true, 44, true);connect(field, &ColorField::colorChanged, this,&PreferencesPopup::onColorFieldChanged);widget = field;@@ -1431,7 +1439,11 @@ QString PreferencesPopup::getUIString(PreferencesItemId id) {{syncLevelRenumberWithXsheet,tr("Sync Level Strip Drawing Number Changes with the Xsheet")},{currentTimelineEnabled, tr("Show Current Time Indicator")},- {currentColumnColor, tr("Current Column Color:")},+ {currentColumnColor, tr("Current Column Text Color:")},+ {customCurrentCellColorEnabled, tr("Custom")},+ {currentCellColor, tr("Current Cell Outline:")},+ {customCurrentColumnOutlineColorEnabled, tr("Custom")},+ {currentColumnOutlineColor, tr("Current Header Outline:")},//{ levelNameOnEachMarkerEnabled, tr("Display Level Name on Each// Marker")//},@@ -1699,24 +1711,33 @@ PreferencesPopup::PreferencesPopup()categoryList->setAlternatingRowColors(true);QStackedWidget* stackedWidget = new QStackedWidget(this);- stackedWidget->addWidget(createGeneralPage());- stackedWidget->addWidget(createInterfacePage());- stackedWidget->addWidget(createPreviewPage());- stackedWidget->addWidget(createLoadingPage());- stackedWidget->addWidget(createSavingPage());- stackedWidget->addWidget(createCodecPage());- stackedWidget->addWidget(createDrawingPage());- stackedWidget->addWidget(createToolsPage());- stackedWidget->addWidget(createXsheetPage());- stackedWidget->addWidget(createOnionSkinPage());- stackedWidget->addWidget(createAnimationPage());- stackedWidget->addWidget(createAutoLipSyncPage());- stackedWidget->addWidget(createColorsPage());- stackedWidget->addWidget(createVisualizationPage());- stackedWidget->addWidget(createVersionControlPage());- stackedWidget->addWidget(createTouchTabletPage());+ auto addPage = [stackedWidget](QWidget* page) {+ QScrollArea* scrollArea = new QScrollArea(stackedWidget);+ scrollArea->setFrameShape(QFrame::NoFrame);+ scrollArea->setWidgetResizable(true);+ scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);+ scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);+ scrollArea->setWidget(page);+ stackedWidget->addWidget(scrollArea);+ };+ addPage(createGeneralPage());+ addPage(createInterfacePage());+ addPage(createPreviewPage());+ addPage(createLoadingPage());+ addPage(createSavingPage());+ addPage(createCodecPage());+ addPage(createDrawingPage());+ addPage(createToolsPage());+ addPage(createXsheetPage());+ addPage(createOnionSkinPage());+ addPage(createAnimationPage());+ addPage(createAutoLipSyncPage());+ addPage(createColorsPage());+ addPage(createVisualizationPage());+ addPage(createVersionControlPage());+ addPage(createTouchTabletPage());#ifdef _WIN32- stackedWidget->addWidget(createAddonsPage());+ addPage(createAddonsPage());#endif // WIN32QHBoxLayout* mainLayout = new QHBoxLayout();@@ -1733,6 +1754,12 @@ PreferencesPopup::PreferencesPopup()}setLayout(mainLayout);+ // Keep the dialog within the current screen so overflowing pages can scroll.+ QSize preferredSize = sizeHint().expandedTo(QSize(1060, 860));+ if (QScreen* currentScreen = parentWidget()->screen())+ preferredSize = preferredSize.boundedTo(+ currentScreen->availableGeometry().size() - QSize(40, 60));+ resize(preferredSize);connect(categoryList, &QListWidget::currentRowChanged, stackedWidget,&QStackedWidget::setCurrentIndex);@@ -2292,6 +2319,25 @@ QWidget* PreferencesPopup::createXsheetPage() {QGridLayout* lay = new QGridLayout();setupLayout(lay);+ auto createOutlineControls = [this](PreferencesItemId enabledId,+ PreferencesItemId colorId,+ const QString& label) {+ QCheckBox* customCheck = qobject_cast<QCheckBox*>(createUI(enabledId));+ QWidget* colorField = createUI(colorId);+ colorField->setEnabled(customCheck->isChecked());+ connect(customCheck, &QCheckBox::toggled, colorField, &QWidget::setEnabled);+ customCheck->setToolTip(tr("When unchecked, use the theme color."));++ QHBoxLayout* controls = new QHBoxLayout();+ controls->setContentsMargins(0, 0, 0, 0);+ controls->setSpacing(5);+ controls->addWidget(new QLabel(label, this));+ controls->addWidget(customCheck);+ controls->addWidget(colorField);+ controls->addStretch(1);+ return controls;+ };+insertUI(xsheetLayoutPreference, lay,getComboItemList(xsheetLayoutPreference));insertUI(levelNameDisplayType, lay, getComboItemList(levelNameDisplayType));@@ -2309,12 +2355,24 @@ QWidget* PreferencesPopup::createXsheetPage() {insertUI(showColumnNumbers, xshColHeaderLay);insertUI(unifyColumnVisibilityToggles, xshColHeaderLay);insertUI(parentColorsInXsheetColumn, xshColHeaderLay);+ insertUI(currentColumnColor, xshColHeaderLay);++ // The header outline control shares the existing column text color row.+ xshColHeaderLay->addLayout(+ createOutlineControls(customCurrentColumnOutlineColorEnabled,+ currentColumnOutlineColor,+ tr("Current Header Outline:")),+ xshColHeaderLay->rowCount() - 1, 2);}QGridLayout* xshCellAreaLay = insertGroupBox(tr("Xsheet Cell Area"), lay);{insertUI(highlightLineEverySecond, xshCellAreaLay);insertUI(currentTimelineEnabled, xshCellAreaLay);insertUI(showFrameNumberWithLetters, xshCellAreaLay);+ xshCellAreaLay->addLayout(+ createOutlineControls(customCurrentCellColorEnabled, currentCellColor,+ tr("Current Cell Outline:")),+ xshCellAreaLay->rowCount(), 0, 1, 3);}QGridLayout* showKeyLay =@@ -2331,7 +2389,6 @@ QWidget* PreferencesPopup::createXsheetPage() {insertUI(useArrowKeyToShiftCellSelection, lay);insertUI(shortcutCommandsWhileRenamingCellEnabled, lay);insertUI(syncLevelRenumberWithXsheet, lay);- insertUI(currentColumnColor, lay);lay->setRowStretch(lay->rowCount(), 1);insertFootNote(lay);@@ -2341,6 +2398,14 @@ QWidget* PreferencesPopup::createXsheetPage() {&PreferencesPopup::onShowKeyframesOnCellAreaChanged);m_onEditedFuncMap.insert(showXsheetCameraColumn,&PreferencesPopup::onShowKeyframesOnCellAreaChanged);+ m_onEditedFuncMap.insert(customCurrentCellColorEnabled,+ &PreferencesPopup::onCurrentCellColorChanged);+ m_onEditedFuncMap.insert(currentCellColor,+ &PreferencesPopup::onCurrentCellColorChanged);+ m_onEditedFuncMap.insert(customCurrentColumnOutlineColorEnabled,+ &PreferencesPopup::onCurrentCellColorChanged);+ m_onEditedFuncMap.insert(currentColumnOutlineColor,+ &PreferencesPopup::onCurrentCellColorChanged);m_onEditedFuncMap.insert(unifyColumnVisibilityToggles,&PreferencesPopup::onUnifyColumnVisibilityTogglesChanged);diff --git a/toonz/sources/toonz/preferencespopup.h b/toonz/sources/toonz/preferencespopup.hindex 5d916e66e..b4eeef7f7 100644--- a/toonz/sources/toonz/preferencespopup.h+++ b/toonz/sources/toonz/preferencespopup.h@@ -142,6 +142,7 @@ private:void onDefaultStartupToolChanged();// Xsheetvoid onShowKeyframesOnCellAreaChanged();+ void onCurrentCellColorChanged();void onShowXSheetToolbarClicked();void onUnifyColumnVisibilityTogglesChanged();void onShowXsheetBreadcrumbsClicked();diff --git a/toonz/sources/toonz/xshcolumnviewer.cpp b/toonz/sources/toonz/xshcolumnviewer.cppindex 1d2fcf79b..d31e6718c 100644--- a/toonz/sources/toonz/xshcolumnviewer.cpp+++ b/toonz/sources/toonz/xshcolumnviewer.cpp@@ -1901,9 +1901,31 @@ void ColumnArea::paintEvent(QPaintEvent *event) { // AREAelsep.drawRect(toBeUpdated.adjusted(0, 0, -2, -1));+ drawCurrentColumnFocus(p, m_viewer->getCurrentColumn());+if (getDragTool()) getDragTool()->drawColumnsArea(p);}+void ColumnArea::drawCurrentColumnFocus(QPainter &p, int col) {+ const Orientation *o = m_viewer->orientation();+ TXsheet *xsh = m_viewer->getXsheet();+ if (!xsh || (col >= 0 && !xsh->getColumnFan(o)->isActive(col))) return;++ QPoint origin = m_viewer->positionToXY(CellPosition(0, col));+ QRect rect = o->rect((col < 0) ? PredefinedRect::CAMERA_LAYER_NAME+ : PredefinedRect::LAYER_NAME)+ .translated(origin);+ if (rect.isEmpty()) return;++ QColor color = m_viewer->getColumnFocusColor();+ if (color.alpha() == 0) return;+ p.save();+ p.setPen(color);+ p.setBrush(Qt::NoBrush);+ for (int i = 0; i < 2; ++i) p.drawRect(rect.adjusted(i, i, -i, -i));+ p.restore();+}+//-----------------------------------------------------------------------------using namespace DVGui;diff --git a/toonz/sources/toonz/xshcolumnviewer.h b/toonz/sources/toonz/xshcolumnviewer.hindex ad2d3a71f..b6fa3df2a 100644--- a/toonz/sources/toonz/xshcolumnviewer.h+++ b/toonz/sources/toonz/xshcolumnviewer.h@@ -371,6 +371,7 @@ public:void drawSoundColumnHead(QPainter &p, int col);void drawPaletteColumnHead(QPainter &p, int col);void drawSoundTextColumnHead(QPainter &p, int col);+ void drawCurrentColumnFocus(QPainter &p, int col);QPixmap getColumnIcon(int columnIndex);diff --git a/toonz/sources/toonz/xsheetviewer.cpp b/toonz/sources/toonz/xsheetviewer.cppindex 7c8bb2ff7..40b28c411 100644--- a/toonz/sources/toonz/xsheetviewer.cpp+++ b/toonz/sources/toonz/xsheetviewer.cpp@@ -1491,6 +1491,9 @@ void XsheetViewer::onPreferenceChanged(const QString &prefName) {refreshContentSize(0, 0);} else if (prefName == "XsheetCamera") {refreshContentSize(0, 0);+ } else if (prefName == "CurrentCellColor") {+ m_cellArea->update();+ m_columnArea->update();}}@@ -2025,6 +2028,25 @@ QColor XsheetViewer::getSelectedColumnTextColor() const {return currentColumnColor;}+QColor XsheetViewer::getCellFocusColor() const {+ Preferences *preferences = Preferences::instance();+ if (!preferences->isCustomCurrentCellColorEnabled()) return m_cellFocusColor;++ TPixel color;+ preferences->getCurrentCellData(color);+ return QColor(color.r, color.g, color.b, color.m);+}++QColor XsheetViewer::getColumnFocusColor() const {+ Preferences *preferences = Preferences::instance();+ if (!preferences->isCustomCurrentColumnOutlineColorEnabled())+ return m_columnFocusColor;++ TPixel color;+ preferences->getCurrentColumnOutlineColor(color);+ return QColor(color.r, color.g, color.b, color.m);+}+//=============================================================================// XSheetViewerCommand//-----------------------------------------------------------------------------diff --git a/toonz/sources/toonz/xsheetviewer.h b/toonz/sources/toonz/xsheetviewer.hindex 4856018a7..906c7e85d 100644--- a/toonz/sources/toonz/xsheetviewer.h+++ b/toonz/sources/toonz/xsheetviewer.h@@ -292,6 +292,9 @@ class XsheetViewer final : public QFrame, public SaveLoadQSettings {QColor m_cellFocusColor;Q_PROPERTY(QColor CellFocusColor READ getCellFocusColor WRITE setCellFocusColor)+ QColor m_columnFocusColor = QColor(105, 168, 223);+ Q_PROPERTY(QColor ColumnFocusColor READ getColumnFocusColor WRITE+ setColumnFocusColor)// Play rangeQColor m_playRangeColor;@@ -915,7 +918,9 @@ public:// Cell focusvoid setCellFocusColor(const QColor &color) { m_cellFocusColor = color; }- QColor getCellFocusColor() const { return m_cellFocusColor; }+ QColor getCellFocusColor() const;+ void setColumnFocusColor(const QColor &color) { m_columnFocusColor = color; }+ QColor getColumnFocusColor() const;// Play rangeQColor getPlayRangeColor() const { return m_playRangeColor; }diff --git a/toonz/sources/toonzlib/preferences.cpp b/toonz/sources/toonzlib/preferences.cppindex 061450ecf..46a6fe719 100644--- a/toonz/sources/toonzlib/preferences.cpp+++ b/toonz/sources/toonzlib/preferences.cpp@@ -627,6 +627,14 @@ void Preferences::definePreferenceItems() {true);define(currentColumnColor, "currentColumnColor", QMetaType::QColor,QColor(Qt::yellow));+ define(customCurrentCellColorEnabled, "customCurrentCellColorEnabled",+ QMetaType::Bool, false);+ define(currentCellColor, "currentCellColor", QMetaType::QColor,+ QColor(Qt::cyan));+ define(customCurrentColumnOutlineColorEnabled,+ "customCurrentColumnOutlineColorEnabled", QMetaType::Bool, false);+ define(currentColumnOutlineColor, "currentColumnOutlineColor",+ QMetaType::QColor, QColor(105, 168, 223));define(levelNameDisplayType, "levelNameDisplayType", QMetaType::Int,0); // defaultdefine(showFrameNumberWithLetters, "showFrameNumberWithLetters",diff --git a/toonz/sources/toonzqt/colorfield.cpp b/toonz/sources/toonzqt/colorfield.cppindex 615087857..fda7013b1 100644--- a/toonz/sources/toonzqt/colorfield.cpp+++ b/toonz/sources/toonzqt/colorfield.cpp@@ -440,7 +440,8 @@ ColorField::ColorFieldEditorController *ColorField::m_editorController = 0;Return ColorField current color.*/ColorField::ColorField(QWidget *parent, bool isAlphaActive, TPixel32 color,- int squareSize, bool useStyleEditor, int sliderWidth)+ int squareSize, bool useStyleEditor, int sliderWidth,+ bool horizontalChannels): QWidget(parent), m_color(color), m_notifyEditingChange(true)@@ -456,20 +457,20 @@ ColorField::ColorField(QWidget *parent, bool isAlphaActive, TPixel32 color,m_colorSample = new StyleSample(this, squareSize, squareSize);m_colorSample->setColor(m_color);- m_redChannel =- new ChannelField(this, tr("R:"), m_color.r, 255, false, 13, sliderWidth);+ m_redChannel = new ChannelField(this, tr("R:"), m_color.r, 255,+ horizontalChannels, 13, sliderWidth);connect(m_redChannel, SIGNAL(valueChanged(int, bool)),SLOT(onRedChannelChanged(int, bool)));- m_greenChannel =- new ChannelField(this, tr("G:"), m_color.g, 255, false, 13, sliderWidth);+ m_greenChannel = new ChannelField(this, tr("G:"), m_color.g, 255,+ horizontalChannels, 13, sliderWidth);connect(m_greenChannel, SIGNAL(valueChanged(int, bool)),SLOT(onGreenChannelChanged(int, bool)));- m_blueChannel =- new ChannelField(this, tr("B:"), m_color.b, 255, false, 13, sliderWidth);+ m_blueChannel = new ChannelField(this, tr("B:"), m_color.b, 255,+ horizontalChannels, 13, sliderWidth);connect(m_blueChannel, SIGNAL(valueChanged(int, bool)),SLOT(onBlueChannelChanged(int, bool)));- m_alphaChannel =- new ChannelField(this, tr("A:"), m_color.m, 255, false, 13, sliderWidth);+ m_alphaChannel = new ChannelField(this, tr("A:"), m_color.m, 255,+ horizontalChannels, 13, sliderWidth);connect(m_alphaChannel, SIGNAL(valueChanged(int, bool)),SLOT(onAlphaChannelChanged(int, bool)));