diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
index 7d021744..126abdde 100644
--- a/.github/workflows/cmake.yml
+++ b/.github/workflows/cmake.yml
@@ -175,7 +175,7 @@ jobs:
}
- {
name: "macOS Latest Clang Qt5",
- os: macos-latest,
+ os: macos-13,
artifact: "macos_clang.7z",
build_type: "Release",
cc: "clang",
@@ -277,7 +277,8 @@ jobs:
- name: Install dependencies on macos
if: startsWith(matrix.config.os, 'macos')
run: |
- brew install p7zip cmake ninja
+ find /opt/homebrew/ -name EXTERNALLY-MANAGED|xargs rm
+ brew install cmake ninja
ninja --version
cmake --version
@@ -322,7 +323,7 @@ jobs:
- name: Install Qt5
if: endsWith(matrix.config.name, 'Qt5')
- uses: jurplel/install-qt-action@v3
+ uses: jurplel/install-qt-action@v4
with:
version: "5.15.2"
target: "desktop"
@@ -336,7 +337,7 @@ jobs:
- name: Install Qt6
if: endsWith(matrix.config.name, 'Qt6')
- uses: jurplel/install-qt-action@v3
+ uses: jurplel/install-qt-action@v4
with:
version: "6.5.0"
target: "desktop"
diff --git a/LICENSES b/LICENSES
index af85ab72..6c7da6d7 100644
--- a/LICENSES
+++ b/LICENSES
@@ -19,3 +19,13 @@ b) Cassowary constraint solving algorithm
Code: https://github.com/nucleic/kiwi
SPDX-License-Identifier: BSD 3-Clause "New" or "Revised" License
Copyright (c) 2013, Nucleic Development Team
+
+c) Material3 Icons
+
+ Code: https://github.com/marella/material-design-icons
+ SPDX-License-Identifier: Apache License 2.0
+
+d) Fluent2 Icons
+
+ Code: https://github.com/microsoft/fluentui-system-icons
+ SPDX-License-Identifier: MIT License
diff --git a/designsystems/fluent2/CMakeLists.txt b/designsystems/fluent2/CMakeLists.txt
index 2441647f..4fb73177 100644
--- a/designsystems/fluent2/CMakeLists.txt
+++ b/designsystems/fluent2/CMakeLists.txt
@@ -9,7 +9,7 @@ set(SOURCES
QskFluent2Skin.h QskFluent2Skin.cpp
QskFluent2SkinFactory.h QskFluent2SkinFactory.cpp
)
-qt_add_resources(SOURCES icons.qrc)
+qt_add_resources(SOURCES QskFluent2Icons.qrc)
qsk_add_plugin(fluent2skin skins QskFluent2SkinFactory ${SOURCES})
set_target_properties(fluent2skin PROPERTIES DEFINE_SYMBOL QSK_FLUENT2_MAKEDLL )
diff --git a/designsystems/fluent2/QskFluent2Icons.qrc b/designsystems/fluent2/QskFluent2Icons.qrc
new file mode 100644
index 00000000..7587fb4c
--- /dev/null
+++ b/designsystems/fluent2/QskFluent2Icons.qrc
@@ -0,0 +1,7 @@
+
+
+ icons/qvg/checkmark.qvg
+ icons/qvg/chevron_down.qvg
+ icons/qvg/chevron_up.qvg
+
+
diff --git a/designsystems/fluent2/QskFluent2Skin.cpp b/designsystems/fluent2/QskFluent2Skin.cpp
index d52c10c0..3ccb3bc2 100644
--- a/designsystems/fluent2/QskFluent2Skin.cpp
+++ b/designsystems/fluent2/QskFluent2Skin.cpp
@@ -103,6 +103,13 @@
#include
#include
+static void qskFluent2InitResources()
+{
+ Q_INIT_RESOURCE( QskFluent2Icons );
+}
+
+Q_CONSTRUCTOR_FUNCTION( qskFluent2InitResources )
+
namespace Fluent2
{
using F = QskFontRole;
@@ -412,7 +419,6 @@ void Editor::setupCheckBoxMetrics()
setStrutSize( Q::Box, { 20_px, 20_px } ); // 18 + 2*1 border
setBoxShape( Q::Box, 4_px ); // adapt to us taking the border into account
setBoxBorderMetrics( Q::Box, 1_px );
- setPadding( Q::Box, 5_px ); // "icon size"
setFontRole( Q::Text, Fluent2::Body );
}
@@ -541,9 +547,9 @@ void Editor::setupComboBoxMetrics()
setAlignment( Q::Text, Qt::AlignLeft | Qt::AlignVCenter );
setFontRole( Q::Text, Fluent2::Body );
- setStrutSize( Q::StatusIndicator, 12_px, 12_px );
- setSymbol( Q::StatusIndicator, symbol( "spin-box-arrow-down" ) );
- setSymbol( Q::StatusIndicator | Q::PopupOpen, symbol( "spin-box-arrow-up" ) );
+ setStrutSize( Q::StatusIndicator, 16_px, 16_px );
+ setSymbol( Q::StatusIndicator, symbol( "chevron_down" ) );
+ // setSymbol( Q::StatusIndicator | Q::PopupOpen, symbol( "chevron_up" ) );
// Using Focused (Pressed doesn't exist yet):
setBoxBorderMetrics( Q::Panel | Q::Focused, { 1_px, 1_px, 1_px, 2_px } );
@@ -1497,28 +1503,38 @@ void Editor::setupSpinBoxMetrics()
{
using Q = QskSpinBox;
+ /*
+ The F2 NumberBox has 2 modes for the Up/Down panels ( a.k.a Spinner ):
+
+ - compact ( -> QskSpinBox::UpDownControl )
+ - inline ( -> QskSpinBox::ButtonsRight )
+
+ TODO: in compact mode the panels/indicators are blown up, when being hovered
+ */
setHint( Q::Panel | QskAspect::Style, Q::ButtonsRight );
+
setStrutSize( Q::Panel, { -1, 32_px } );
setBoxBorderMetrics( Q::Panel, 1_px );
setBoxShape( Q::Panel, 3_px );
- setPadding( Q::Panel, { 11_px, 0, 11_px, 0 } );
- setAlignment( Q::Text, Qt::AlignLeft );
+ setAlignment( Q::Text, Qt::AlignLeft | Qt::AlignVCenter );
setFontRole( Q::Text, Fluent2::Body );
- setPadding( Q::TextPanel, { 11_px, 5_px, 0, 0 } );
+ setPadding( Q::TextPanel, { 11_px, 0, 11_px, 0 } );
- setStrutSize( Q::UpPanel, 32_px, 20_px );
- setPadding( Q::UpPanel, { 11_px, 7_px, 11_px, 7_px } );
+ for ( auto panel : { Q::UpPanel, Q::DownPanel } )
+ setStrutSize( panel, 32_px, 18_px );
- setStrutSize( Q::DownPanel, 34_px, 20_px );
- setPadding( Q::DownPanel, { 11_px, 7_px, 13_px, 7_px } );
+ setSymbol( Q::UpIndicator, symbol( "chevron_up" ) );
+ setSymbol( Q::DownIndicator, symbol( "chevron_down" ) );
- setSymbol( Q::UpIndicator, symbol( "spin-box-arrow-up" ) );
- setSymbol( Q::DownIndicator, symbol( "spin-box-arrow-down" ) );
+ setPadding( Q::UpPanel, { 0, 1_px, 0, 0 } );
+ setPadding( Q::DownPanel, { 0, 0, 0, 1_px } );
- // Focused (Pressed doesn't exist yet):
- setBoxBorderMetrics( Q::Panel | Q::Focused, { 1_px, 1_px, 1_px, 2_px } );
+#if 0
+ // QskSpinBox::Pressed is missing yet
+ setBoxBorderMetrics( Q::Panel | Q::Pressed, { 1_px, 1_px, 1_px, 2_px } );
+#endif
}
void Editor::setupSpinBoxColors(
@@ -1581,8 +1597,17 @@ void Editor::setupSpinBoxColors(
panelColor = rgbSolid( panelColor, pal.background.solid.base );
setGradient( panel, panelColor );
+
setBoxBorderGradient( panel, borderColor1, borderColor2, panelColor );
+ if ( state == Q::Focused )
+ {
+ const auto colors = boxBorderColors( panel );
+
+ setBoxBorderColors( panel | Q::Decreasing, colors );
+ setBoxBorderColors( panel | Q::Increasing, colors );
+ }
+
setColor( text, textColor );
setGraphicRole( upIndicator, graphicRole );
diff --git a/designsystems/fluent2/icons.qrc b/designsystems/fluent2/icons.qrc
deleted file mode 100644
index 4e322fd8..00000000
--- a/designsystems/fluent2/icons.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- icons/qvg/checkmark.qvg
- icons/qvg/combo-box-arrow-closed.qvg
- icons/qvg/combo-box-arrow-open.qvg
- icons/qvg/segmented-button-check.qvg
- icons/qvg/spin-box-arrow-down.qvg
- icons/qvg/spin-box-arrow-up.qvg
-
-
diff --git a/designsystems/fluent2/icons/README b/designsystems/fluent2/icons/README
new file mode 100644
index 00000000..a45cea97
--- /dev/null
+++ b/designsystems/fluent2/icons/README
@@ -0,0 +1,10 @@
+SVGs have been taken from https://github.com/microsoft/fluentui-system-icons/tree/main/assets.
+
+Icons are available in different sizes. As SVGs can be scaled we only need
+one version of them - chosing the '12'.
+
+As we are replacing the colors of the SVGs using graphic filters we set the
+color in the SVGs manually to black ( instead of #212121 ). So they are in
+line with icons coming from somewhere else.
+
+Names have been shortened ( ic_fluent_xyz_16_regular.svg -> xyz.svg )
diff --git a/designsystems/fluent2/icons/checkmark.svg b/designsystems/fluent2/icons/checkmark.svg
index 70b15e35..f87de9aa 100644
--- a/designsystems/fluent2/icons/checkmark.svg
+++ b/designsystems/fluent2/icons/checkmark.svg
@@ -1,4 +1,3 @@
-