Skip to content

Commit

Permalink
Stylesheets:
Browse files Browse the repository at this point in the history
+ selected Tab bar has now opaque background color
+ styles for buttons inside Task Panel that are in reality QToolButtons
+ styles for QListWidget and QTreeView items with checkboxes
+ simplified regular QCheckBox styling
  • Loading branch information
pgilfernandez committed Mar 15, 2016
1 parent 6ee243c commit 348303a
Show file tree
Hide file tree
Showing 6 changed files with 612 additions and 42 deletions.
109 changes: 102 additions & 7 deletions src/Gui/Stylesheets/Dark-blue.qss
@@ -1,7 +1,7 @@
/*
ABOUT
============================================================================================================
version 2.03
version 2.04
QT theme (stylesheet) specially developed for FreeCAD (http://www.freecadweb.org/).
It might work with other software that uses QT styling.

Expand Down Expand Up @@ -509,7 +509,7 @@ QTabBar::tab:right {

QTabBar::tab:selected {
color: #d2d2d2;
background-color: transparent; /* temporal (transparent background) */
background-color: #6e6e6e; /* same as tab content background color */
border-color: #5a5a5a;
}

Expand Down Expand Up @@ -1446,6 +1446,11 @@ Gui--PropertyEditor--PropertyEditor > QWidget > QWidget > QWidget > QWidget > QF
padding: 2px 6px;
}

QPushButton:checked {
background-color: #5e90fa;
border-color: #3874f2;
}


/*==================================================================================================
Tool button inside QDialogs that works as QPushButtons
Expand Down Expand Up @@ -1481,9 +1486,39 @@ QDialog QToolButton:pressed {
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #3874f2, stop:1 #5e90fa);
}

QPushButton:checked {
background-color: #5e90fa;

/*==================================================================================================
Tool button inside Task Panel content that works as QPushButtons
==================================================================================================*/
/* found inside Part Design Workbench and "make a draft on a face" Task panel options */
QSint--ActionGroup QFrame[class="content"] QToolButton {
color: #e0e0e0;
text-align: center;
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #6e6e6e, stop:1 #646464);
border: 1px solid #5a5a5a;
border-bottom-color: #505050; /* simulates shadow under the button */
padding: 2px 6px; /* different than regular QPushButton */
margin: 2px; /* different than regular QPushButton */
min-height: 16px; /* same as QTabBar QPushButton min-width */
border-radius: 4px;
}

QSint--ActionGroup QFrame[class="content"] QToolButton:hover,
QSint--ActionGroup QFrame[class="content"] QToolButton:focus {
color: white;
border-color: #3874f2;
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #5e90fa, stop:1 #3874f2);
}

QSint--ActionGroup QFrame[class="content"] QToolButton:disabled,
QSint--ActionGroup QFrame[class="content"] QToolButton:disabled:checked {
color: #6e6e6e;
border-color: #5a5a5a;
background-color: #5a5a5a;
}

QSint--ActionGroup QFrame[class="content"] QToolButton:pressed {
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #3874f2, stop:1 #5e90fa);
}


Expand Down Expand Up @@ -1549,9 +1584,6 @@ QCheckBox::indicator {
color: black;
background-color: rgba(255,255,255,20);
border: 1px solid #5a5a5a;
}

QCheckBox::indicator {
width: 11px;
height: 11px;
border-radius:2px;
Expand Down Expand Up @@ -1591,6 +1623,69 @@ QCheckBox:focus {
}


/*==================================================================================================
Checkboxs inside QListWidget and QTreeView
==================================================================================================*/
QListWidget::indicator,
QTreeView::indicator {
color: #c8c8c8;
background-color: rgba(255,255,255,20);
border: 1px solid #5a5a5a;
width: 11px;
height: 11px;
border-radius:2px;
}

/* fix for QTreeView::indicator loosing its margin */
QTreeView::indicator {
margin: 3px;
}

QListWidget::indicator:selected,
QTreeView::indicator:selected {
background-color: #e6e6e6;
}

QListWidget::indicator:checked:selected,
QListWidget::indicator:indeterminate:selected,
QTreeView::indicator:checked:selected,
QTreeView::indicator:indeterminate:selected {
background-color: #7cabf9; /* slighly lighter than default */
border-color: #2053c0; /* slighly darker than default */
}

QListWidget::indicator:pressed,
QListWidget::indicator:non-exclusive:checked:pressed,
QListWidget::indicator:indeterminate:pressed,
QListWidget::indicator:checked:pressed,
QTreeView::indicator:pressed,
QTreeView::indicator:non-exclusive:checked:pressed,
QTreeView::indicator:indeterminate:pressed,
QTreeView::indicator:checked:pressed {
border-color: #adc5ed;
}

QListWidget::indicator:checked,
QTreeView::indicator:checked {
background-color: #5e90fa; /* QRadioButton has the same color */
border: 1px solid #3874f2; /* QRadioButton has the same color */
image:url(qss:images/checkbox_light.png);
}

QListWidget::indicator:disabled,
QTreeView::indicator:disabled {
background-color: rgba(255,255,255,20);
border: 1px solid rgba(255,255,255,20);
}

QListWidget::indicator:indeterminate,
QTreeView::indicator:indeterminate {
background-color: #5e90fa;
border: 1px solid #3874f2;
image: url(qss:images/checkbox_indeterminate_light.png);
}


/*==================================================================================================
Slider
==================================================================================================*/
Expand Down
109 changes: 102 additions & 7 deletions src/Gui/Stylesheets/Dark-green.qss
@@ -1,7 +1,7 @@
/*
ABOUT
============================================================================================================
version 2.03
version 2.04
QT theme (stylesheet) specially developed for FreeCAD (http://www.freecadweb.org/).
It might work with other software that uses QT styling.

Expand Down Expand Up @@ -509,7 +509,7 @@ QTabBar::tab:right {

QTabBar::tab:selected {
color: #d2d2d2;
background-color: transparent; /* temporal (transparent background) */
background-color: #6e6e6e; /* same as tab content background color */
border-color: #5a5a5a;
}

Expand Down Expand Up @@ -1446,6 +1446,11 @@ Gui--PropertyEditor--PropertyEditor > QWidget > QWidget > QWidget > QWidget > QF
padding: 2px 6px;
}

QPushButton:checked {
background-color: #94b30f;
border-color: #819c0c;
}


/*==================================================================================================
Tool button inside QDialogs that works as QPushButtons
Expand Down Expand Up @@ -1481,9 +1486,39 @@ QDialog QToolButton:pressed {
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #819c0c, stop:1 #94b30f);
}

QPushButton:checked {
background-color: #94b30f;

/*==================================================================================================
Tool button inside Task Panel content that works as QPushButtons
==================================================================================================*/
/* found inside Part Design Workbench and "make a draft on a face" Task panel options */
QSint--ActionGroup QFrame[class="content"] QToolButton {
color: #e0e0e0;
text-align: center;
background-color: qlineargradient(spread:pad, x1:0, y1:0.3, x2:0, y2:1, stop:0 #6e6e6e, stop:1 #646464);
border: 1px solid #5a5a5a;
border-bottom-color: #505050; /* simulates shadow under the button */
padding: 2px 6px; /* different than regular QPushButton */
margin: 2px; /* different than regular QPushButton */
min-height: 16px; /* same as QTabBar QPushButton min-width */
border-radius: 4px;
}

QSint--ActionGroup QFrame[class="content"] QToolButton:hover,
QSint--ActionGroup QFrame[class="content"] QToolButton:focus {
color: white;
border-color: #819c0c;
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #94b30f, stop:1 #819c0c);
}

QSint--ActionGroup QFrame[class="content"] QToolButton:disabled,
QSint--ActionGroup QFrame[class="content"] QToolButton:disabled:checked {
color: #6e6e6e;
border-color: #5a5a5a;
background-color: #5a5a5a;
}

QSint--ActionGroup QFrame[class="content"] QToolButton:pressed {
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #819c0c, stop:1 #94b30f);
}


Expand Down Expand Up @@ -1549,9 +1584,6 @@ QCheckBox::indicator {
color: black;
background-color: rgba(255,255,255,20);
border: 1px solid #5a5a5a;
}

QCheckBox::indicator {
width: 11px;
height: 11px;
border-radius:2px;
Expand Down Expand Up @@ -1591,6 +1623,69 @@ QCheckBox:focus {
}


/*==================================================================================================
Checkboxs inside QListWidget and QTreeView
==================================================================================================*/
QListWidget::indicator,
QTreeView::indicator {
color: #c8c8c8;
background-color: rgba(255,255,255,20);
border: 1px solid #5a5a5a;
width: 11px;
height: 11px;
border-radius:2px;
}

/* fix for QTreeView::indicator loosing its margin */
QTreeView::indicator {
margin: 3px;
}

QListWidget::indicator:selected,
QTreeView::indicator:selected {
background-color: #e6e6e6;
}

QListWidget::indicator:checked:selected,
QListWidget::indicator:indeterminate:selected,
QTreeView::indicator:checked:selected,
QTreeView::indicator:indeterminate:selected {
background-color: #a5c61a; /* slighly lighter than default */
border-color: #74831d; /* slighly darker than default */
}

QListWidget::indicator:pressed,
QListWidget::indicator:non-exclusive:checked:pressed,
QListWidget::indicator:indeterminate:pressed,
QListWidget::indicator:checked:pressed,
QTreeView::indicator:pressed,
QTreeView::indicator:non-exclusive:checked:pressed,
QTreeView::indicator:indeterminate:pressed,
QTreeView::indicator:checked:pressed {
border-color: #c5d675;
}

QListWidget::indicator:checked,
QTreeView::indicator:checked {
background-color: #94b30f; /* QRadioButton has the same color */
border: 1px solid #819c0c; /* QRadioButton has the same color */
image:url(qss:images/checkbox_light.png);
}

QListWidget::indicator:disabled,
QTreeView::indicator:disabled {
background-color: rgba(255,255,255,20);
border: 1px solid rgba(255,255,255,20);
}

QListWidget::indicator:indeterminate,
QTreeView::indicator:indeterminate {
background-color: #94b30f;
border: 1px solid #819c0c;
image: url(qss:images/checkbox_indeterminate_light.png);
}


/*==================================================================================================
Slider
==================================================================================================*/
Expand Down

0 comments on commit 348303a

Please sign in to comment.