diff --git a/stuff/config/qss/Blue/Blue.qss b/stuff/config/qss/Blue/Blue.qss index f608fa5..96b31bd 100644 --- a/stuff/config/qss/Blue/Blue.qss +++ b/stuff/config/qss/Blue/Blue.qss @@ -698,6 +698,43 @@ QListView { background-color: #323435; } /* ----------------------------------------------------------------------------- + Tool Options - Override DvScroll Widget +----------------------------------------------------------------------------- */ +#toolOptionsPanel QPushButton { + background-color: #616467; + border: 1 solid #414345; + border-radius: 2; + color: #e4e5e9; + margin: 0; + padding: 0; +} +#toolOptionsPanel QPushButton:hover { + background-color: #6e7174; + border-color: #414345; + color: #e4e5e9; +} +#toolOptionsPanel QPushButton:pressed { + background-color: #2b2c2d; + border-color: #262728; + color: #e4e5e9; +} +#toolOptionsPanel QPushButton:checked { + background-color: #2b2c2d; + border-color: #262728; + color: #e4e5e9; +} +#toolOptionsPanel QPushButton:checked:hover { + background-color: #303133; +} +#toolOptionsPanel QPushButton:checked:hover:pressed { + background: #2b2c2d; +} +#toolOptionsPanel QPushButton:disabled { + background-color: #4d5052; + border-color: #414345; + color: rgba(230, 230, 230, 0.4); +} +/* ----------------------------------------------------------------------------- Push Button ----------------------------------------------------------------------------- */ .Button, diff --git a/stuff/config/qss/Dark/Dark.qss b/stuff/config/qss/Dark/Dark.qss index d62dd03..216cede 100644 --- a/stuff/config/qss/Dark/Dark.qss +++ b/stuff/config/qss/Dark/Dark.qss @@ -698,6 +698,43 @@ QListView { background-color: #262626; } /* ----------------------------------------------------------------------------- + Tool Options - Override DvScroll Widget +----------------------------------------------------------------------------- */ +#toolOptionsPanel QPushButton { + background-color: #565656; + border: 1 solid #303030; + border-radius: 2; + color: #f6f6f6; + margin: 0; + padding: 0; +} +#toolOptionsPanel QPushButton:hover { + background-color: #636363; + border-color: #303030; + color: #f6f6f6; +} +#toolOptionsPanel QPushButton:pressed { + background-color: #1e1e1e; + border-color: #191919; + color: #f6f6f6; +} +#toolOptionsPanel QPushButton:checked { + background-color: #1e1e1e; + border-color: #191919; + color: #f6f6f6; +} +#toolOptionsPanel QPushButton:checked:hover { + background-color: #232323; +} +#toolOptionsPanel QPushButton:checked:hover:pressed { + background: #1e1e1e; +} +#toolOptionsPanel QPushButton:disabled { + background-color: #3d3d3d; + border-color: #303030; + color: rgba(233, 233, 233, 0.4); +} +/* ----------------------------------------------------------------------------- Push Button ----------------------------------------------------------------------------- */ .Button, diff --git a/stuff/config/qss/Default/Default.qss b/stuff/config/qss/Default/Default.qss index ffa902d..69d9aed 100644 --- a/stuff/config/qss/Default/Default.qss +++ b/stuff/config/qss/Default/Default.qss @@ -698,6 +698,43 @@ QListView { background-color: #393939; } /* ----------------------------------------------------------------------------- + Tool Options - Override DvScroll Widget +----------------------------------------------------------------------------- */ +#toolOptionsPanel QPushButton { + background-color: #696969; + border: 1 solid #484848; + border-radius: 2; + color: #f3f3f3; + margin: 0; + padding: 0; +} +#toolOptionsPanel QPushButton:hover { + background-color: #767676; + border-color: #484848; + color: #f3f3f3; +} +#toolOptionsPanel QPushButton:pressed { + background-color: #313131; + border-color: #2c2c2c; + color: #f3f3f3; +} +#toolOptionsPanel QPushButton:checked { + background-color: #313131; + border-color: #2c2c2c; + color: #f3f3f3; +} +#toolOptionsPanel QPushButton:checked:hover { + background-color: #363636; +} +#toolOptionsPanel QPushButton:checked:hover:pressed { + background: #313131; +} +#toolOptionsPanel QPushButton:disabled { + background-color: #555555; + border-color: #484848; + color: rgba(230, 230, 230, 0.4); +} +/* ----------------------------------------------------------------------------- Push Button ----------------------------------------------------------------------------- */ .Button, diff --git a/stuff/config/qss/Default/less/layouts/mainwindow.less b/stuff/config/qss/Default/less/layouts/mainwindow.less index 6ae1b91..486c917 100644 --- a/stuff/config/qss/Default/less/layouts/mainwindow.less +++ b/stuff/config/qss/Default/less/layouts/mainwindow.less @@ -529,3 +529,45 @@ QListView { &:extend(.tab-container); background-color: @tabbar-bg-color; } + + +/* ----------------------------------------------------------------------------- + Tool Options - Override DvScroll Widget +----------------------------------------------------------------------------- */ + +#toolOptionsPanel { + QPushButton { + background-color: @button-bg-color; + border: 1 solid @button-border-color; + border-radius: 2; + color: @button-text-color; + margin: 0; + padding: 0; + &:hover { + background-color: @button-bg-color-hover; + border-color: @button-border-color-hover; + color: @button-text-color-hover; + } + &:pressed { + background-color: @button-bg-color-pressed; + border-color: @button-border-color-pressed; + color: @button-text-color-pressed; + } + &:checked { + background-color: @button-bg-color-checked; + border-color: @button-border-color-checked; + color: @button-text-color-checked; + &:hover { + background-color: @button-bg-color-checked-hover; + &:pressed { + background: @button-bg-color-checked-hover-pressed; + } + } + } + &:disabled { + background-color: @button-bg-color-disabled; + border-color: @button-border-color-disabled; + color: @button-text-color-disabled; + } + } +} \ No newline at end of file diff --git a/stuff/config/qss/Light/Light.qss b/stuff/config/qss/Light/Light.qss index e676414..90e547c 100644 --- a/stuff/config/qss/Light/Light.qss +++ b/stuff/config/qss/Light/Light.qss @@ -698,6 +698,43 @@ QListView { background-color: #5a5a5a; } /* ----------------------------------------------------------------------------- + Tool Options - Override DvScroll Widget +----------------------------------------------------------------------------- */ +#toolOptionsPanel QPushButton { + background-color: #a6a6a6; + border: 1 solid #525252; + border-radius: 2; + color: #000000; + margin: 0; + padding: 0; +} +#toolOptionsPanel QPushButton:hover { + background-color: #bbbbbb; + border-color: #525252; + color: #000000; +} +#toolOptionsPanel QPushButton:pressed { + background-color: #e1e1e1; + border-color: #525252; + color: #000000; +} +#toolOptionsPanel QPushButton:checked { + background-color: #5a5a5a; + border-color: #454545; + color: #c0c0c0; +} +#toolOptionsPanel QPushButton:checked:hover { + background-color: #5f5f5f; +} +#toolOptionsPanel QPushButton:checked:hover:pressed { + background: #5a5a5a; +} +#toolOptionsPanel QPushButton:disabled { + background-color: #8d8d8d; + border-color: #737373; + color: rgba(0, 0, 0, 0.466); +} +/* ----------------------------------------------------------------------------- Push Button ----------------------------------------------------------------------------- */ .Button, diff --git a/toonz/sources/include/tools/tooloptions.h b/toonz/sources/include/tools/tooloptions.h index 92c4f8d..e78ee60 100644 --- a/toonz/sources/include/tools/tooloptions.h +++ b/toonz/sources/include/tools/tooloptions.h @@ -172,7 +172,8 @@ private: class GenericToolOptionsBox : public ToolOptionsBox { public: GenericToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle, - int propertyGroupIdx = 0, ToolHandle *toolHandle = 0); + int propertyGroupIdx = 0, ToolHandle *toolHandle = 0, + bool scrollable = true); }; //============================================================================= diff --git a/toonz/sources/tnztools/plastictool.cpp b/toonz/sources/tnztools/plastictool.cpp index ddd3196..2c2985e 100644 --- a/toonz/sources/tnztools/plastictool.cpp +++ b/toonz/sources/tnztools/plastictool.cpp @@ -401,19 +401,23 @@ PlasticToolOptionsBox::PlasticToolOptionsBox(QWidget *parent, TTool *tool, return space; } }; - + setObjectName("toolOptionsPanel"); // Create Mesh button QPushButton *meshifyButton = new QPushButton(tr("Create Mesh")); + // Add skeleton id-related widgets QLabel *skelIdLabel = new QLabel(tr("Skeleton:")); m_skelIdComboBox = new SkelIdsComboBox; m_addSkelButton = new QPushButton("+"); // Connected in the show event m_removeSkelButton = new QPushButton("-"); // Connected in the show event // Add sub-options for each mode group - for (int m = 0; m != PlasticTool::MODES_COUNT; ++m) - m_subToolbars[m] = new GenericToolOptionsBox(0, tool, pltHandle, m); + for (int m = 0; m != PlasticTool::MODES_COUNT; ++m) + m_subToolbars[m] = + new GenericToolOptionsBox(0, tool, pltHandle, m, 0, false); meshifyButton->setFixedHeight(20); + int buttonWidth = fontMetrics().width(meshifyButton->text()) + 20; + meshifyButton->setFixedWidth(buttonWidth); QAction *meshifyAction = CommandManager::instance()->getAction("A_ToolOption_Meshify"); meshifyButton->addAction(meshifyAction); diff --git a/toonz/sources/tnztools/tooloptions.cpp b/toonz/sources/tnztools/tooloptions.cpp index 4456366..fa39fc0 100644 --- a/toonz/sources/tnztools/tooloptions.cpp +++ b/toonz/sources/tnztools/tooloptions.cpp @@ -114,7 +114,7 @@ ToolOptionsBox::ToolOptionsBox(QWidget *parent, bool isScrollable) toolContainer->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); toolContainer->setFixedHeight(24); - + toolContainer->setObjectName("toolOptionsPanel"); toolContainer->setLayout(m_layout); } else setLayout(m_layout); @@ -458,8 +458,9 @@ void ToolOptionControlBuilder::visit(TPointerProperty *p) { GenericToolOptionsBox::GenericToolOptionsBox(QWidget *parent, TTool *tool, TPaletteHandle *pltHandle, int propertyGroupIdx, - ToolHandle *toolHandle) - : ToolOptionsBox(parent) { + ToolHandle *toolHandle, + bool scrollable) + : ToolOptionsBox(parent, scrollable) { setObjectName("toolOptionsPanel"); ToolOptionControlBuilder builder(this, tool, pltHandle, toolHandle);