Commit 4cf299a0 authored by Robert Knight's avatar Robert Knight
Browse files

More useful text for font preview, includes the font family and point size.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=676001
parent 80d35c03
......@@ -325,7 +325,7 @@ void EditProfileDialog::setupAppearancePage(const Profile* info)
// setup font preview
const QFont& font = info->font();
_ui->fontPreviewLabel->setFont( font );
updateFontPreviewLabel(font);
_ui->fontSizeSlider->setValue( font.pointSize() );
connect( _ui->fontSizeSlider , SIGNAL(valueChanged(int)) , this ,
......@@ -333,6 +333,11 @@ void EditProfileDialog::setupAppearancePage(const Profile* info)
connect( _ui->editFontButton , SIGNAL(clicked()) , this ,
SLOT(showFontDialog()) );
}
void EditProfileDialog::updateFontPreviewLabel(const QFont& font)
{
_ui->fontPreviewLabel->setFont(font);
_ui->fontPreviewLabel->setText(i18n("%1, size %2",font.family(),font.pointSize()));
}
void EditProfileDialog::updateColorSchemeList()
{
delete _ui->colorSchemeList->model();
......@@ -867,7 +872,7 @@ void EditProfileDialog::setFontSize(int pointSize)
{
QFont newFont = _ui->fontPreviewLabel->font();
newFont.setPointSize(pointSize);
_ui->fontPreviewLabel->setFont( newFont );
updateFontPreviewLabel(newFont);
_tempProfile->setProperty(Profile::Font,newFont);
......
......@@ -161,6 +161,7 @@ private:
void updateColorSchemeList();
void updateKeyBindingsList();
void updateFontPreviewLabel(const QFont& font);
void showColorSchemeEditor(bool newScheme);
void showKeyBindingEditor(bool newTranslator);
......
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