From f578739a7bf9a618f5c6d220c0943d432aeacfb0 Mon Sep 17 00:00:00 2001 From: Rodney Date: Feb 04 2022 17:08:21 +0000 Subject: Merge pull request #4242 from shun-iwasawa/g/style_editor_move_toggle_button_in_menu Style Editor: Move "toggle orientation" button in the menu --- diff --git a/toonz/sources/toonzqt/styleeditor.cpp b/toonz/sources/toonzqt/styleeditor.cpp index 65dced8..654d047 100644 --- a/toonz/sources/toonzqt/styleeditor.cpp +++ b/toonz/sources/toonzqt/styleeditor.cpp @@ -3203,6 +3203,10 @@ QFrame *StyleEditor::createBottomWidget() { appearanceSubMenu->addAction(relColorAct); appearanceSubMenu->addAction(absColorAct); + m_toggleOrientationAction = + new QAction(createQIcon("orientation_h"), tr("Toggle Orientation"), this); + menu->addAction(m_toggleOrientationAction); + m_hexEditorAction = new QAction(tr("Hex Color Names..."), this); menu->addAction(m_hexEditorAction); @@ -3213,17 +3217,10 @@ QFrame *StyleEditor::createBottomWidget() { toolButton->setPopupMode(QToolButton::InstantPopup); toolButton->setToolTip(tr("Show or hide parts of the Color Page.")); // QToolBar* displayToolbar = new QToolBar(this); - m_toggleOrientationAction = - m_toolBar->addAction(createQIcon("orientation_h"), ""); - m_toggleOrientationAction->setToolTip( - tr("Toggle orientation of the Color Page.")); - QWidget *toggleOrientationButton = - m_toolBar->widgetForAction(m_toggleOrientationAction); - toggleOrientationButton->setFixedSize(22, 22); - toggleOrientationButton->setFocusPolicy(Qt::NoFocus); m_toolBar->addWidget(toolButton); m_toolBar->setMaximumHeight(22); m_toolBar->setIconSize(QSize(16, 16)); + /* ------ layout ------ */ QHBoxLayout *mainLayout = new QHBoxLayout; mainLayout->setMargin(2);