Skip to content

Commit

Permalink
Version 2.05:
Browse files Browse the repository at this point in the history
+ file encoding changed to UTF-8
+ fixed QRadioButtons, QCheckBoxes and QPushButtons inside dropdown menus
+ added checked/unchecked state for QToolButtons inside QTabBar
+ fixed QDockWidget background (when undocked)
  • Loading branch information
pgilfernandez committed Apr 26, 2016
1 parent 0f617d3 commit ce2b2a9
Show file tree
Hide file tree
Showing 7 changed files with 342 additions and 102 deletions.
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
About
-------
version 2.04
version 2.05

QT themes (stylesheet) specially developed for **FreeCAD** (http://www.freecadweb.org/).
They might work with other software that uses QT styling.
Expand All @@ -13,25 +13,19 @@ Light style example:

Installation
------
1. Place the .qss files and /images/ folder in the path that fits your OS:
**If you use FreeCAD 0.16 or higher you don't need to download the stylesheets, they are bundled with official release**
In case you want to manually install them do the following:
1. Place the downloaded .qss files and /images/ folder in the path that fits your OS:
- **OSX** = /Users/[YOUR_USER_NAME]/Library/Preferences/FreeCAD/Gui/Stylesheets/
- **WINDOWS** = C:/[INSTALLATION_PATH]/FreeCAD/data/Gui/Stylesheets/
- **LINUX** = /home/[YOUR_USER_NAME]/.FreeCAD/Gui/Stylesheets/
2. In order to display correctly images that are used inside the stylesheet:
1. **FreeCAD 0.16** (development builds newer than commit 5b3d50a): that's it, you are done!
2. **FreeCAD 0.15**: Images used in the theme need full paths to be found by FreeCAD, so you should search the string **qss:images** and replace with the real path of your computer. It should be done with all the .qss files you want to install-use
2. If you are using FreeCAD 0.15 or lower: images used in the theme need full paths to be found by FreeCAD, so you should search the string **qss:images** and replace with the real path of your computer. It should be done with all the .qss files you want to install-use
- **find** = qss:images
- **replace** = /Users/myName/Library/Preferences/FreeCAD/Gui/Stylesheets/images

Caveats
------
- **FreeCAD 0.15**
* full paths to images are needed, that means all these .qss files should be edited per user
* the "Task panel" is not stylable

Known bugs and TO DOs
------
Please, follow the [link to get updated information](http://forum.freecadweb.org/viewtopic.php?f=10&t=12417&p=99676)
Please, follow the [link to get updated information](http://forum.freecadweb.org/viewtopic.php?f=10&t=14690)

License
------
Expand Down
71 changes: 56 additions & 15 deletions dark-blue.qss
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
ABOUT
============================================================================================================
version 2.04
version 2.05
QT theme (stylesheet) specially developed for FreeCAD (http://www.freecadweb.org/).
It might work with other software that uses QT styling.


LICENSE
============================================================================================================
Copyright (c) 2016 Pablo Gil Fern�ndez
Copyright (c) 2016 Pablo Gil Fernández

This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/.
Expand Down Expand Up @@ -93,6 +93,7 @@ Main window
==================================================================================================*/
QMainWindow,
QDialog,
QDockWidget,
QToolBar {
background-color: #6e6e6e; /* main background color */
}
Expand Down Expand Up @@ -158,6 +159,38 @@ QMenu::indicator:non-exclusive:checked {
color: white;
}

/* Fix for elements inside a drop-down menu */
QMenu QRadioButton,
QMenu QCheckBox,
QMenu QPushButton,
QMenu QToolButton {
color: white; /* same as regular QRadioButton and QCheckBox */
}

QMenu QRadioButton:hover,
QMenu QCheckBox:hover,
QMenu QPushButton:hover,
QMenu QToolButton:hover,
QMenu QPushButton:pressed,
QMenu QToolButton:pressed,
QMenu QPushButton:selected,
QMenu QToolButton:selected {
color: white;
background-color: #5e90fa; /* same as QMenu::item:selected and QMenu::item:pressed */
}

QMenu QRadioButton:disabled,
QMenu QCheckBox:disabled {
color: #f5f5f5;
}

QMenu QRadioButton::indicator:disabled,
QMenu QCheckBox::indicator:disabled {
color: #f5f5f5;
background-color: transparent;
border: 1px solid #f5f5f5;
}


/*==================================================================================================
Tool bar
Expand Down Expand Up @@ -937,14 +970,6 @@ QSplitter::handle {
padding: 0px;
}

QSplitter::handle:vertical {
background-image: url(qss:images/splitter_horizontal_dark.png);
background-position: center center;
background-repeat: none;
margin: 2px 4px 2px 4px;
height: 2px;
}

QSplitter::handle:horizontal {
background-image: url(qss:images/splitter_vertical_dark.png);
background-position: center center;
Expand All @@ -953,7 +978,15 @@ QSplitter::handle:horizontal {
width: 2px;
}

/* Similar to the splitter is the following window separator: */
QSplitter::handle:vertical {
background-image: url(qss:images/splitter_horizontal_dark.png);
background-position: center center;
background-repeat: none;
margin: 2px 4px 2px 4px;
height: 2px;
}

/* Similar to the splitter is the following window separator (but horizontal/vertical is on the opposite way) */
QMainWindow::separator {
background-position: center center;
background-repeat: none;
Expand Down Expand Up @@ -1555,13 +1588,10 @@ QRadioButton::indicator:pressed {
border-color: #adc5ed;
}

QRadioButton::indicator:disabled {
border: 1px solid #f5f5f5;
}

QRadioButton::indicator:disabled {
color: #f5f5f5;
background-color: transparent;
border: 1px solid #f5f5f5;
}

QRadioButton:focus {
Expand Down Expand Up @@ -1888,6 +1918,17 @@ QToolBar > QToolButton::menu-arrow:open {
background-image: url(qss:images/down_arrow_lighter.png);
}

/* when QToolButton is checked: */
QToolBar > QToolButton:checked {
border: 1px solid #7cabf9;
background-color: rgba(124,171,249,60); /* transparency for #7cabf9 color */
}

QToolBar > QToolButton:checked:hover {
border: 1px solid #7cabf9;
background-color: rgba(124,171,249,80); /* transparency for #7cabf9 color */
}

/*The "show more" button (it can also be stylable with "QToolBarExtension" */
QToolBar QToolButton#qt_toolbar_ext_button {
margin: 0px;
Expand Down
71 changes: 56 additions & 15 deletions dark-green.qss
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
ABOUT
============================================================================================================
version 2.04
version 2.05
QT theme (stylesheet) specially developed for FreeCAD (http://www.freecadweb.org/).
It might work with other software that uses QT styling.


LICENSE
============================================================================================================
Copyright (c) 2016 Pablo Gil Fern�ndez
Copyright (c) 2016 Pablo Gil Fernández

This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/.
Expand Down Expand Up @@ -93,6 +93,7 @@ Main window
==================================================================================================*/
QMainWindow,
QDialog,
QDockWidget,
QToolBar {
background-color: #6e6e6e; /* main background color */
}
Expand Down Expand Up @@ -158,6 +159,38 @@ QMenu::indicator:non-exclusive:checked {
color: white;
}

/* Fix for elements inside a drop-down menu */
QMenu QRadioButton,
QMenu QCheckBox,
QMenu QPushButton,
QMenu QToolButton {
color: white; /* same as regular QRadioButton and QCheckBox */
}

QMenu QRadioButton:hover,
QMenu QCheckBox:hover,
QMenu QPushButton:hover,
QMenu QToolButton:hover,
QMenu QPushButton:pressed,
QMenu QToolButton:pressed,
QMenu QPushButton:selected,
QMenu QToolButton:selected {
color: white;
background-color: #94b30f; /* same as QMenu::item:selected and QMenu::item:pressed */
}

QMenu QRadioButton:disabled,
QMenu QCheckBox:disabled {
color: #f5f5f5;
}

QMenu QRadioButton::indicator:disabled,
QMenu QCheckBox::indicator:disabled {
color: #f5f5f5;
background-color: transparent;
border: 1px solid #f5f5f5;
}


/*==================================================================================================
Tool bar
Expand Down Expand Up @@ -937,14 +970,6 @@ QSplitter::handle {
padding: 0px;
}

QSplitter::handle:vertical {
background-image: url(qss:images/splitter_horizontal_dark.png);
background-position: center center;
background-repeat: none;
margin: 2px 4px 2px 4px;
height: 2px;
}

QSplitter::handle:horizontal {
background-image: url(qss:images/splitter_vertical_dark.png);
background-position: center center;
Expand All @@ -953,7 +978,15 @@ QSplitter::handle:horizontal {
width: 2px;
}

/* Similar to the splitter is the following window separator: */
QSplitter::handle:vertical {
background-image: url(qss:images/splitter_horizontal_dark.png);
background-position: center center;
background-repeat: none;
margin: 2px 4px 2px 4px;
height: 2px;
}

/* Similar to the splitter is the following window separator (but horizontal/vertical is on the opposite way) */
QMainWindow::separator {
background-position: center center;
background-repeat: none;
Expand Down Expand Up @@ -1555,13 +1588,10 @@ QRadioButton::indicator:pressed {
border-color: #c5d675;
}

QRadioButton::indicator:disabled {
border: 1px solid #f5f5f5;
}

QRadioButton::indicator:disabled {
color: #f5f5f5;
background-color: transparent;
border: 1px solid #f5f5f5;
}

QRadioButton:focus {
Expand Down Expand Up @@ -1888,6 +1918,17 @@ QToolBar > QToolButton::menu-arrow:open {
background-image: url(qss:images/down_arrow_lighter.png);
}

/* when QToolButton is checked: */
QToolBar > QToolButton:checked {
border: 1px solid #a5c61a;
background-color: rgba(124,171,249,60); /* transparency for #a5c61a color */
}

QToolBar > QToolButton:checked:hover {
border: 1px solid #a5c61a;
background-color: rgba(124,171,249,80); /* transparency for #a5c61a color */
}

/*The "show more" button (it can also be stylable with "QToolBarExtension" */
QToolBar QToolButton#qt_toolbar_ext_button {
margin: 0px;
Expand Down
Loading

0 comments on commit ce2b2a9

Please sign in to comment.