diff --git a/src/Gui/Dialogs/DlgPreferences.ui b/src/Gui/Dialogs/DlgPreferences.ui
index 14bbef221a..3659723381 100644
--- a/src/Gui/Dialogs/DlgPreferences.ui
+++ b/src/Gui/Dialogs/DlgPreferences.ui
@@ -5,7 +5,7 @@
#sidebar { background-color: rgba(0, 0, 0, 25); }
#groupsTreeView { background-color: transparent; }
- #groupsTreeView::item { padding: 6px 8px; }
+ #groupsTreeView::item { padding: 6px 0px; }
diff --git a/src/Gui/FileDialog.cpp b/src/Gui/FileDialog.cpp
index aeca1932c1..b45f505f3d 100644
--- a/src/Gui/FileDialog.cpp
+++ b/src/Gui/FileDialog.cpp
@@ -668,7 +668,6 @@ FileChooser::FileChooser ( QWidget * parent )
completer->setModel( fs_model );
lineEdit->setCompleter( completer );
- layout->addWidget( lineEdit );
connect(lineEdit, &QLineEdit::textChanged, this, &FileChooser::fileNameChanged);
connect(lineEdit, &QLineEdit::editingFinished, this, &FileChooser::editingFinished);
@@ -679,7 +678,8 @@ FileChooser::FileChooser ( QWidget * parent )
button->setAttribute(Qt::WA_LayoutUsesWidgetRect); // layout size from QMacStyle was not correct
#endif
- layout->addWidget(button);
+ layout->addWidget(lineEdit, 1);
+ layout->addWidget(button, -1);
connect(button, &QPushButton::clicked, this, &FileChooser::chooseFile);
@@ -690,7 +690,6 @@ FileChooser::~FileChooser() = default;
void FileChooser::resizeEvent(QResizeEvent* e)
{
- button->setFixedWidth(e->size().height());
button->setFixedHeight(e->size().height());
}
@@ -815,12 +814,12 @@ void FileChooser::setFilter ( const QString& filter )
/**
* Sets the browse button's text to \a txt.
*/
-void FileChooser::setButtonText( const QString& txt )
+void FileChooser::setButtonText(const QString& txt)
{
- button->setText( txt );
+ button->setText(txt);
int w1 = 2 * QtTools::horizontalAdvance(button->fontMetrics(), txt);
int w2 = 2 * QtTools::horizontalAdvance(button->fontMetrics(), QLatin1String(" ... "));
- button->setFixedWidth( (w1 > w2 ? w1 : w2) );
+ button->setMinimumWidth(std::max(w1, w2));
Q_EMIT buttonTextChanged(txt);
}
diff --git a/src/Gui/PreferencePacks/CMakeLists.txt b/src/Gui/PreferencePacks/CMakeLists.txt
index e4685e9251..1d704c8f70 100644
--- a/src/Gui/PreferencePacks/CMakeLists.txt
+++ b/src/Gui/PreferencePacks/CMakeLists.txt
@@ -1,31 +1,34 @@
-
SET(PreferencePacks_Files
-"package.xml"
+ "package.xml"
)
SET(PreferencePacks_Directories
-"FreeCAD Classic"
-"Dark behave"
-"FreeCAD Light"
-"FreeCAD Dark"
+ "FreeCAD Classic"
+ "Dark behave"
+ "FreeCAD Light"
+ "FreeCAD Dark"
)
ADD_CUSTOM_TARGET(PreferencePacks_data ALL
-SOURCES ${PreferencePacks_Files} ${PreferencePacks_Directories}
+ SOURCES ${PreferencePacks_Files} ${PreferencePacks_Directories}
)
FILE(COPY ${PreferencePacks_Files} ${PreferencePacks_Directories} DESTINATION "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Gui/PreferencePacks")
+fc_copy_sources(PreferencePacks_data "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Gui/PreferencePacks"
+ ${PreferencePacks_Files}
+ ${PreferencePacks_Directories})
+
INSTALL(
-FILES
- ${PreferencePacks_Files}
-DESTINATION
- ${CMAKE_INSTALL_DATADIR}/Gui/PreferencePacks
+ FILES
+ ${PreferencePacks_Files}
+ DESTINATION
+ ${CMAKE_INSTALL_DATADIR}/Gui/PreferencePacks
)
INSTALL(
-DIRECTORY
- ${PreferencePacks_Directories}
-DESTINATION
- ${CMAKE_INSTALL_DATADIR}/Gui/PreferencePacks
+ DIRECTORY
+ ${PreferencePacks_Directories}
+ DESTINATION
+ ${CMAKE_INSTALL_DATADIR}/Gui/PreferencePacks
)
\ No newline at end of file
diff --git a/src/Gui/PreferencePacks/FreeCAD Dark/FreeCAD Dark.cfg b/src/Gui/PreferencePacks/FreeCAD Dark/FreeCAD Dark.cfg
index 98e84bd4dc..d6d05925ee 100644
--- a/src/Gui/PreferencePacks/FreeCAD Dark/FreeCAD Dark.cfg
+++ b/src/Gui/PreferencePacks/FreeCAD Dark/FreeCAD Dark.cfg
@@ -26,7 +26,7 @@
Freecad Overlay.qss
Fusion
- FreeCAD_Stylesheet.qss
+ FreeCAD.qss
FreeCAD Dark
@@ -121,6 +121,7 @@
@PrimaryColorLighten6
@PrimaryColorDarken3
@PrimaryColorLighten3
+ @PrimaryColor
@PrimaryColorLighten4
lighten(@GroupboxBackgroundColor,20)
images_classic
@@ -155,11 +156,12 @@
darken(@TextForegroundColor,40)
@PrimaryColor
#ffffff
- darken(@UserHighlight1Color,100)
+ darken(@AccentColor,100)
#0095ff
2px
- @ThemeAccentColor1
- @ThemeAccentColor2
+ @ThemeAccentColor1
+ blend(@GeneralBackgroundColor,@AccentColor,60)
+ blend(@GeneralBackgroundHoverColor,@AccentColor,30)
diff --git a/src/Gui/PreferencePacks/FreeCAD Light/FreeCAD Light.cfg b/src/Gui/PreferencePacks/FreeCAD Light/FreeCAD Light.cfg
index 555dba0571..5cbfd007a6 100644
--- a/src/Gui/PreferencePacks/FreeCAD Light/FreeCAD Light.cfg
+++ b/src/Gui/PreferencePacks/FreeCAD Light/FreeCAD Light.cfg
@@ -23,7 +23,7 @@
Freecad Overlay.qss
Fusion
- FreeCAD_Stylesheet.qss
+ FreeCAD.qss
FreeCAD Light
@@ -136,6 +136,7 @@
@PrimaryColorDarken5
@PrimaryColorDarken3
@PrimaryColorDarken4
+ @PrimaryColorDarken2
@PrimaryColorLighten2
darken(@GroupboxBackgroundColor,20)
images_classic
@@ -170,11 +171,11 @@
lighten(@TextForegroundColor,40)
@PrimaryColorLighten3
#000000
- lighten(@UserHighlight1Color,50)
+ @AccentHoverColor
#0061a7
- 2px
- @ThemeAccentColor1
- @ThemeAccentColor2
+ @ThemeAccentColor1
+ blend(@GeneralBackgroundColor,@AccentColor,60)
+ blend(@GeneralBackgroundHoverColor,@AccentColor,30)
diff --git a/src/Gui/PreferencePacks/package.xml b/src/Gui/PreferencePacks/package.xml
index 2746d44981..3ecbc6b807 100644
--- a/src/Gui/PreferencePacks/package.xml
+++ b/src/Gui/PreferencePacks/package.xml
@@ -6,7 +6,6 @@
MisterMaker
LGPL2
https://github.com/FreeCAD/FreeCAD
-
FreeCAD Classic
@@ -25,7 +24,7 @@
1.0.0
built-in
background
- light
+ light
FreeCAD Dark
@@ -34,8 +33,7 @@
1.0.0
built-in
background
- dark
+ dark
-
diff --git a/src/Gui/QSint/actionpanel/actiongroup.cpp b/src/Gui/QSint/actionpanel/actiongroup.cpp
index f24e684a50..534129e150 100644
--- a/src/Gui/QSint/actionpanel/actiongroup.cpp
+++ b/src/Gui/QSint/actionpanel/actiongroup.cpp
@@ -57,6 +57,7 @@ void ActionGroup::init(bool hasHeader)
separator->setFrameShadow(QFrame::Raised);
separator->setFixedHeight(separatorHeight);
separator->setContentsMargins(8, 0, 8, 0);
+ separator->setProperty("class", "separator");
layout->addWidget(separator);
myGroup = new TaskGroup(this, hasHeader);
diff --git a/src/Gui/StyleParameters/Parser.cpp b/src/Gui/StyleParameters/Parser.cpp
index dbcb52f27a..5f4855a82f 100644
--- a/src/Gui/StyleParameters/Parser.cpp
+++ b/src/Gui/StyleParameters/Parser.cpp
@@ -26,6 +26,8 @@
#include "Parser.h"
#include "ParameterManager.h"
+#include
+
#ifndef _PreComp_
#include
#include
@@ -54,36 +56,85 @@ Value Color::evaluate([[maybe_unused]] const EvaluationContext& context) const
Value FunctionCall::evaluate(const EvaluationContext& context) const
{
- if (arguments.size() != 2) {
- THROWM(Base::ExpressionError,
- fmt::format("Function '{}' expects 2 arguments, got {}",
- functionName,
- arguments.size()));
- }
+ const auto lightenOrDarken = [this](const EvaluationContext& context) -> Value {
+ if (arguments.size() != 2) {
+ THROWM(Base::ExpressionError,
+ fmt::format("Function '{}' expects 2 arguments, got {}",
+ functionName,
+ arguments.size()));
+ }
- auto colorArg = arguments[0]->evaluate(context);
- auto amountArg = arguments[1]->evaluate(context);
+ auto colorArg = arguments[0]->evaluate(context);
+ auto amountArg = arguments[1]->evaluate(context);
- if (!std::holds_alternative(colorArg)) {
- THROWM(Base::ExpressionError,
- fmt::format("'{}' is not supported for colors", functionName));
- }
+ if (!std::holds_alternative(colorArg)) {
+ THROWM(Base::ExpressionError,
+ fmt::format("'{}' is not supported for colors", functionName));
+ }
- auto color = std::get(colorArg);
+ auto color = std::get(colorArg);
- // In Qt if you want to make color 20% darker or lighter, you need to pass 120 as the value
- // we, however, want users to pass only the relative difference, hence we need to add the
- // 100 required by Qt.
- //
- // NOLINTNEXTLINE(*-magic-numbers)
- auto amount = 100 + static_cast(std::get(amountArg).value);
+ // In Qt if you want to make color 20% darker or lighter, you need to pass 120 as the value
+ // we, however, want users to pass only the relative difference, hence we need to add the
+ // 100 required by Qt.
+ //
+ // NOLINTNEXTLINE(*-magic-numbers)
+ auto amount = 100 + static_cast(std::get(amountArg).value);
- if (functionName == "lighten") {
- return color.lighter(amount);
- }
+ if (functionName == "lighten") {
+ return color.lighter(amount);
+ }
- if (functionName == "darken") {
- return color.darker(amount);
+ if (functionName == "darken") {
+ return color.darker(amount);
+ }
+
+ return {};
+ };
+
+ const auto blend = [this](const EvaluationContext& context) -> Value {
+ if (arguments.size() != 3) {
+ THROWM(Base::ExpressionError,
+ fmt::format("Function '{}' expects 3 arguments, got {}",
+ functionName,
+ arguments.size()));
+ }
+
+ auto firstColorArg = arguments[0]->evaluate(context);
+ auto secondColorArg = arguments[1]->evaluate(context);
+ auto amountArg = arguments[2]->evaluate(context);
+
+ if (!std::holds_alternative(firstColorArg)) {
+ THROWM(Base::ExpressionError,
+ fmt::format("first argument of '{}' must be color", functionName));
+ }
+
+ if (!std::holds_alternative(secondColorArg)) {
+ THROWM(Base::ExpressionError,
+ fmt::format("second argument of '{}' must be color", functionName));
+ }
+
+ auto firstColor = std::get(firstColorArg);
+ auto secondColor = std::get(secondColorArg);
+
+ auto amount = Base::fromPercent(std::get(amountArg).value);
+
+ return QColor::fromRgbF(
+ (1 - amount) * firstColor.redF() + amount * secondColor.redF(),
+ (1 - amount) * firstColor.greenF() + amount * secondColor.greenF(),
+ (1 - amount) * firstColor.blueF() + amount * secondColor.blueF()
+ );
+ };
+
+ std::map> functions = {
+ {"lighten", lightenOrDarken},
+ {"darken", lightenOrDarken},
+ {"blend", blend},
+ };
+
+ if (functions.contains(functionName)) {
+ auto function = functions.at(functionName);
+ return function(context);
}
THROWM(Base::ExpressionError, fmt::format("Unknown function '{}'", functionName));
diff --git a/src/Gui/Stylesheets/CMakeLists.txt b/src/Gui/Stylesheets/CMakeLists.txt
index be101899ec..7cfec3716f 100644
--- a/src/Gui/Stylesheets/CMakeLists.txt
+++ b/src/Gui/Stylesheets/CMakeLists.txt
@@ -1,6 +1,6 @@
SET(Stylesheets_Files
- "FreeCAD_stylesheet.qss"
+ "FreeCAD.qss"
#remove below after testing new stylesheet system 8/6/2025
"FreeCAD Dark.qss"
"FreeCAD Light.qss"
diff --git a/src/Gui/Stylesheets/FreeCAD_stylesheet.qss b/src/Gui/Stylesheets/FreeCAD.qss
similarity index 90%
rename from src/Gui/Stylesheets/FreeCAD_stylesheet.qss
rename to src/Gui/Stylesheets/FreeCAD.qss
index 904f1f3327..2b665fd32e 100644
--- a/src/Gui/Stylesheets/FreeCAD_stylesheet.qss
+++ b/src/Gui/Stylesheets/FreeCAD.qss
@@ -25,7 +25,7 @@ INSTALLATION WHEN NECESSARY
FOLLOWING CODES ARE CHANGED IN THE SETTINGS:
@PrimaryColor
-@UserHighlight1Color
+@AccentColor
@GeneralAlternateBackgroundColor
@GeneralBackgroundColor
@GeneralBorderColor
@@ -71,19 +71,16 @@ Resetting everything helps to unify styles across different operating systems
--------------------------------------------------------------------------- */
* {
- padding: 0px;
- margin: 0px;
border-style: none;
border-image: none;
border-radius: 0px;
border-color: @GeneralBorderColor;
border-style: none;
outline: none;
- color:@TextForegroundColor;
+ color: @TextForegroundColor;
selection-background-color: @TextSelectBackgroundColor;
- selection-color:@TextForegroundColor;
+ selection-color: @TextForegroundColor;
gridline-color: @GeneralGridLinesColor;
- spacing: 0px;
}
/* specific reset for elements inside QToolBar */
@@ -91,10 +88,10 @@ QToolBar * {}/*hacks */
/* fix for column items background when a link is present */
Gui--PropertyEditor--PropertyEditor > QWidget > QFrame:focus {
- background-color: @UserHighlight1Color;/* same as focused background color */}
+ background-color: @AccentColor;/* same as focused background color */}
/* hack to hide weird redundant information inside cells with links and no editable data (but editable via "..." button) */
Gui--PropertyEditor--PropertyEditor > QWidget > QWidget > QLabel {
- background-color: @TextUrlColor;/* same as focused background color */
+ background-color: @TextUrlColor;/* same as focused background color */
border-radius: @InputFieldBorderRadius;
}
@@ -118,12 +115,6 @@ Gui--NavigationIndicatorGui--BlenderNavigationStyle {
qproperty-icon: url(:/icons/icons/NavigationBlender_light.svg);
}
-Gui--MDIView QFrame{
- border-top: 3px solid qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 @GeneralBorderColor, stop:1 transparent);
- border-left: 3px solid qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 @GeneralBorderColor stop:1 transparent);
- border-right: 3px solid qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 transparent, stop:1 @GeneralBorderColor);
-}
-
Gui--MDIView QLabel{
border-style: none;
background-color: transparent;
@@ -136,10 +127,6 @@ Gui--MDIView QScrollArea{
This causes much load time. DONT USE "QWidget { " This causes a lot of lag.
*/
-/* QWidget::item:selected {
- background-color: @UserHighlight1Color;
-}
- */
@@ -158,7 +145,7 @@ QColorDialog QLabel {
/* Causes issue with colorselector.
QWidget::item:hover:!selected {
- background-color: @UserHighlight1Color;
+ background-color: @AccentColor;
}
*/
@@ -236,7 +223,6 @@ QStatusBar QLabel {
}
QStatusBar QPushButton {
- min-width: 0;
padding-left: 8px;
padding-right: 8px;
}
@@ -256,7 +242,7 @@ QCheckBox {
}
QCheckBox:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QCheckBox QWidget:disabled {
@@ -356,7 +342,7 @@ QGroupBox::indicator:unchecked:hover {
}
QGroupBox::indicator:unchecked:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QGroupBox::indicator:unchecked:disabled {
@@ -376,7 +362,7 @@ QGroupBox::indicator:checked:hover {
}
QGroupBox::indicator:checked:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QGroupBox::indicator:checked:disabled {
@@ -400,7 +386,7 @@ QRadioButton {
}
QRadioButton:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QRadioButton:disabled {
@@ -472,7 +458,7 @@ QMenuBar::item:disabled{
}
QMenuBar:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QMenuBar::item {
@@ -483,12 +469,12 @@ QMenuBar::item {
QMenuBar::item:selected {
background-color: transparent;
border-style: none;
- background-color: @GeneralBackgroundHoverColor;
+ background-color: @AccentBackgroundColor;
}
QMenuBar::item:pressed {
border-style: none;
- background-color: @GeneralBackgroundHoverColor;
+ background-color: @AccentBackgroundColor;
}
/* QMenu ------------------------------------------------------------------
@@ -521,11 +507,11 @@ QMenu::item {
/* Reserve space for selection border */}
QMenu::item:selected {
- background-color: @GeneralBackgroundHoverColor;
+ background-color: @AccentBackgroundColor;
}
QMenu::item:pressed {
- background-color: @GeneralBackgroundHoverColor;
+ background-color: @AccentBackgroundColor;
}
QMenu::icon {
@@ -542,9 +528,9 @@ QMenu::indicator {
/* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */
/* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */}
QMenu::icon:checked { /* appearance of a 'checked' icon */
- background-color: @UserHighlight1Color;
+ background-color: @AccentColor;
margin-left: -5px;
- border: 5px solid @UserHighlight1Color;
+ border: 5px solid @AccentColor;
position: absolute;
}
@@ -671,19 +657,23 @@ https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qscrollbar
--------------------------------------------------------------------------- */
QScrollBar:horizontal {
- border-right: 14px solid qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 @ScrollbarBackgroundColor, stop:0.1 @ButtonTopBackgroundColor , stop:0.9 @ButtonTopBackgroundColor , stop:1 @ScrollbarBackgroundColor);
- border-left: 14px solid qlineargradient(x1:1, y1:0, x2:0, y2:0, stop:0 @ScrollbarBackgroundColor, stop:0.1 @ButtonTopBackgroundColor , stop:0.9 @ButtonTopBackgroundColor , stop:1 @ScrollbarBackgroundColor);
+ border-right: 14px solid @GeneralBorderColor;
+ border-left: 14px solid @GeneralBorderColor;
border-top: 1px solid @GeneralBorderColor;
border-bottom: 1px solid @GeneralBorderColor;
background-color: @ScrollbarBackgroundColor;
+ padding: 0;
+ margin: 0;
}
QScrollBar:vertical {
- border-top: 14px solid qlineargradient(x1:0, y1:1, x2:0, y2:0, stop:0 @ScrollbarBackgroundColor, stop:0.1 @ButtonTopBackgroundColor , stop:0.9 @ButtonTopBackgroundColor , stop:1 @ScrollbarBackgroundColor);
- border-bottom: 14px solid qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 @ScrollbarBackgroundColor, stop:0.1 @ButtonTopBackgroundColor , stop:0.9 @ButtonTopBackgroundColor , stop:1 @ScrollbarBackgroundColor);
+ border-top: 14px solid @GeneralBorderColor;
+ border-bottom: 14px solid @GeneralBorderColor;
border-left: 1px solid @GeneralBorderColor;
border-right: 1px solid @GeneralBorderColor;
background-color: @ScrollbarBackgroundColor;
+ padding: 0;
+ margin: 0;
}
QScrollBar::handle:horizontal {
@@ -699,7 +689,7 @@ QScrollBar::handle:horizontal:hover {
}
QScrollBar::handle:horizontal:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QScrollBar::handle:vertical {
@@ -710,79 +700,80 @@ QScrollBar::handle:vertical {
background-color: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 @ButtonTopBackgroundColor, stop:1 @ButtonBottomBackgroundColor);
}
-QScrollBar::handle:vertical:hover {
- background-color: @GeneralBackgroundHoverColor;
- border: 1px @ButtonTopBackgroundColor;
-}
-
QScrollBar::handle:vertical:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
-QScrollBar::add-line:horizontal {
- margin: 0px 2px 0px 2px;
- border-image: url(qss:@IconsLocationFolderName/arrow-right-lightgray.svg);
- height: 10px;
- width: 10px;
- subcontrol-position: right;
+QScrollBar::add-line, QScrollBar::sub-line {
+ height: 12px;
+ width: 12px;
subcontrol-origin: margin;
+ border: 1px solid @GeneralBorderColor;
}
-QScrollBar::add-line:horizontal:hover, QScrollBar::add-line:horizontal:on {
- border-image: url(qss:@IconsLocationFolderName/arrow-right-@StylesheetIconsColor.svg);
+QScrollBar::handle:hover,
+QScrollBar::add-line:vertical:hover, QScrollBar::sub-line:vertical:hover ,
+QScrollBar::add-line:horizontal:hover, QScrollBar::sub-line:horizontal:hover {
+ background-color: @GeneralBackgroundHoverColor;
}
-QScrollBar::add-line:vertical {
- margin: 2px 0px 2px 0px;
- border-image: url(qss:@IconsLocationFolderName/arrow-down-lightgray.svg);
- height: 10px;
- width: 10px;
- subcontrol-position: bottom;
- subcontrol-origin: margin;
+QScrollBar::right-arrow, QScrollbar::left-arrow, QScrollBar::up-arrow, QScrollBar::down-arrow {
+ margin: 2px;
}
-QScrollBar::add-line:vertical:hover, QScrollBar::add-line:vertical:on {
- image: url(qss:@IconsLocationFolderName/arrow-down-@StylesheetIconsColor.svg);
-}
-
-QScrollBar::sub-line:horizontal {
- margin: 0px 2px 0px 2px;
+QScrollBar::left-arrow {
border-image: url(qss:@IconsLocationFolderName/arrow-left-lightgray.svg);
- height: 10px;
- width: 10px;
- subcontrol-position: left;
- subcontrol-origin: margin;
}
-QScrollBar::sub-line:horizontal:hover, QScrollBar::sub-line:horizontal:on {
+QScrollBar::right-arrow {
+ border-image: url(qss:@IconsLocationFolderName/arrow-right-lightgray.svg);
+}
+
+QScrollBar::up-arrow {
+ border-image: url(qss:@IconsLocationFolderName/arrow-up-lightgray.svg);
+}
+
+QScrollBar::down-arrow {
+ border-image: url(qss:@IconsLocationFolderName/arrow-down-lightgray.svg);
+}
+
+QScrollBar::left-arrow:hover {
border-image: url(qss:@IconsLocationFolderName/arrow-left-@StylesheetIconsColor.svg);
}
-QScrollBar::sub-line:vertical {
- margin: 2px 0px 2px 0px;
- border-image: url(qss:@IconsLocationFolderName/arrow-up-lightgray.svg);
- height: 10px;
- width: 10px;
- subcontrol-position: top;
- subcontrol-origin: margin;
+QScrollBar::right-arrow:hover {
+ border-image: url(qss:@IconsLocationFolderName/arrow-right-@StylesheetIconsColor.svg);
}
-QScrollBar::sub-line:vertical:hover, QScrollBar::sub-line:vertical:on {
+QScrollBar::up-arrow:hover {
border-image: url(qss:@IconsLocationFolderName/arrow-up-@StylesheetIconsColor.svg);
}
-QScrollBar::up-arrow:horizontal, QScrollBar::down-arrow:horizontal {
- background-color: none;
+QScrollBar::down-arrow:hover {
+ border-image: url(qss:@IconsLocationFolderName/arrow-down-@StylesheetIconsColor.svg);
}
-QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
- background-color: none;
+QScrollBar::add-line:horizontal {
+ background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 @ButtonTopBackgroundColor, stop:1 @ButtonBottomBackgroundColor);
+ subcontrol-position: right;
}
-QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
- background-color: none;
+QScrollBar::add-line:vertical {
+ background-color: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 @ButtonTopBackgroundColor, stop:1 @ButtonBottomBackgroundColor);
+ subcontrol-position: bottom;
}
+QScrollBar::sub-line:horizontal {
+ background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 @ButtonTopBackgroundColor, stop:1 @ButtonBottomBackgroundColor);
+ subcontrol-position: left;
+}
+
+QScrollBar::sub-line:vertical {
+ background-color: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 @ButtonTopBackgroundColor, stop:1 @ButtonBottomBackgroundColor);
+ subcontrol-position: top;
+}
+
+QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal,
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background-color: none;
}
@@ -799,11 +790,11 @@ QTextEdit {
}
QTextEdit:focus {
- border-top: 2px solid @UserHighlight1Color;
+ border-top: 2px solid @AccentColor;
}
QTextEdit:selected {
- background-color: @UserHighlight1Color;
+ background-color: @AccentColor;
}
/* QPlainTextEdit ---------------------------------------------------------
@@ -817,7 +808,7 @@ QPlainTextEdit {
}
QPlainTextEdit:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QPlainTextEdit:selected {
@@ -1037,7 +1028,7 @@ QAbstractSpinBox:disabled {
QAbstractSpinBox:hover {}
QAbstractSpinBox:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QAbstractSpinBox:selected {
@@ -1145,7 +1136,7 @@ QProgressBar:disabled {
}
QProgressBar::chunk {
- background-color: @UserHighlight1Color;
+ background-color: @AccentColor;
color: @PrimaryColor;
border-radius: @InputFieldBorderRadius;
}
@@ -1167,15 +1158,18 @@ QPushButton {
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 @ButtonTopBackgroundColor,stop:1 @ButtonBottomBackgroundColor);
border: 1px solid @ButtonBorderColor;
border-radius: @InputFieldBorderRadius;
- padding: 3px 12px;
- min-width: 40px;}
+ padding: 3px 12px;
+ min-width: 64px;
+}
#CreateNewRow > QPushButton {
- /* Reset min width to default */
- min-width: -1;
border-radius: @InputFieldBorderRadius;
}
+Gui--FileChooser QPushButton {
+ min-width: 0;
+}
+
QPushButton:disabled {
background-color: @GeneralDisabledBackgroundColor;
color: @TextDisabledColor;
@@ -1187,18 +1181,18 @@ QPushButton:checked {
}
QPushButton:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QPushButton:checked:disabled {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
color: @TextDisabledColor;
outline: none;
}
QPushButton:checked:selected {
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 @ButtonTopBackgroundColor, stop:1 @ButtonBottomBackgroundColor);
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QPushButton:hover {
@@ -1219,11 +1213,6 @@ QPushButton::menu-indicator {
bottom: 4px;
}
-QDialogButtonBox QPushButton {
- min-width: 80px;
- padding: 3px 0px;
-}
-
/* QToolButton ------------------------------------------------------------
https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtoolbutton
@@ -1246,7 +1235,7 @@ QToolBar QToolButton {
QDialog QToolButton:hover {
background-color: @GeneralBackgroundHoverColor;
- /* border: 1px solid @UserHighlight1Color;*/}
+ /* border: 1px solid @AccentColor;*/}
QToolButton:disabled {
/* padding: 2px; */
/* background-color: @GeneralDisabledBackgroundColor; */
@@ -1256,17 +1245,17 @@ QToolButton:disabled {
QToolButton:checked {
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 @ButtonBottomBackgroundColor, stop:0.7 @ButtonTopBackgroundColor, stop:1 @ButtonTopBackgroundColor);
border-radius: @InputFieldBorderRadius;
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QToolButton:checked:disabled {
background-color: @GeneralDisabledBackgroundColor;
- color: @UserHighlight1Color;
+ color: @AccentColor;
}
QToolButton:checked:hover {
background-color: @GeneralBackgroundHoverColor;
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QToolButton:checked:pressed {
@@ -1275,7 +1264,7 @@ QToolButton:checked:pressed {
QToolButton:checked:selected {
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 @ButtonBottomBackgroundColor, stop:0.7 @ButtonTopBackgroundColor,stop:1 @ButtonBottomBackgroundColor );
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QToolButton:hover {
@@ -1396,7 +1385,7 @@ QComboBox:hover {
}
QComboBox:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QComboBox:on {
@@ -1449,8 +1438,8 @@ QComboBox::down-arrow:on, QComboBox::down-arrow:hover, QComboBox::down-arrow:foc
Tasks panel (custom FreeCAD class)
==================================================================================================*/
Gui--PropertyEditor--PropertyEditor {
- qproperty-groupTextColor:@TextForegroundColor;
- qproperty-groupBackground: @GeneralAlternateBackgroundColor;
+ qproperty-groupTextColor: @TextForegroundColor;
+ qproperty-groupBackground: @GeneralHeaderBackgroundColor;
}
/* Action group */
@@ -1519,7 +1508,6 @@ QSint--ActionGroup QFrame[class="header"] QLabel[fold="true"]:hover {
QSint--ActionGroup QFrame[class="content"] {
background-color: @DialogBackgroundColor;/* Task Panel background color */
-
border-bottom: 1px solid @GeneralBorderColor;
border-left: 1px solid @GeneralBorderColor;
border-right: 1px solid @GeneralBorderColor;
@@ -1560,6 +1548,12 @@ QSint--ActionGroup QFrame[class="content"] QToolButton:checked {
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 @ButtonTopBackgroundColor, stop:1 @ButtonBottomBackgroundColor );
}
+/* hide the empty line between header and content */
+QSint--ActionGroup QFrame[class="separator"] {
+ min-height: 0;
+ max-height: 0;
+}
+
/* QToolButtons with a menu found in Sketcher task panel*/
QSint--ActionGroup QToolButton::menu-button {
border-left: 1px solid @GeneralBorderColor;
@@ -1586,7 +1580,7 @@ QSint--ActionGroup QFrame[class="content"] QToolButton:hover{
}
QSint--ActionGroup QFrame[class="content"] QToolButton:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QSint--ActionGroup QFrame[class="content"] QToolButton:disabled {
@@ -1606,8 +1600,7 @@ QSint--ActionGroup QFrame[class="content"] QToolButton:pressed {
}
QFrame[class="panel"] QPushButton {
-padding: 3px;
-min-width: 0px;
+ padding: 3px;
}
/* QSlider ----------------------------------------------------------------
@@ -1627,7 +1620,7 @@ QSlider::groove:horizontal {
}
QSlider::groove:vertical {
- background-color: @UserHighlight1Color;
+ background-color: @AccentColor;
border: 1px solid @GeneralBorderColor;
width: 4px;
@@ -1635,7 +1628,7 @@ QSlider::groove:vertical {
}
QSlider::add-page:vertical {
- background-color: @UserHighlight1Color;
+ background-color: @AccentColor;
border: 1px solid @GeneralBorderColor;
width: 4px;
@@ -1647,7 +1640,7 @@ QSlider::add-page:vertical :disabled {
}
QSlider::sub-page:horizontal {
- background-color: @UserHighlight1Color;
+ background-color: @AccentColor;
border: 1px solid @GeneralBorderColor;
height: 4px;
@@ -1659,7 +1652,7 @@ QSlider::sub-page:horizontal:disabled {
}
QSlider::handle:horizontal {
- background-color: @UserHighlight1Color;
+ background-color: @AccentColor;
border: 1px solid @GeneralBorderColor;
width: 10px;
height: 8px;
@@ -1673,12 +1666,12 @@ QSlider::handle:horizontal:hover {
}
QSlider::handle:horizontal:focus {
- background-color: @UserHighlight1Color;
- border: 1px solid @UserHighlight1Color;
+ background-color: @AccentColor;
+ border: 1px solid @AccentColor;
}
QSlider::handle:vertical {
- background-color: @UserHighlight1Color;
+ background-color: @AccentColor;
border: 1px solid @GeneralBorderColor;
width: 10px;
height: 8px;
@@ -1692,7 +1685,7 @@ QSlider::handle:vertical:hover {
}
QSlider::handle:vertical:focus {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
/* QLineEdit --------------------------------------------------------------
@@ -1700,7 +1693,7 @@ QSlider::handle:vertical:focus {
https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qlineedit
--------------------------------------------------------------------------- */
-QLineEdit {
+QLineEdit, QTextEdit {
background-color: @TextEditFieldBackgroundColor;
padding-top: 2px;
padding-bottom: 2px;
@@ -1711,20 +1704,16 @@ QLineEdit {
border-radius: @InputFieldBorderRadius;
}
-QLineEdit:disabled {
+QLineEdit:disabled, QTextEdit:disabled {
background-color: @GeneralDisabledBackgroundColor;
color @TextDisabledColor;
}
-QLineEdit:hover {
-
+QLineEdit:focus, QTextEdit:focus {
+ border: 1px solid @AccentColor;
}
-QLineEdit:focus {
- border: 2px solid @UserHighlight1Color;
-}
-
-QLineEdit:selected {
+QLineEdit:selected, QTextEdit:selected {
background-color: @GeneralBackgroundHoverColor;
}
@@ -1739,6 +1728,7 @@ QTabWidget {
}
QTabWidget:tab-bar {
+ background-color: transparent;
}
QTabWidget QWidget {}
@@ -1790,9 +1780,13 @@ QDockWidget QTabBar { /*tabbar in dockwidget */
qproperty-drawBase: 0;
}
+QTabBar#mdiAreaTabBar::tab:bottom:selected {
+ background-color: @3DViewBackgroundRefColor;
+ border-top: @3DViewBackgroundRefColor;
+}
+
QTabBar {
qproperty-drawBase: 1;/*tabbar for files. */
- background-color: @TabbarBackgroundColor;
}
QTabWidget::tab-bar {
@@ -1877,9 +1871,9 @@ QTabBar::tab:top, QDockWidget QTabBar::tab:top {
}
QTabBar::tab:top:selected, QDockWidget QTabBar::tab:top:selected {
- background-color: @3DViewBackgroundRefColor;
+ background-color: @GeneralBackgroundColor;
border-top: 1px solid @GeneralBorderColor;
- border-bottom: 1px solid @3DViewBackgroundRefColor;
+ border-bottom: 1px solid @GeneralBackgroundColor;
border-left: 1px solid @GeneralBorderColor;
border-right: 1px solid @GeneralBorderColor;
margin-top: 0px;
@@ -1908,9 +1902,9 @@ QTabBar::tab:bottom, QDockWidget QTabBar::tab:bottom {
}
QTabBar::tab:bottom:selected, QDockWidget QTabBar::tab:bottom:selected {
- background-color: @3DViewBackgroundRefColor;
+ background-color: @GeneralBackgroundColor;
border-bottom: 1px solid @GeneralBorderColor;
- border-top: 1px solid @3DViewBackgroundRefColor;
+ border-top: 1px solid @GeneralBackgroundColor;
border-left: 1px solid @GeneralBorderColor;
border-right: 1px solid @GeneralBorderColor;
margin-bottom: 0px;
@@ -1939,9 +1933,9 @@ QTabBar::tab:left, QDockWidget QTabBar::tab:left {
}
QTabBar::tab:left:selected, QDockWidget QTabBar::tab:left:selected {
- background-color: @3DViewBackgroundRefColor;
+ background-color: @GeneralBackgroundColor;
border-bottom: 1px solid @GeneralBorderColor;
- border-right: 1px solid @3DViewBackgroundRefColor;
+ border-right: 1px solid @GeneralBackgroundColor;
border-left: 1px solid @GeneralBorderColor;
border-top: 1px solid @GeneralBorderColor;
margin-left: 0px;
@@ -1969,9 +1963,9 @@ QTabBar::tab:right, QDockWidget QTabBar::tab:right {
}
QTabBar::tab:right:selected, QDockWidget QTabBar::tab:right:selected {
- background-color: @3DViewBackgroundRefColor;
+ background-color: @GeneralBackgroundColor;
border-bottom: 1px solid @GeneralBorderColor;
- border-left: 1px solid @3DViewBackgroundRefColor;
+ border-left: 1px solid @GeneralBackgroundColor;
border-left: 1px solid @GeneralBorderColor;
border-top: 1px solid @GeneralBorderColor;
margin-right: 0px;
@@ -2067,7 +2061,7 @@ QDockWidget::float-button {
}
QDockWidget::float-button:hover {
- /*background-color: @UserHighlight1Color;*/
+ /*background-color: @AccentColor;*/
image: url(qss:@IconsLocationFolderName/undock-blue.svg);
}
@@ -2083,39 +2077,6 @@ https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtableview
--------------------------------------------------------------------------- */
-QTreeView {
- qproperty-indentation: 10;
- selection-background-color: transparent;
-}
-
-QTreeView::branch {
- background-color: transparent;
-}
-
-QTreeView::branch:has-siblings:!adjoins-item {}
-
-QTreeView::branch:has-siblings:adjoins-item {}
-QTreeView::branch:!has-children:!has-siblings:adjoins-item {}
-QTreeView::branch:closed:has-children:has-siblings {
- border-image: none;
- image: url(qss:@IconsLocationFolderName/arrow-right-@StylesheetIconsColor.svg);
-}
-
-QTreeView::branch:has-children:!has-siblings:closed {
- border-image: none;
- image: url(qss:@IconsLocationFolderName/arrow-right-@StylesheetIconsColor.svg);
-}
-
-QTreeView::branch:open:has-children:has-siblings {
- border-image: none;
- image: url(qss:@IconsLocationFolderName/arrow-down-@StylesheetIconsColor.svg);
-}
-
-QTreeView::branch:open:has-children:!has-siblings {
- border-image: none;
- image: url(qss:@IconsLocationFolderName/arrow-down-@StylesheetIconsColor.svg);
-}
-
QTreeView::indicator,
QListView::indicator,
QTableView::indicator,
@@ -2202,17 +2163,23 @@ QTableView,
QColumnView {
background-color: @PrimaryColor;/* background of a lot of stuff including spreadsheets.*/
/* gridline-color: @GeneralBorderColor; */
+ show-decoration-selected: 1;
alternate-background-color: @GeneralAlternateBackgroundColor;
- selection-background-color: @UserHighlight1Color;
-
+ selection-background-color: @AccentBackgroundColor;
}
QListView {
background-color: @PrimaryColor;
border: 1px solid @GeneralBorderColor;
+ show-decoration-selected: 1;
alternate-background-color: @GeneralAlternateBackgroundColor;
- selection-background-color: @UserHighlight1Color;
+ selection-background-color: @AccentBackgroundColor;
+}
+QTreeView {
+ show-decoration-selected: 1;
+ selection-background-color: @AccentBackgroundColor;
+ qproperty-indentation: 10;
}
QTreeView:disabled,
@@ -2241,33 +2208,24 @@ QColumnView::item:pressed {
background-color: @GeneralBackgroundHoverColor;
}
-QListView::item:selected:active,
-QTableView::item:selected:active,
-QColumnView::item:selected:active {
- background-color: @UserHighlight1Color;
-}
-
-QListView::item:selected:!active,
-QTableView::item:selected:!active,
-QColumnView::item:selected:!active {
- background-color: @GeneralBackgroundHoverColor;
+QListView::item:selected,
+QTableView::item:selected,
+QTreeView::item:selected,
+QColumnView::item:selected {
+ background-color: @AccentBackgroundColor;
}
/* QTreeView::item:!selected:hover, */
QListView::item:!selected:hover,
QTableView::item:!selected:hover,
QColumnView::item:!selected:hover {
- background-color: @GeneralBackgroundHoverColor;
-}
-
-QTreeView::item:selected:!active{
- background-color: @GeneralBackgroundHoverColor;
+ background-color: @AccentHoverColor;
}
QTreeView::item:!selected:hover{
outline: 0;
color:@TextForegroundColor;
- background-color: @GeneralBackgroundHoverColor;
+ background-color: @AccentHoverColor;
}
/* QTreeView::item, */
@@ -2370,8 +2328,7 @@ QToolBox {
}
QToolBox:selected {
-
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QToolBox::tab {
@@ -2500,11 +2457,11 @@ QDateEdit QAbstractItemView, QDateTimeEdit QAbstractItemView {
--------------------------------------------------------------------------- */
QAbstractView:hover {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QAbstractView:selected {
- background-color: @UserHighlight1Color;
+ background-color: @AccentColor;
}
/* PlotWidget -------------------------------------------------------------
@@ -2605,36 +2562,7 @@ QMdiSubWindow:hover {
}
QMdiSubWindow:active {
- border:2px solid @UserHighlight1Color;
-}
-
-/*==================================================================================================
-Settings menu #groupsTreeView:
-==================================================================================================*/
-
-QTreeView::branch#groupsTreeView:closed:has-children:has-siblings {
- border-image: none;
- image: url(qss:@IconsLocationFolderName/arrow-right-@StylesheetIconsColor.svg);
-}
-
-QTreeView::branch#groupsTreeView:open:has-children:has-siblings {
- border-image: none;
- image: url(qss:@IconsLocationFolderName/arrow-down-@StylesheetIconsColor.svg);
-}
-
-QTreeView::branch#groupsTreeView:open:has-children:!has-siblings {
-
- border-image: none;
- image: url(qss:@IconsLocationFolderName/arrow-down-@StylesheetIconsColor.svg);
-}
-
-QTreeView::branch#groupsTreeView:has-children:!has-siblings:closed {
- border-image: none;
- image: url(qss:@IconsLocationFolderName/arrow-right-@StylesheetIconsColor.svg);
-}
-
-QTreeView::branch#groupsTreeView:has-siblings:!adjoins-item {
- border-image: none;
+ border:2px solid @AccentColor;
}
/*==================================================================================================
@@ -2647,11 +2575,11 @@ QWidget#thumbnailWidget {
}
QWidget#thumbnailWidget[state="hovered"] {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
QWidget#thumbnailWidget[state="pressed"] {
- border: 1px solid @UserHighlight1Color;
+ border: 1px solid @AccentColor;
}
/**
@@ -2672,14 +2600,13 @@ QGroupBox[objectName="matOpsGrpBox"] QPushButton {
QToolBar > Gui--WorkbenchComboBox QAbstractItemView {
min-width: 180px;
margin-left: 30px;
- }
+}
/* Below is a fix for indentation in properties*/
QTreeView::item#groupsTreeView {
- margin-left:-8px;
- /* background-color: @UserHighlight1Color; */
+ /* background-color: @AccentColor; */
}
QMainWindow QTableView {
@@ -2693,11 +2620,9 @@ QMainWindow QListView {
/* border-radius: 3px; */}
QTableView QPushButton {
- min-width: 0px;
padding: 2px;
}
QTableView QPushButton:hover {
- min-width: 0px;
background-color: @GeneralBackgroundHoverColor;
border: 1px solid @GeneralBorderColor;
}