From 18693e2c2b0ead8546cc5aaf96a56da93b6e7c75 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 3 Mar 2008 17:00:06 +0000 Subject: [PATCH] Add UI control to turn anti-aliasing on or off. 'Smooth fonts' checkbox added to Appearence tab of profile editor. svn path=/trunk/KDE/kdebase/apps/konsole/; revision=781732 --- src/EditProfileDialog.cpp | 10 ++++ src/EditProfileDialog.h | 1 + src/EditProfileDialog.ui | 113 +++++++++++++++++++++++++------------- 3 files changed, 86 insertions(+), 38 deletions(-) diff --git a/src/EditProfileDialog.cpp b/src/EditProfileDialog.cpp index 1e2d93ba..39437ae6 100644 --- a/src/EditProfileDialog.cpp +++ b/src/EditProfileDialog.cpp @@ -420,6 +420,16 @@ void EditProfileDialog::setupAppearancePage(const Profile* info) SLOT(setFontSize(int)) ); connect( _ui->editFontButton , SIGNAL(clicked()) , this , SLOT(showFontDialog()) ); + + // setup font smoothing + _ui->antialiasTextButton->setChecked(info->property(Profile::AntiAliasFonts)); + connect( _ui->antialiasTextButton , SIGNAL(toggled(bool)) , this , + SLOT(setAntialiasText(bool)) ); +} +void EditProfileDialog::setAntialiasText(bool enable) +{ + _tempProfile->setProperty(Profile::AntiAliasFonts,enable); + preview(Profile::AntiAliasFonts,enable); } void EditProfileDialog::colorSchemeAnimationUpdate() { diff --git a/src/EditProfileDialog.h b/src/EditProfileDialog.h index 1732d0fc..0990ed5a 100644 --- a/src/EditProfileDialog.h +++ b/src/EditProfileDialog.h @@ -122,6 +122,7 @@ private slots: // appearance page void setFontSize(int pointSize); + void setAntialiasText(bool enable); void showFontDialog(); void newColorScheme(); void editColorScheme(); diff --git a/src/EditProfileDialog.ui b/src/EditProfileDialog.ui index cca2f4b9..cabea2be 100644 --- a/src/EditProfileDialog.ui +++ b/src/EditProfileDialog.ui @@ -6,20 +6,11 @@ 0 0 441 - 485 + 499 - - 0 - - - 0 - - - 0 - - + 0 @@ -34,9 +25,17 @@ 0 - false + true + + + 0 + 0 + 437 + 472 + + General @@ -160,7 +159,7 @@ Qt::Horizontal - + 20 20 @@ -224,7 +223,7 @@ Qt::Vertical - + 20 20 @@ -235,6 +234,14 @@ + + + 0 + 0 + 437 + 472 + + Tabs @@ -359,7 +366,7 @@ Qt::Vertical - + 20 10 @@ -370,6 +377,14 @@ + + + 0 + 0 + 437 + 472 + + Appearance @@ -431,7 +446,7 @@ Qt::Vertical - + 20 20 @@ -445,25 +460,16 @@ false - * { background-color: #FFCCCC ; border-radius: 3px } + * { background-color: #FFCCCC ; border-radius: 3px } - - 4 - - - 4 - - - 4 - - + 4 - + TextLabel @@ -576,12 +582,27 @@ + + + + Smooth fonts + + + + + + 0 + 0 + 437 + 472 + + Scrolling @@ -647,7 +668,7 @@ Qt::Horizontal - + 20 20 @@ -741,7 +762,7 @@ Qt::Vertical - + 20 20 @@ -752,6 +773,14 @@ + + + 0 + 0 + 437 + 472 + + Input @@ -820,7 +849,7 @@ Qt::Vertical - + 20 20 @@ -834,6 +863,14 @@ + + + 0 + 0 + 437 + 472 + + Advanced @@ -1088,7 +1125,7 @@ Qt::Vertical - + 20 20 @@ -1103,15 +1140,15 @@ - - KLineEdit - QLineEdit -
klineedit.h
-
KColorButton QPushButton -
kcolorbutton.h
+
kcolorbutton.h
+
+ + KLineEdit + QLineEdit +
klineedit.h