From ed1bfa20bf46a23a958a9944ed064cfa124df594 Mon Sep 17 00:00:00 2001 From: Alfredo Monclus Date: Sun, 2 Feb 2025 14:26:57 -0300 Subject: [PATCH] refactor: reduce qsint schemes to 1 --- src/Gui/CMakeLists.txt | 3 - .../QSint/actionpanel/actionpanelscheme.cpp | 232 +++++++++++------- src/Gui/QSint/actionpanel/actionpanelscheme.h | 131 ++++++---- src/Gui/QSint/actionpanel/default/Fold.png | Bin 140 -> 0 bytes .../QSint/actionpanel/default/FoldOver.png | Bin 771 -> 0 bytes src/Gui/QSint/actionpanel/default/Unfold.png | Bin 140 -> 0 bytes .../QSint/actionpanel/default/UnfoldOver.png | Bin 747 -> 0 bytes src/Gui/QSint/actionpanel/freecadscheme.h | 117 --------- src/Gui/QSint/actionpanel/schemes.qrc | 8 - src/Gui/TaskView/TaskView.cpp | 16 +- 10 files changed, 239 insertions(+), 268 deletions(-) delete mode 100644 src/Gui/QSint/actionpanel/default/Fold.png delete mode 100644 src/Gui/QSint/actionpanel/default/FoldOver.png delete mode 100644 src/Gui/QSint/actionpanel/default/Unfold.png delete mode 100644 src/Gui/QSint/actionpanel/default/UnfoldOver.png delete mode 100644 src/Gui/QSint/actionpanel/freecadscheme.h delete mode 100644 src/Gui/QSint/actionpanel/schemes.qrc diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index a8b7ee3672..e7461a5235 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -437,7 +437,6 @@ set(Gui_RES_SRCS Icons/resource.qrc Language/translation.qrc ${FreeCAD_TR_QRC} - QSint/actionpanel/schemes.qrc ) qt_add_resources(Gui_QRC_SRCS ${Gui_RES_SRCS}) @@ -854,8 +853,6 @@ SET(qsintActionPanel_SRCS QSint/actionpanel/taskgroup_p.h QSint/actionpanel/taskheader_p.cpp QSint/actionpanel/taskheader_p.h - QSint/actionpanel/freecadscheme.cpp - QSint/actionpanel/freecadscheme.h ) SOURCE_GROUP("Widget\\QSintActionPanel" FILES ${qsintActionPanel_SRCS}) set(qsint_MOC_HDRS diff --git a/src/Gui/QSint/actionpanel/actionpanelscheme.cpp b/src/Gui/QSint/actionpanel/actionpanelscheme.cpp index ca75b260cc..66337a6779 100644 --- a/src/Gui/QSint/actionpanel/actionpanelscheme.cpp +++ b/src/Gui/QSint/actionpanel/actionpanelscheme.cpp @@ -8,122 +8,169 @@ #include "actionpanelscheme.h" -class StaticLibInitializer -{ -public: - StaticLibInitializer() - { - Q_INIT_RESOURCE(schemes); - } -}; - -StaticLibInitializer staticLibInitializer; - - namespace QSint { -const char* ActionPanelDefaultStyle = - - "QFrame[class='panel'] {" - "background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #99cccc, stop: 1 #EAF7FF);" - "}" - - "QSint--ActionGroup QFrame[class='header'] {" - "background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F9FDFF, stop: 1 #EAF7FF);" - "border: 1px solid #00aa99;" - "border-bottom: 1px solid #99cccc;" - "border-top-left-radius: 3px;" - "border-top-right-radius: 3px;" - "}" - - "QSint--ActionGroup QFrame[class='header']:hover {" - "background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #EAF7FF, stop: 1 #F9FDFF);" - "}" - +const QString ActionPanelScheme::minimumStyle = QString::fromLatin1( "QSint--ActionGroup QToolButton[class='header'] {" "text-align: left;" - "font: 14px;" - "color: #006600;" "background-color: transparent;" "border: 1px solid transparent;" - "}" - - "QSint--ActionGroup QToolButton[class='header']:hover {" - "color: #00cc00;" - "text-decoration: underline;" - "}" - - "QSint--ActionGroup QFrame[class='content'] {" - "background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F9FDFF, stop: 1 #EAF7FF);" - "border: 1px solid #00aa99;" - "}" - - "QSint--ActionGroup QFrame[class='content'][header='true'] {" - "border-top: none;" + "font-weight: bold;" "}" "QSint--ActionGroup QToolButton[class='action'] {" "background-color: transparent;" "border: 1px solid transparent;" - "color: #0033ff;" "text-align: left;" - "font: 11px;" - "}" - - "QSint--ActionGroup QToolButton[class='action']:!enabled {" - "color: #999999;" "}" "QSint--ActionGroup QToolButton[class='action']:hover {" - "color: #0099ff;" "text-decoration: underline;" "}" +); - "QSint--ActionGroup QToolButton[class='action']:focus {" - "border: 1px dotted black;" - "}" +QString ActionPanelScheme::systemStyle(const QPalette& p) +{ + QString headerBackground = p.color(QPalette::Highlight).name(); + QString headerLabelText = p.color(QPalette::HighlightedText).name(); + QString headerLabelTextOver = p.color(QPalette::BrightText).name(); + QString groupBorder = p.color(QPalette::Mid).name(); + QString disabledActionText = p.color(QPalette::Disabled, QPalette::Text).name(); + QString actionSelectedBg = p.color(QPalette::Active, QPalette::Light).name(); + QString actionSelectedText = p.color(QPalette::Active, QPalette::ButtonText).name(); + QString actionSelectedBorder = p.color(QPalette::Active, QPalette::Highlight).name(); + QString panelBackground = p.color(QPalette::Window).name(); + QString groupBackground = p.color(QPalette::Button).name(); - "QSint--ActionGroup QToolButton[class='action']:on {" - "background-color: #ddeeff;" - "color: #006600;" - "}" + QHash replacements; + replacements["headerBackground"] = headerBackground; + replacements["headerLabelText"] = headerLabelText; + replacements["headerLabelTextOver"] = headerLabelTextOver; + replacements["groupBorder"] = groupBorder; + replacements["disabledActionText"] = disabledActionText; + replacements["actionSelectedBg"] = actionSelectedBg; + replacements["actionSelectedText"] = actionSelectedText; + replacements["actionSelectedBorder"] = actionSelectedBorder; + replacements["panelBackground"] = panelBackground; + replacements["groupBackground"] = groupBackground; - // set a QGroupBox to avoid that the OS style is used, see - // https://github.com/FreeCAD/FreeCAD/issues/6102 - // the px values are taken from Behave-dark.qss, except the padding - "QSint--ActionGroup QFrame[class='content'] QGroupBox {" - "border: 1px solid #bbbbbb;" - "border-radius: 3px;" - "margin-top: 10px;" - "padding: 2px;" - "}" - // since we set a custom frame we also need to set the title - "QSint--ActionGroup QFrame[class='content'] QGroupBox::title {" - "padding-left: 3px;" - "top: -6px;" - "left: 12px;" - "}" -; + QString style = QString::fromLatin1( + "QFrame[class='panel'] {" + "background-color: {panelBackground};" + "}" + "QSint--ActionGroup QFrame[class='header'] {" + "border: 1px solid {headerBackground};" + "background-color: {headerBackground};" + "}" + + "QSint--ActionGroup QToolButton[class='header'] {" + "color: {headerLabelText};" + "}" + + "QSint--ActionGroup QToolButton[class='header']:hover {" + "color: {headerLabelTextOver};" + "}" + + "QSint--ActionGroup QFrame[class='content'] {" + "border: 1px solid {groupBorder};" + "background-color: {groupBackground};" + "}" + + "QSint--ActionGroup QFrame[class='content'][header='true'] {" + "border-top: none;" + "}" + + "QSint--ActionGroup QToolButton[class='action']:!enabled {" + "color: {disabledActionText};" + "}" + + "QSint--ActionGroup QToolButton[class='action']:focus {" + "color: {actionSelectedText};" + "border: 1px dotted {actionSelectedBorder};" + "}" + + "QSint--ActionGroup QToolButton[class='action']:on {" + "background-color: {actionSelectedBg};" + "color: {actionSelectedText};" + "}" + ); + + for (auto it = replacements.begin(); it != replacements.end(); ++it) { + style.replace("{" + it.key() + "}", it.value()); + } + + return style; +} + +// Draws fold/unfold icons based on the palette +QPixmap ActionPanelScheme::drawFoldIcon(const QPalette& palette, bool fold, bool hover) const +{ + QSize bSize = headerButtonSize; + QImage img(bSize.width(), bSize.height(), QImage::Format_ARGB32_Premultiplied); + img.fill(Qt::transparent); + + QPainter painter(&img); + painter.setRenderHint(QPainter::Antialiasing); + + qreal penWidth = bSize.width() / 14.0; + qreal lef_X = 0.25 * bSize.width(); + qreal mid_X = 0.50 * bSize.width(); + qreal rig_X = 0.75 * bSize.width(); + qreal bot_Y = 0.40 * bSize.height(); + qreal top_Y = 0.64 * bSize.height(); + + if (hover) { + penWidth *= 1.8; + } + + painter.setBrush(Qt::NoBrush); + painter.setPen(QPen(palette.color(QPalette::HighlightedText), penWidth)); + + QPolygon chevron; + if (fold) { + // Upward chevron + chevron << QPoint(lef_X, top_Y) + << QPoint(mid_X, bot_Y) + << QPoint(rig_X, top_Y); + } else { + // Downward chevron + chevron << QPoint(lef_X, bot_Y) + << QPoint(mid_X, top_Y) + << QPoint(rig_X, bot_Y); + } + + painter.drawPolyline(chevron); + return QPixmap::fromImage(img); +} ActionPanelScheme::ActionPanelScheme() { headerSize = 28; headerAnimation = true; - headerButtonFold = QPixmap(":/default/Fold.png"); - headerButtonFoldOver = QPixmap(":/default/FoldOver.png"); - headerButtonUnfold = QPixmap(":/default/Unfold.png"); - headerButtonUnfoldOver = QPixmap(":/default/UnfoldOver.png"); - headerButtonSize = QSize(18,18); + QPalette p = QApplication::palette(); - groupFoldSteps = 20; groupFoldDelay = 15; + headerButtonSize = QSize(17, 17); + headerButtonFold = drawFoldIcon(p, true, false); + headerButtonFoldOver = drawFoldIcon(p, true, true); + headerButtonUnfold = drawFoldIcon(p, false, false); + headerButtonUnfoldOver = drawFoldIcon(p, false, true); + + builtinFold = headerButtonFold; + builtinFoldOver = headerButtonFoldOver; + builtinUnfold = headerButtonUnfold; + builtinUnfoldOver = headerButtonUnfoldOver; + + groupFoldSteps = 20; + groupFoldDelay = 15; groupFoldEffect = NoFolding; groupFoldThaw = true; - actionStyle = QString(ActionPanelDefaultStyle); + actionStyle = minimumStyle + systemStyle(p); + builtinScheme = actionStyle; } ActionPanelScheme* ActionPanelScheme::defaultScheme() @@ -132,5 +179,24 @@ ActionPanelScheme* ActionPanelScheme::defaultScheme() return &scheme; } +void ActionPanelScheme::clearActionStyle() +{ + headerButtonFold = QPixmap(); + headerButtonFoldOver = QPixmap(); + headerButtonUnfold = QPixmap(); + headerButtonUnfoldOver = QPixmap(); + actionStyle = minimumStyle; } + +void ActionPanelScheme::restoreActionStyle() +{ + headerButtonFold = builtinFold; + headerButtonFoldOver = builtinFoldOver; + headerButtonUnfold = builtinUnfold; + headerButtonUnfoldOver = builtinUnfoldOver; + + actionStyle = builtinScheme; +} + +} // namespace QSint diff --git a/src/Gui/QSint/actionpanel/actionpanelscheme.h b/src/Gui/QSint/actionpanel/actionpanelscheme.h index cfc8cc5d41..b0fa2f4481 100644 --- a/src/Gui/QSint/actionpanel/actionpanelscheme.h +++ b/src/Gui/QSint/actionpanel/actionpanelscheme.h @@ -5,79 +5,112 @@ * * ***************************************************************************/ -#ifndef TASKPANELSCHEME_H -#define TASKPANELSCHEME_H +#ifndef ACTIONPANELSCHEME_H +#define ACTIONPANELSCHEME_H -#include -#include -#include #include "qsint_global.h" +#include +#include +#include +#include +#include +#include +#include +#include namespace QSint { - /** - \brief Class representing color scheme for ActionPanel and ActionGroup. - \since 0.2 - - \image html ActionPanel1.png Default ActionPanel scheme -*/ + * #@brief Class representing color scheme for ActionPanel and ActionGroup. + */ class QSINT_EXPORT ActionPanelScheme { public: - /** \enum TaskPanelFoldEffect - \brief Animation effect during expanding/collapsing of the ActionGroup's contents. - */ - enum TaskPanelFoldEffect + /** + * @brief Animation effect during expanding/collapsing of the ActionGroup's contents. + */ + enum FoldEffect { - /// No folding effect NoFolding, - /// Folding by scaling group's contents ShrunkFolding, - /// Folding by sliding group's contents SlideFolding }; + ActionPanelScheme(); - ActionPanelScheme(); + /** Returns a pointer to the default scheme object. + * Must be reimplemented in derived classes for custom schemes. + */ + static ActionPanelScheme* defaultScheme(); - /** Returns a pointer to the default scheme object. - Must be reimplemented in the own schemes. - */ - static ActionPanelScheme* defaultScheme(); + /// Height of the header in pixels. + int headerSize; + /// If set to \a true, moving mouse over the header results in changing its opacity slowly. + bool headerAnimation; - /// Height of the header in pixels. - int headerSize; - /// If set to \a true, moving mouse over the header results in changing its opacity slowly. - bool headerAnimation; + /// Image of folding button when the group is expanded. + QPixmap headerButtonFold; + /// Image of folding button when the group is expanded and mouse cursor is over the button. + QPixmap headerButtonFoldOver; + /// Image of folding button when the group is collapsed. + QPixmap headerButtonUnfold; + /// Image of folding button when the group is collapsed and mouse cursor is over the button. + QPixmap headerButtonUnfoldOver; - /// Image of folding button when the group is expanded. - QPixmap headerButtonFold; - /// Image of folding button when the group is expanded and mouse cursor is over the button. - QPixmap headerButtonFoldOver; - /// Image of folding button when the group is collapsed. - QPixmap headerButtonUnfold; - /// Image of folding button when the group is collapsed and mouse cursor is over the button. - QPixmap headerButtonUnfoldOver; + QSize headerButtonSize; - QSize headerButtonSize; + /// Number of steps made for expanding/collapsing animation (default 20). + int groupFoldSteps; + /// Delay in ms between steps made for expanding/collapsing animation (default 15). + int groupFoldDelay; + /// Sets folding effect during expanding/collapsing. + FoldEffect groupFoldEffect; + /// If set to \a true, changes group's opacity slowly during expanding/collapsing. + bool groupFoldThaw; - /// Number of steps made for expanding/collapsing animation (default 20). - int groupFoldSteps; - /// Delay in ms between steps made for expanding/collapsing animation (default 15). - int groupFoldDelay; - /// Sets folding effect during expanding/collapsing. - TaskPanelFoldEffect groupFoldEffect; - /// If set to \a true, changes group's opacity slowly during expanding/collapsing. - bool groupFoldThaw; + /// The CSS for the ActionPanel/ActionGroup elements. + QString actionStyle; - /// The CSS for the ActionPanel/ActionGroup elements. - QString actionStyle; + /** + * @brief Clears the custom action style, resetting to a minimal style. + */ + void clearActionStyle(); + + /** + * @brief Restores the original action style. + */ + void restoreActionStyle(); + + static const QString minimumStyle; + + /** + * @brief Generates a custom system style based on the palette. + * @param p The palette to use for generating the style. + * @return A QString containing the generated style. + */ + QString systemStyle(const QPalette& p); + +protected: + /** + * @brief Draws a fold/unfold icon based on the palette. + * @param p The palette to use for coloring the icon. + * @param fold True for fold icon, false for unfold icon. + * @param hover True for hover effect, false otherwise. + * @return A QPixmap representing the icon. + */ + QPixmap drawFoldIcon(const QPalette& p, bool fold, bool hover) const; + +private: + // Store the built-in icons for restoration. + QPixmap builtinFold; + QPixmap builtinFoldOver; + QPixmap builtinUnfold; + QPixmap builtinUnfoldOver; + QString builtinScheme; }; +} // namespace QSint -} - -#endif // TASKPANELSCHEME_H +#endif // ACTIONPANELSCHEME_H diff --git a/src/Gui/QSint/actionpanel/default/Fold.png b/src/Gui/QSint/actionpanel/default/Fold.png deleted file mode 100644 index 279ddda66f024795b7bcd2fe1d60a2a9c664afa8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 140 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP|(iP z#WAGfR&vS$0fRm%hXV|cXa1Kwx6F7_I)jHX&jZ7ji3`%0+6*3D<+rXDE=R%QmfL{UN3l%L0eCNX%r`njxgN@xNA78E9s diff --git a/src/Gui/QSint/actionpanel/default/FoldOver.png b/src/Gui/QSint/actionpanel/default/FoldOver.png deleted file mode 100644 index 70cd655af60a80cc7f480b4fd576ad93867e9dd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 771 zcmV+e1N{7nP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iXMy z6bc%Z8x;-!00M(aL_t(I%dL~kOO#<0#((pT-#5+7cTustpq5}!78bS8aM7l={S9qG z%gU%Ah(IHP!Y!Bj%#d!(0Y(rF2t`tAH8kIj4nghIMP~6 z``&GQ7*FtSY=OkjJif1PJm~4Tx}nNkB3s)%Fx=Za^hrjik|LruaC9muy+fa*dtkWt zPi+`L8jtr?I$N$BZEv7?dj$mnR~5OcprF7hkK$Mn7E`&ZgU3$n9(nWZEr2%pJzZ~_ z#>Li_YMd&YL?IyU`lNlu(jQE@0Tneihg$3QDLA*@f%f>-mmVcTU9CkBD1tx;6exim zW+#G1K!`vIDi9j#Y^=D!`Y4(Rm$o-l;CX_tgkX)$Rwn>W=1G(ilq#P43U)SCVMX;m z04-2LO|^xH6bZCcp8o5RciElD+QLK>jr9({@?LR-uohza+Y;%#OKQdCKy`OX_;TuY zDQ>AeMQYh4wd^u6lf;VZ#R5S8+?#Y{LP_xAOaEGtJEh!wrg-P;bSmTe!C>hl zow+|O4b5AruCa(j!j$P@bX`LWX&|6N3eQ#ep5n)RhS`}E16^&Q^$yTA?QUZ3CxvAf zGaA8;=~!_C$1*5)4D470JFb(<7MPn&ql*ld)(CL#%;AgqoOf$xGC_7}1>1~J9ychD z={PYR$27I^D{G<35$0qIDg1c h%V7{qxWb?X)PG^FsGvt*)eWFY44$rjF6*2UngA<)CYS&K diff --git a/src/Gui/QSint/actionpanel/default/UnfoldOver.png b/src/Gui/QSint/actionpanel/default/UnfoldOver.png deleted file mode 100644 index 869c2b9c434b9d33d3ffc2224750f5042b3ed574..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 747 zcmVPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iXMy z6buu(oeC@f00L`CL_t(I%e9luOH@%9#((#YcLsIl&ZyxR7D^VF(8nSaTLco+pU@&` z6X+yKH3lIqYEheJKqVW?ZM6%67P)8>VOeerN}c>dY)XguQb%Xz&b{Zf&?X0`We+?Y z&N=USc+UIqDilHA;|YI>P4y*H1|Fv!(-Hyy)%Lz(waVVjt>CA?cGkQJaOqq#?XA^J ze2ehx?K}V;r+wu9mDAp0Li7%Oc+fL2E~n1K5;p~jJ&YL^6}37S z&K@S2GP?gbQ2R$Gg8=n)E-XvXQt72x_wFd~qRH7sv)+xcBnRvDe4_zWA!PUQ)>?8o zi790MQKPe~U3luWG+?-K!-jt6)8Aq9sT-1&3W zRjRSDoFJYyh;13fQU>pT3>73avHFO3I!7$Eb3eTp{VQNvBCrx(XLTdXuZ;}h%?v-2 z8D7pl1mM+NfN(NHIFTj1zEd+Z8v(eRkMZ`?&!LJ2&(WG%7Y>Jw63vFDsi=wy5`-ei z83HpWSPQSS6pEwovh * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#ifndef FREECADTASKPANELSCHEME_H -#define FREECADTASKPANELSCHEME_H - -#include "actionpanelscheme.h" - -#include -#include -#include - -namespace QSint -{ - -/** - * @class FreeCADPanelScheme - * @brief A specialized panel scheme for FreeCAD task panels. - */ -class QSINT_EXPORT FreeCADPanelScheme : public ActionPanelScheme -{ -public: - explicit FreeCADPanelScheme(); - - /** - * @brief Provides the default scheme for FreeCAD panels. - * @return A pointer to the default FreeCADPanelScheme instance. - */ - static ActionPanelScheme* defaultScheme() - { - static FreeCADPanelScheme scheme; - return &scheme; - } - - /** - * @brief Clears the custom action style, resetting to a minimal style. - */ - void clearActionStyle(); - - /** - * @brief Restores the original action style. - */ - void restoreActionStyle(); - -private: - QString builtinScheme; ///< Backup of the original scheme style. - QPixmap builtinFold; ///< Backup of the default fold icon. - QPixmap builtinFoldOver; ///< Backup of the default hover fold icon. - QPixmap builtinUnfold; ///< Backup of the default unfold icon. - QPixmap builtinUnfoldOver; ///< Backup of the default hover unfold icon. -}; - -/** - * @class SystemPanelScheme - * @brief A system-wide default panel scheme for action panels. - */ -class QSINT_EXPORT SystemPanelScheme : public ActionPanelScheme -{ -public: - explicit SystemPanelScheme(); - - /** - * @brief Provides the default system panel scheme. - * @return A pointer to the default SystemPanelScheme instance. - */ - static ActionPanelScheme* defaultScheme() - { - static SystemPanelScheme scheme; - return &scheme; - } - - /** - * @brief The minimal style definition shared across schemes. - */ - static const QString minimumStyle; - -private: - /** - * @brief Draws a fold/unfold icon based on the palette. - * @param p The palette to use for coloring the icon. - * @param fold True for fold icon, false for unfold icon. - * @param hover True for hover effect, false otherwise. - * @return A QPixmap representing the icon. - */ - QPixmap drawFoldIcon(const QPalette& p, bool fold, bool hover) const; - - /** - * @brief Generates a custom system style based on the palette. - * @param p The palette to use for generating the style. - * @return A QString containing the generated style. - */ - QString systemStyle(const QPalette& p) const; -}; - -} // namespace QSint - -#endif // FREECADTASKPANELSCHEME_H - diff --git a/src/Gui/QSint/actionpanel/schemes.qrc b/src/Gui/QSint/actionpanel/schemes.qrc deleted file mode 100644 index 0bf6ca84f6..0000000000 --- a/src/Gui/QSint/actionpanel/schemes.qrc +++ /dev/null @@ -1,8 +0,0 @@ - - - default/Fold.png - default/FoldOver.png - default/Unfold.png - default/UnfoldOver.png - - diff --git a/src/Gui/TaskView/TaskView.cpp b/src/Gui/TaskView/TaskView.cpp index ad99f23ada..77b3af097c 100644 --- a/src/Gui/TaskView/TaskView.cpp +++ b/src/Gui/TaskView/TaskView.cpp @@ -47,7 +47,7 @@ #include #include -#include +#include using namespace Gui::TaskView; @@ -279,7 +279,7 @@ TaskView::TaskView(QWidget *parent) sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(taskPanel->sizePolicy().hasHeightForWidth()); taskPanel->setSizePolicy(sizePolicy); - taskPanel->setScheme(QSint::FreeCADPanelScheme::defaultScheme()); + taskPanel->setScheme(QSint::ActionPanelScheme::defaultScheme()); this->setWidget(taskPanel); setWidgetResizable(true); @@ -603,7 +603,7 @@ void TaskView::showDialog(TaskDialog *dlg) taskPanel->addWidget(ActiveCtrl); } - taskPanel->setScheme(QSint::FreeCADPanelScheme::defaultScheme()); + taskPanel->setScheme(QSint::ActionPanelScheme::defaultScheme()); if (!dlg->needsFullSpace()) taskPanel->addStretch(); @@ -764,7 +764,7 @@ void TaskView::addTaskWatcher() } #endif - taskPanel->setScheme(QSint::FreeCADPanelScheme::defaultScheme()); + taskPanel->setScheme(QSint::ActionPanelScheme::defaultScheme()); } void TaskView::saveCurrentWidth() @@ -870,14 +870,14 @@ void TaskView::clicked (QAbstractButton * button) void TaskView::clearActionStyle() { - static_cast(QSint::FreeCADPanelScheme::defaultScheme())->clearActionStyle(); - taskPanel->setScheme(QSint::FreeCADPanelScheme::defaultScheme()); + static_cast(QSint::ActionPanelScheme::defaultScheme())->clearActionStyle(); + taskPanel->setScheme(QSint::ActionPanelScheme::defaultScheme()); } void TaskView::restoreActionStyle() { - static_cast(QSint::FreeCADPanelScheme::defaultScheme())->restoreActionStyle(); - taskPanel->setScheme(QSint::FreeCADPanelScheme::defaultScheme()); + static_cast(QSint::ActionPanelScheme::defaultScheme())->restoreActionStyle(); + taskPanel->setScheme(QSint::ActionPanelScheme::defaultScheme()); }