iterating over all fonts

This commit is contained in:
Uwe Rathmann 2018-01-06 17:57:33 +01:00
parent 440ad62631
commit 6c82f1a783

View File

@ -150,9 +150,12 @@ void SkinnyShortcut::changeFonts( int increment )
{
auto skin = qskSetup->skin();
for ( int role = 0; role <= QskSkin::HugeFont; role++ )
const auto fonts = skin->fonts();
for ( auto it = fonts.begin(); it != fonts.end(); ++it )
{
auto font = skin->font( role );
auto role = it->first;
auto font = it->second;
if ( font.pixelSize() > 0 )
{
@ -162,9 +165,9 @@ void SkinnyShortcut::changeFonts( int increment )
}
else
{
const auto newSize = font.pointSize() + increment;
const auto newSize = font.pointSizeF() + increment;
if ( newSize > 0 )
font.setPointSize( font.pointSize() + increment );
font.setPointSizeF( font.pointSizeF() + increment );
}
skin->setFont( role, font );