Skip to content

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

C

Change toolbar preference wording

manongjohne444f9b157fa
diff --git a/toonz/sources/include/toonz/preferences.h b/toonz/sources/include/toonz/preferences.h
index 3766f0e2d..50fbf68c7 100644
--- a/toonz/sources/include/toonz/preferences.h
+++ b/toonz/sources/include/toonz/preferences.h
@@ -401,8 +401,8 @@ public:
void enableCursorOutline(bool on);
bool isCursorOutlineEnabled() const { return m_cursorOutlineEnabled; }
- void enableShowDisabledTools(bool on);
- bool isShowDisabledToolsEnabled() const { return m_showDisabledTools; }
+ void enableShowLevelBasedTools(bool on);
+ bool isShowLevelBasedToolsEnabled() const { return m_showLevelBasedTools; }
// Xsheet tab
void setXsheetStep(int step); //!< Sets the step used for the <I>next/prev
@@ -727,7 +727,7 @@ private:
bool m_enableWinInk = false;
bool m_useOnionColorsForShiftAndTraceGhosts = false;
- bool m_showDisabledTools = true;
+ bool m_showLevelBasedTools = false;
private:
Preferences();
diff --git a/toonz/sources/toonz/preferencespopup.cpp b/toonz/sources/toonz/preferencespopup.cpp
index bafaf43fe..68cd9408c 100644
--- a/toonz/sources/toonz/preferencespopup.cpp
+++ b/toonz/sources/toonz/preferencespopup.cpp
@@ -1254,8 +1254,8 @@ void PreferencesPopup::onRasterBackgroundColorChanged(const TPixel32 &color,
//-----------------------------------------------------------------------------
-void PreferencesPopup::onShowDisabledToolsChanged(int index) {
- m_pref->enableShowDisabledTools(index == Qt::Checked);
+void PreferencesPopup::onShowLevelBasedToolsChanged(int index) {
+ m_pref->enableShowLevelBasedTools(index == Qt::Checked);
TApp::instance()->getCurrentLevel()->notifyLevelChange();
}
@@ -1488,8 +1488,8 @@ PreferencesPopup::PreferencesPopup()
CheckBox *cursorOutlineCB =
new CheckBox(tr("Show Cursor Size Outlines"), this);
- CheckBox *showDisabledToolsCB =
- new CheckBox(tr("Show Disabled Tools In Toolbar"), this);
+ CheckBox *showLevelBasedToolsCB =
+ new CheckBox(tr("Show Only Level-Based Tools In Toolbar"), this);
//--- Xsheet ------------------------------
categoryList->addItem(tr("Xsheet"));
@@ -1888,7 +1888,7 @@ PreferencesPopup::PreferencesPopup()
m_cursorBrushStyle->findData(m_pref->getCursorBrushStyle()));
cursorOutlineCB->setChecked(m_pref->isCursorOutlineEnabled());
- showDisabledToolsCB->setChecked(m_pref->isShowDisabledToolsEnabled());
+ showLevelBasedToolsCB->setChecked(m_pref->isShowLevelBasedToolsEnabled());
//--- Xsheet ------------------------------
xsheetAutopanDuringPlaybackCB->setChecked(m_pref->isXsheetAutopanEnabled());
@@ -2473,7 +2473,7 @@ PreferencesPopup::PreferencesPopup()
}
ToolsTopLay->addWidget(cursorStyleGroupBox, 3, 0, 1, 3);
- ToolsTopLay->addWidget(showDisabledToolsCB, 4, 0, 1, 3);
+ ToolsTopLay->addWidget(showLevelBasedToolsCB, 4, 0, 1, 3);
}
toolsFrameLay->addLayout(ToolsTopLay, 0);
@@ -2963,8 +2963,8 @@ PreferencesPopup::PreferencesPopup()
this, SLOT(onCursorBrushStyleChanged(int)));
ret = ret && connect(cursorOutlineCB, SIGNAL(stateChanged(int)), this,
SLOT(onCursorOutlineChanged(int)));
- ret = ret && connect(showDisabledToolsCB, SIGNAL(stateChanged(int)),
- SLOT(onShowDisabledToolsChanged(int)));
+ ret = ret && connect(showLevelBasedToolsCB, SIGNAL(stateChanged(int)),
+ SLOT(onShowLevelBasedToolsChanged(int)));
//--- Xsheet ----------------------
ret = ret && connect(xsheetAutopanDuringPlaybackCB, SIGNAL(stateChanged(int)),
diff --git a/toonz/sources/toonz/preferencespopup.h b/toonz/sources/toonz/preferencespopup.h
index 2fac241d6..b6707e2a6 100644
--- a/toonz/sources/toonz/preferencespopup.h
+++ b/toonz/sources/toonz/preferencespopup.h
@@ -84,7 +84,7 @@ private:
*m_syncLevelRenumberWithXsheet, *m_downArrowInLevelStripCreatesNewFrame,
*m_enableAutoStretch, *m_enableWinInk,
*m_useOnionColorsForShiftAndTraceCB,
- *m_showDisabledTools;
+ *m_showLevelBasedTools;
DVGui::FileField *m_customProjectRootFileField;
@@ -222,7 +222,7 @@ private slots:
void onCurrentColumnDataChanged(const TPixel32 &, bool isDragging);
void onEnableWinInkChanged(int index);
void onRasterBackgroundColorChanged(const TPixel32 &, bool isDragging);
- void onShowDisabledToolsChanged(int);
+ void onShowLevelBasedToolsChanged(int);
};
//**********************************************************************************
diff --git a/toonz/sources/toonz/toolbar.cpp b/toonz/sources/toonz/toolbar.cpp
index 9f2f10e5e..45357a05a 100755
--- a/toonz/sources/toonz/toolbar.cpp
+++ b/toonz/sources/toonz/toolbar.cpp
@@ -197,7 +197,7 @@ void Toolbar::updateToolbar() {
removeAction(m_expandAction);
- bool showDisabled = Preferences::instance()->isShowDisabledToolsEnabled();
+ bool showLevelBased = Preferences::instance()->isShowLevelBasedToolsEnabled();
bool actionEnabled = false;
for (int idx = 0; buttonLayout[idx].toolName; idx++) {
@@ -212,7 +212,7 @@ void Toolbar::updateToolbar() {
// Unhide if it meets the criteria for showing
bool enable = false;
- if (showDisabled || buttonLayout[idx].displayLevels & ActivateLevel::All)
+ if (!showLevelBased || buttonLayout[idx].displayLevels & ActivateLevel::All)
enable = true;
else if (buttonLayout[idx].displayLevels & ActivateLevel::Separator)
enable = actionEnabled;
diff --git a/toonz/sources/toonzlib/preferences.cpp b/toonz/sources/toonzlib/preferences.cpp
index cc7e47e3e..d459c272a 100644
--- a/toonz/sources/toonzlib/preferences.cpp
+++ b/toonz/sources/toonzlib/preferences.cpp
@@ -348,7 +348,7 @@ Preferences::Preferences()
, m_enableWinInk(false)
, m_useOnionColorsForShiftAndTraceGhosts(false)
, m_rasterBackgroundColor(TPixel::White)
- , m_showDisabledTools(true) {
+ , m_showLevelBasedTools(false) {
TCamera camera;
m_defLevelType = PLI_XSHLEVEL;
m_defLevelWidth = camera.getSize().lx;
@@ -728,7 +728,7 @@ Preferences::Preferences()
getValue(*m_settings, "rasterBackgroundColor", m_rasterBackgroundColor);
TImageWriter::setBackgroundColor(m_rasterBackgroundColor);
- getValue(*m_settings, "showDisabledTools", m_showDisabledTools);
+ getValue(*m_settings, "showLevelBasedTools", m_showLevelBasedTools);
}
//-----------------------------------------------------------------
@@ -1777,7 +1777,7 @@ void Preferences::setRasterBackgroundColor(const TPixel32 &color) {
QString::number((int)color.m));
}
-void Preferences::enableShowDisabledTools(bool on) {
- m_showDisabledTools = on;
- m_settings->setValue("showDisabledTools", on ? "1" : "0");
+void Preferences::enableShowLevelBasedTools(bool on) {
+ m_showLevelBasedTools = on;
+ m_settings->setValue("showLevelBasedTools", on ? "1" : "0");
}
\ No newline at end of file