Bugzilla – Bug 545581
[Qt4-UI] YaST Qt interface font changes after installation of GNOME desktop
Last modified: 2021-02-19 14:09:47 UTC
User-Agent: Mozilla/5.0 (X11; U; Linux; en-GB) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) rekonq If one adds the GNOME desktop to a KDE install the Qt interface will use the GNOME desktop's window title font for module titles (I believe it's Jakub Steiner's "Fifth Leg"). Reproducible: Always Steps to Reproduce: 1. Install KDE desktop 2. Install GNOME desktop as well Actual Results: Change in title font Expected Results: No change in title fonts This occurs in oS 11.2 Milestone 8. It also occurs if one updates the system to Factory and then installs GNOME packages.
Created attachment 321741 [details] Image of a Qt YaST Module after GNOME has been installed
Actually you do not need to install GNOME packages, installing the fifthleg font on a KDE install is enough to cause the font to change as shown in the attached image.
Hi I got the same ugly fonts on two updated systems from 11.1 to 11.2. the third system with a new installation got clean fonts. I have checked a lot of rc-files, yast, qt..., but with no result.
I can reproduce this on openSUSE 11.2 RC2. Once the "fifth-leg" font is installed, the YaST2 Qt fonts change as per the attached picture.
I guess YQApplication::headingFont() returns the fifth-leg.
I did some tests to set the font family explicitly with QFont. But whatever set for the family the fifth-leg font is taken. Jakub, to which family does the fifth-leg-font belongs to?
Created attachment 354951 [details] font metadata The Family of the font is set to 'FifthLeg', the generic being Sans-Serif. And yea at that size without proper hinting, the text looks hideous.
I don't know yet where the font is selected. YQApplication::headingFont() isn't used because the headline of the dialog is set by UI::WizardCommand(`SetDialogHeading( title ) in Wizard.ycp. To set QFont explicitly, e.g. to Times in YQWizard::layoutWorkArea() has no effect (except 'bold' is used). --- YQWizard.cc (Revision 61604) +++ YQWizard.cc (Arbeitskopie) @@ -753,7 +753,11 @@ _dialogHeading->setTextFormat( Qt::PlainText ); _dialogHeading->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); // hor/vert _dialogHeading->setObjectName( "DialogHeading" ); - + QFont headingFont( "Times", 8, QFont::Bold ); + dialogHeading->setFont( headingFont ); + QFontInfo info = _dialogHeading->fontInfo(); + yuiMilestone() << "Family used: " << info.family() << endl; + // // Client area (the part that belongs to the YCP application) // @@ -954,7 +958,10 @@ if ( _dialogHeading ) { if ( ! headingText.empty() ) + { + yuiMilestone() << "DialogHeading set: " << headingText << endl; _dialogHeading->setText( fromUTF8( headingText ) ); + } else _dialogHeading->clear(); }
fixed in yast2-theme 2.20.3