Start adding a configuration to toggle anti-aliasing for both text and graphics.

Let the Document propagate these settings to the backends, if they query for them.

svn path=/trunk/KDE/kdegraphics/okular/; revision=757647
remotes/origin/KDE/4.1
Pino Toscano 18 years ago
parent 7e35a9c0cf
commit f238c3d95d
  1. 14
      conf/okular.kcfg
  2. 29
      core/document.cpp

@ -67,6 +67,20 @@
<entry key="EnableThreading" type="Bool" > <entry key="EnableThreading" type="Bool" >
<default>true</default> <default>true</default>
</entry> </entry>
<entry key="TextAntialias" type="Enum" >
<default>Enabled</default>
<choices>
<choice name="Enabled" />
<choice name="Disabled" />
</choices>
</entry>
<entry key="GraphicsAntialias" type="Enum" >
<default>Enabled</default>
<choices>
<choice name="Enabled" />
<choice name="Disabled" />
</choices>
</entry>
</group> </group>
<group name="Dlg Presentation" > <group name="Dlg Presentation" >
<entry key="SlidesAdvance" type="Bool" > <entry key="SlidesAdvance" type="Bool" >

@ -1017,14 +1017,33 @@ QVariant DocumentPrivate::documentMetaData( const QString &key, const QVariant &
} }
else if ( key == QLatin1String( "TextAntialias" ) ) else if ( key == QLatin1String( "TextAntialias" ) )
{ {
// TODO: add a configuration switch ( Settings::textAntialias() )
// TODO: eventually read the KDE configuration {
return true; case Settings::EnumTextAntialias::Enabled:
return true;
break;
#if 0
case Settings::EnumTextAntialias::UseKDESettings:
// TODO: read the KDE configuration
return true;
break;
#endif
case Settings::EnumTextAntialias::Disabled:
return false;
break;
}
} }
else if ( key == QLatin1String( "GraphicsAntialias" ) ) else if ( key == QLatin1String( "GraphicsAntialias" ) )
{ {
// TODO: add a configuration switch ( Settings::graphicsAntialias() )
return true; {
case Settings::EnumGraphicsAntialias::Enabled:
return true;
break;
case Settings::EnumGraphicsAntialias::Disabled:
return false;
break;
}
} }
return QVariant(); return QVariant();
} }

Loading…
Cancel
Save