diff --git a/toonz/sources/toonz/frameheadgadget.cpp b/toonz/sources/toonz/frameheadgadget.cpp index 75b5acf..29e3876 100644 --- a/toonz/sources/toonz/frameheadgadget.cpp +++ b/toonz/sources/toonz/frameheadgadget.cpp @@ -37,6 +37,12 @@ void enableOnionSkin(bool enable = true) osmh->notifyOnionSkinMaskChanged(); } +void enableZeroThick(bool enable = true) +{ + Preferences::instance()->setShow0ThickLines(enable); + TApp::instance()->getCurrentScene()->notifySceneChanged(); +} + bool isOnionSkinEnabled() { TOnionSkinMaskHandle *osmh = TApp::instance()->getCurrentOnionSkin(); @@ -681,3 +687,20 @@ public: enableOnionSkin(checked); } } onionSkinToggle; + + +class ZeroThickToggle : public MenuItemHandler +{ +public: + ZeroThickToggle() : MenuItemHandler(MI_ZeroThick) + { + } + void execute() + { + QAction *action = CommandManager::instance()->getAction(MI_ZeroThick); + if (!action) + return; + bool checked = action->isChecked(); + enableZeroThick(checked); + } +} ZeroThickToggle; diff --git a/toonz/sources/toonz/mainwindow.cpp b/toonz/sources/toonz/mainwindow.cpp index f16816e..7627a62 100644 --- a/toonz/sources/toonz/mainwindow.cpp +++ b/toonz/sources/toonz/mainwindow.cpp @@ -1853,7 +1853,8 @@ void MainWindow::defineActions() createRightClickMenuAction(MI_BlendColors, tr("&Blend colors"), ""); - createToggle(MI_OnionSkin, tr("Onion Skin"), "", false, RightClickMenuCommandType); + createToggle(MI_OnionSkin, tr("Onion Skin"), "/", false, RightClickMenuCommandType); + createToggle(MI_ZeroThick, tr("Zero Thick Lines"), "Shift+/", false, RightClickMenuCommandType); //createRightClickMenuAction(MI_LoadSubSceneFile, tr("Load As Sub-xsheet"), ""); //createRightClickMenuAction(MI_LoadResourceFile, tr("Load"), ""); diff --git a/toonz/sources/toonz/menubarcommandids.h b/toonz/sources/toonz/menubarcommandids.h index 10b3c26..287adcb 100644 --- a/toonz/sources/toonz/menubarcommandids.h +++ b/toonz/sources/toonz/menubarcommandids.h @@ -218,6 +218,7 @@ #define MI_ResetRoomLayout "MI_ResetRoomLayout" #define MI_OnionSkin "MI_OnionSkin" +#define MI_ZeroThick "MI_ZeroThick" //#define MI_LoadResourceFile "MI_LoadResourceFile" #define MI_DuplicateFile "MI_DuplicateFile"