From 27f79c7c0e7e8687cd5efbe1c4111a1d766c4468 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Sat, 4 Mar 2023 11:35:36 +0100 Subject: [PATCH] using black as default color in SVGs, so that color filtering does not break when changing skins --- examples/gallery/icons/airport_shuttle.svg | 2 +- examples/gallery/icons/flight.svg | 2 +- examples/gallery/icons/local_pizza.svg | 2 +- examples/gallery/icons/plus.svg | 2 +- .../gallery/icons/qvg/airport_shuttle.qvg | Bin 3115 -> 3115 bytes examples/gallery/icons/qvg/flight.qvg | Bin 1015 -> 1015 bytes examples/gallery/icons/qvg/local_pizza.qvg | Bin 2035 -> 2035 bytes examples/gallery/icons/qvg/plus.qvg | Bin 695 -> 695 bytes examples/gallery/icons/qvg/sports_soccer.qvg | Bin 2855 -> 2855 bytes examples/gallery/icons/sports_soccer.svg | 2 +- skins/material3/QskMaterial3Skin.cpp | 2 +- skins/material3/icons/check_small.svg | 2 +- .../icons/combo-box-arrow-closed.svg | 2 +- .../material3/icons/combo-box-arrow-open.svg | 2 +- skins/material3/icons/qvg/check_small.qvg | Bin 575 -> 575 bytes .../icons/qvg/combo-box-arrow-closed.qvg | Bin 515 -> 515 bytes .../icons/qvg/combo-box-arrow-open.qvg | Bin 659 -> 659 bytes .../icons/qvg/segmented-button-check.qvg | Bin 575 -> 575 bytes .../icons/segmented-button-check.svg | 2 +- skins/squiek/QskSquiekSkin.cpp | 19 +++++++++++++----- 20 files changed, 24 insertions(+), 15 deletions(-) diff --git a/examples/gallery/icons/airport_shuttle.svg b/examples/gallery/icons/airport_shuttle.svg index 77c8c91c..2bb059f5 100644 --- a/examples/gallery/icons/airport_shuttle.svg +++ b/examples/gallery/icons/airport_shuttle.svg @@ -1,4 +1,4 @@ - + diff --git a/examples/gallery/icons/flight.svg b/examples/gallery/icons/flight.svg index e58b8009..dc1051bb 100644 --- a/examples/gallery/icons/flight.svg +++ b/examples/gallery/icons/flight.svg @@ -1,4 +1,4 @@ - + diff --git a/examples/gallery/icons/local_pizza.svg b/examples/gallery/icons/local_pizza.svg index 64f80fc5..3a6569dd 100644 --- a/examples/gallery/icons/local_pizza.svg +++ b/examples/gallery/icons/local_pizza.svg @@ -1,4 +1,4 @@ - + diff --git a/examples/gallery/icons/plus.svg b/examples/gallery/icons/plus.svg index ac5859d3..6a19322e 100644 --- a/examples/gallery/icons/plus.svg +++ b/examples/gallery/icons/plus.svg @@ -1,4 +1,4 @@ - + diff --git a/examples/gallery/icons/qvg/airport_shuttle.qvg b/examples/gallery/icons/qvg/airport_shuttle.qvg index b52ec83055db888b4fbdd6ebe152eb3a6af7dcb7..fe2cb6603ab1d0be47cd83a5bf39850aa24945d3 100644 GIT binary patch delta 25 hcmZ22v07q6-9*vQjhFv(F)=Vq&gKqgVPIfj0swr}2Y~

w-UBLE4=59|N{ diff --git a/examples/gallery/icons/qvg/local_pizza.qvg b/examples/gallery/icons/qvg/local_pizza.qvg index 61967c8f306586d8a2917734020b2b593230d9f5..84289057f094f6fbe0566b6926c084e04093f596 100644 GIT binary patch delta 19 bcmey&|CxV6-9*vQjhBzJF)~b^%^m>&SkVXV delta 33 jcmey&|CxV69XBH*<9{fasNl8n@^LmMMuv$EVT?=wD9#Vk diff --git a/examples/gallery/icons/qvg/plus.qvg b/examples/gallery/icons/qvg/plus.qvg index 6d3d6d426add2d7d0d923486a45e3aadd1fc2570..ce9688d90dfc6aafbe71d9580c5350b4ee1cadd4 100644 GIT binary patch delta 19 bcmdnax}9}G-9*vQjhDL_85t(WGerOZOiTvf delta 31 gcmdnax}9}G9XBH*<9{fasNl8nayL+5ay(N60QYwZoA^`lZ57+ - + diff --git a/skins/material3/QskMaterial3Skin.cpp b/skins/material3/QskMaterial3Skin.cpp index a944d31c..646a36f6 100644 --- a/skins/material3/QskMaterial3Skin.cpp +++ b/skins/material3/QskMaterial3Skin.cpp @@ -1408,7 +1408,7 @@ void QskMaterial3Skin::setGraphicColor( GraphicRole role, QRgb rgb ) { QskColorFilter colorFilter; colorFilter.setMask( QskRgb::RGBAMask ); - colorFilter.addColorSubstitution( QskRgb::White, rgb ); + colorFilter.addColorSubstitution( QskRgb::Black, rgb ); setGraphicFilter( role, colorFilter ); } diff --git a/skins/material3/icons/check_small.svg b/skins/material3/icons/check_small.svg index 3fce0e84..e7a84071 100644 --- a/skins/material3/icons/check_small.svg +++ b/skins/material3/icons/check_small.svg @@ -1,4 +1,4 @@ - + diff --git a/skins/material3/icons/combo-box-arrow-closed.svg b/skins/material3/icons/combo-box-arrow-closed.svg index 2937c960..c288b426 100644 --- a/skins/material3/icons/combo-box-arrow-closed.svg +++ b/skins/material3/icons/combo-box-arrow-closed.svg @@ -1,4 +1,4 @@ - + diff --git a/skins/material3/icons/combo-box-arrow-open.svg b/skins/material3/icons/combo-box-arrow-open.svg index fbc7b469..4138c2cd 100644 --- a/skins/material3/icons/combo-box-arrow-open.svg +++ b/skins/material3/icons/combo-box-arrow-open.svg @@ -1,4 +1,4 @@ - + diff --git a/skins/material3/icons/qvg/check_small.qvg b/skins/material3/icons/qvg/check_small.qvg index 19ae690137b1bde5048393548b4ed0e19ffa5932..ea738b8639303983a6c47ec95103ead792067a09 100644 GIT binary patch delta 25 hcmdnbvY%x_-9*vQjhBTPnHU%**E0sQFfcGM0RV6L29^K- delta 34 kcmdnbvY%x_9XBH*<9{fa{E^Xj<23X=a&FH&HZn;^pg%43k$gMgRaof(GjV delta 32 icmZo>X=a&F$IZyd_#X-;DtJx2e4UArVPZoVBNG7orVhpc diff --git a/skins/material3/icons/qvg/combo-box-arrow-open.qvg b/skins/material3/icons/qvg/combo-box-arrow-open.qvg index 88e44ca4f1d73b7ab45af4ff7629daec06a19467..6ddcf6c00d3f7e4ae3978638ecbf65d960462dd9 100644 GIT binary patch delta 29 lcmbQtI+=As-9*vQjhE#a*%=rZ|Nm!TnC!^pH`$%Z2LO|W2`~Tv delta 35 lcmbQtI+=As9XBH*<9{fasNl8nvOFUbBg4do;K}YxJ^&}54|4zj diff --git a/skins/material3/icons/qvg/segmented-button-check.qvg b/skins/material3/icons/qvg/segmented-button-check.qvg index b9c74eeae843200968827122c087c09c85fc9df7..fa0e1ce2b2e02e7cf03098703b1b56b2f3e179c4 100644 GIT binary patch delta 25 hcmdnbvY%x_-9*vQjhBTPnHU%**E0sQFfcGM0RV6L29^K- delta 34 kcmdnbvY%x_9XBH*<9{fa{E^Xj<23 - + diff --git a/skins/squiek/QskSquiekSkin.cpp b/skins/squiek/QskSquiekSkin.cpp index 64806af2..8c92d590 100644 --- a/skins/squiek/QskSquiekSkin.cpp +++ b/skins/squiek/QskSquiekSkin.cpp @@ -181,7 +181,8 @@ namespace enum ColorRole { - DisabledColor = 1 + DisabledSymbol = 1, + CursorSymbol }; } @@ -383,6 +384,10 @@ void Editor::setupMenu() setColor( Q::Text | Q::Selected, m_pal.highlightedText ); setFontRole( Q::Text, QskSkin::SmallFont ); + setStrutSize( Q::Graphic, 16, 16 ); + setGraphicRole( Q::Graphic | Q::Disabled, DisabledSymbol ); + setGraphicRole( Q::Graphic | Q::Selected, CursorSymbol ); + setPosition( Q::Panel, 0 ); setPosition( Q::Panel | QskPopup::Closed, 1 ); @@ -559,8 +564,9 @@ void Editor::setupSegmentedBar() { // Graphic + setGraphicRole( Q::Graphic | Q::Disabled, DisabledSymbol ); + setGraphicRole( Q::Graphic | Q::Selected, CursorSymbol ); #if 0 - setGraphicRole( Q::Graphic, ... ); setStrutSize( Q::Graphic, ... ); #endif } @@ -1074,7 +1080,7 @@ void Editor::setupSpinBox() for ( auto subControl : { Q::UpIndicator, Q::DownIndicator } ) { - setGraphicRole( subControl | Q::Disabled, DisabledColor ); + setGraphicRole( subControl | Q::Disabled, DisabledSymbol ); setAlignment( subControl, Qt::AlignCenter ); setAnimation( subControl | A::Color, 100 ); @@ -1137,9 +1143,12 @@ QskSquiekSkin::QskSquiekSkin( QObject* parent ) { setupFonts( QStringLiteral( "DejaVuSans" ) ); - addGraphicRole( DisabledColor, m_data->palette.lighter150 ); + const auto& pal = m_data->palette; - Editor editor( &hintTable(), m_data->palette ); + addGraphicRole( DisabledSymbol, pal.lighter150 ); + addGraphicRole( CursorSymbol, pal.highlightedText ); + + Editor editor( &hintTable(), pal ); editor.setup(); }