Commit cb4304f8 authored by Carsten Pfeiffer's avatar Carsten Pfeiffer
Browse files

here's some code to disable AA when --noxft is given, but it doesn't work

because QFont::StyleStrategy apparently only works on Windows. Sigh.

svn path=/trunk/kdebase/konsole/; revision=122952
parent 2bbb8226
......@@ -89,6 +89,9 @@
#define yMouseScroll 1
// scroll increment used when dragging selection at top/bottom of window.
// static
bool TEWidget::s_antialias = true;
/* ------------------------------------------------------------------------- */
/* */
/* Colors */
......@@ -250,8 +253,11 @@ void TEWidget::fontChange(const QFont &)
void TEWidget::setVTFont(const QFont& f)
{
QFrame::setFont(f);
fontChange(f);
QFont font = f;
if (!s_antialias)
font.setStyleStrategy( QFont::NoAntialias );
QFrame::setFont(font);
fontChange(font);
}
void TEWidget::setFont(const QFont &)
......
......@@ -84,6 +84,8 @@ public:
void setVTFont(const QFont &);
void setMouseMarks(bool on);
static void setAntialias( bool enable ) { s_antialias = enable; }
static bool antialias() { return s_antialias; }
// current session in this widget
TESession *currentSession;
......@@ -197,6 +199,8 @@ private:
QString dropText;
bool possibleTripleClick; // is set in mouseDoubleClickEvent and deleted
// after QApplication::doubleClickInterval() delay
static bool s_antialias; // do we antialias or not
QFrame *mResizeWidget;
QLabel *mResizeLabel;
......
......@@ -187,11 +187,9 @@ int main(int argc, char* argv[])
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
//1.53 sec
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if (!args->isSet("xft"))
{
putenv(qstrdup("QT_XFT=0"));
has_noxft = true;
}
has_noxft = !args->isSet("xft");
TEWidget::setAntialias( !has_noxft );
KApplication a;
KImageIO::registerFormats(); // add io for additional image formats
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment