Skip to content

Commit

Permalink
+ set a minimalistic style sheet on task panel
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jul 14, 2015
1 parent 5273c47 commit 2ce0fac
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/Gui/QSint/actionpanel/freecadscheme.cpp
Expand Up @@ -82,6 +82,7 @@ const char* ActionPanelFreeCAD =

"QSint--ActionGroup QToolButton[class='action']:hover {"
"color: #428eff;"
"text-decoration: underline;"
"}"

"QSint--ActionGroup QToolButton[class='action']:focus {"
Expand All @@ -94,6 +95,26 @@ const char* ActionPanelFreeCAD =
"}"
;

const char* MinimumActionPanelFreeCAD =

"QSint--ActionGroup QToolButton[class='header'] {"
"text-align: left;"
"background-color: transparent;"
"border: 1px solid transparent;"
"font-weight: bold;"
"}"

"QSint--ActionGroup QToolButton[class='action'] {"
"background-color: transparent;"
"border: 1px solid transparent;"
"text-align: left;"
"}"

"QSint--ActionGroup QToolButton[class='action']:hover {"
"text-decoration: underline;"
"}"
;

FreeCADPanelScheme::FreeCADPanelScheme() : ActionPanelScheme()
{
#if defined(Q_OS_WIN32)
Expand All @@ -115,6 +136,7 @@ FreeCADPanelScheme::FreeCADPanelScheme() : ActionPanelScheme()
#endif

builtinScheme = actionStyle;
minimumStyle = QString(MinimumActionPanelFreeCAD);

headerSize = panelStyle->headerSize;
headerAnimation = panelStyle->headerAnimation;
Expand Down Expand Up @@ -143,7 +165,7 @@ void FreeCADPanelScheme::clearActionStyle()
headerButtonUnfold = QPixmap();
headerButtonUnfoldOver = QPixmap();

actionStyle.clear();
actionStyle = minimumStyle;
}

void FreeCADPanelScheme::restoreActionStyle()
Expand Down Expand Up @@ -284,6 +306,7 @@ QString SystemPanelScheme::systemStyle(const QPalette& p) const

"QSint--ActionGroup QToolButton[class='action']:hover {"
"color: %10;"
"text-decoration: underline;"
"}"

"QSint--ActionGroup QToolButton[class='action']:focus {"
Expand Down
1 change: 1 addition & 0 deletions src/Gui/QSint/actionpanel/freecadscheme.h
Expand Up @@ -47,6 +47,7 @@ class QSINT_EXPORT FreeCADPanelScheme : public ActionPanelScheme

private:
QString builtinScheme;
QString minimumStyle;
QPixmap builtinFold;
QPixmap builtinFoldOver;
QPixmap builtinUnfold;
Expand Down

0 comments on commit 2ce0fac

Please sign in to comment.