Changeset View
Changeset View
Standalone View
Standalone View
kcms/fonts/fonts.cpp
Show First 20 Lines • Show All 647 Lines • ▼ Show 20 Line(s) | 647 | #if defined(HAVE_FONTCONFIG) && defined (HAVE_X11) | |||
---|---|---|---|---|---|
648 | QLabel *label = 0L; | 648 | QLabel *label = 0L; | ||
649 | label = new QLabel(i18n("Use a&nti-aliasing:"), this); | 649 | label = new QLabel(i18n("Use a&nti-aliasing:"), this); | ||
650 | label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); | 650 | label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); | ||
651 | lay->addWidget(label, 0, 0); | 651 | lay->addWidget(label, 0, 0); | ||
652 | cbAA = new QComboBox(this); | 652 | cbAA = new QComboBox(this); | ||
653 | cbAA->insertItem(AAEnabled, i18nc("Use anti-aliasing", "Enabled")); // change AASetting type if order changes | 653 | cbAA->insertItem(AAEnabled, i18nc("Use anti-aliasing", "Enabled")); // change AASetting type if order changes | ||
654 | cbAA->insertItem(AASystem, i18nc("Use anti-aliasing", "System Settings")); | 654 | cbAA->insertItem(AASystem, i18nc("Use anti-aliasing", "System Settings")); | ||
655 | cbAA->insertItem(AADisabled, i18nc("Use anti-aliasing", "Disabled")); | 655 | cbAA->insertItem(AADisabled, i18nc("Use anti-aliasing", "Disabled")); | ||
656 | cbAA->setWhatsThis(i18n("If this option is selected, KDE will smooth the edges of curves in fonts.")); | 656 | cbAA->setWhatsThis(i18n("Select this option to smooth the edges of curves in fonts.")); | ||
657 | aaSettingsButton = new QPushButton(i18n("Configure..."), this); | 657 | aaSettingsButton = new QPushButton(i18n("Configure..."), this); | ||
658 | connect(aaSettingsButton, &QAbstractButton::clicked, this, &KFonts::slotCfgAa); | 658 | connect(aaSettingsButton, &QAbstractButton::clicked, this, &KFonts::slotCfgAa); | ||
659 | label->setBuddy(cbAA); | 659 | label->setBuddy(cbAA); | ||
660 | lay->addWidget(cbAA, 0, 1); | 660 | lay->addWidget(cbAA, 0, 1); | ||
661 | lay->addWidget(aaSettingsButton, 0, 2); | 661 | lay->addWidget(aaSettingsButton, 0, 2); | ||
662 | // Initialize aaSettingsButton state based on the current cbAA->currentIndex value, will be eventually updated at load() | 662 | // Initialize aaSettingsButton state based on the current cbAA->currentIndex value, will be eventually updated at load() | ||
663 | slotUseAntiAliasing(); | 663 | slotUseAntiAliasing(); | ||
664 | 664 | | |||
665 | connect(cbAA, SIGNAL(currentIndexChanged(int)), SLOT(slotUseAntiAliasing())); | 665 | connect(cbAA, SIGNAL(currentIndexChanged(int)), SLOT(slotUseAntiAliasing())); | ||
666 | #endif | 666 | #endif | ||
667 | #if HAVE_X11 | 667 | #if HAVE_X11 | ||
668 | checkboxForceDpi = new QCheckBox(i18n("Force fonts DPI:"), this); | 668 | checkboxForceDpi = new QCheckBox(i18n("Force fonts DPI:"), this); | ||
669 | lay->addWidget(checkboxForceDpi, 1, 0); | 669 | lay->addWidget(checkboxForceDpi, 1, 0); | ||
670 | spinboxDpi = new QSpinBox(this); | 670 | spinboxDpi = new QSpinBox(this); | ||
671 | spinboxDpi->setRange(1, 1000); | 671 | spinboxDpi->setRange(1, 1000); | ||
672 | spinboxDpi->setSingleStep(24); // The common DPI values 72, 96 and 120 are multiples of 24 | 672 | spinboxDpi->setSingleStep(24); // The common DPI values 72, 96 and 120 are multiples of 24 | ||
673 | QString whatsthis = i18n( | 673 | QString whatsthis = i18n( | ||
674 | "<p>This option forces a specific DPI value for fonts. It may be useful" | 674 | "<p>This option forces a specific DPI value for fonts. It may be useful" | ||
675 | " when the real DPI of the hardware is not detected properly and it" | 675 | " when the real DPI of the hardware is not detected properly and it" | ||
676 | " is also often misused when poor quality fonts are used that do not" | 676 | " is also often misused when poor quality fonts are used that do not" | ||
677 | " look well with DPI values other than 96 or 120 DPI.</p>" | 677 | " look well with DPI values other than 96 or 120 DPI.</p>" | ||
678 | "<p>The use of this option is generally discouraged. For selecting proper DPI" | 678 | "<p>The use of this option is generally discouraged. For selecting proper DPI" | ||
679 | " value a better option is explicitly configuring it for the whole X server if" | 679 | " value a better option is explicitly configuring it for the whole X server if" | ||
680 | " possible (e.g. DisplaySize in xorg.conf or adding <i>-dpi value</i> to" | 680 | " possible (e.g. DisplaySize in xorg.conf). When fonts do not render" | ||
ltoscano: Remove references to kdmrc in the meantime. | |||||
681 | " ServerLocalArgs= in $KDEDIR/share/config/kdm/kdmrc). When fonts do not render" | | |||
682 | " properly with real DPI value better fonts should be used or configuration" | 681 | " properly with real DPI value better fonts should be used or configuration" | ||
683 | " of font hinting should be checked.</p>"); | 682 | " of font hinting should be checked.</p>"); | ||
684 | spinboxDpi->setWhatsThis(whatsthis); | 683 | spinboxDpi->setWhatsThis(whatsthis); | ||
685 | checkboxForceDpi->setChecked(false); | 684 | checkboxForceDpi->setChecked(false); | ||
686 | spinboxDpi->setEnabled(false); | 685 | spinboxDpi->setEnabled(false); | ||
687 | connect(spinboxDpi, SIGNAL(valueChanged(int)), SLOT(changed())); | 686 | connect(spinboxDpi, SIGNAL(valueChanged(int)), SLOT(changed())); | ||
688 | connect(checkboxForceDpi, SIGNAL(toggled(bool)), SLOT(changed())); | 687 | connect(checkboxForceDpi, SIGNAL(toggled(bool)), SLOT(changed())); | ||
689 | connect(checkboxForceDpi, &QAbstractButton::toggled, spinboxDpi, &QWidget::setEnabled); | 688 | connect(checkboxForceDpi, &QAbstractButton::toggled, spinboxDpi, &QWidget::setEnabled); | ||
▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines |
Remove references to kdmrc in the meantime.