From kde-core-devel Tue May 06 12:58:41 2008 From: Caslav Ilic Date: Tue, 06 May 2008 12:58:41 +0000 To: kde-core-devel Subject: Re: Drop-in replacement for QFontComboBox, better previews Message-Id: <200805061458.44400.caslav.ilic () gmx ! net> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=121007882303228 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1586925.BI3OyDZI01" --nextPart1586925.BI3OyDZI01 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline >> [: Alex Merry :] >> Also, does the above NOTE mean that there's potential for breakage if the >> user installs a later version of Qt? > > [: Thiago Macieira :] > Yes, the code is using too much of Qt internals. That is not a good idea. > > My suggestion is simpler: make this code work in QFontComboBox directly. > [...] That code is a heuristic to decide what kind of sample text to show. If Qt changes it internally, to improve the heuristic, the KDE is only left with without that improvement. Hence the note to check it from time to time. I did thought about proposing changes for the QFontComboBox directly, but I think it is important to have a tighter integration between font choosers and the particular DE. E.g. aside from the enhanced preview, I've also added that little snippet in preparation of translating generic font names (and this makes a lot of sense in any translation, avoiding the sometimes seen confusion in English about them being some particular fonts, instead of generic "frontends"). Then, as a next step, I've also thought of allowing the user to set the sample text, by adding a side button to the combo box (just an icon, like that for clearing a location bar) which pops up a small dialog. Sumarily, I'd like to have a KFontComboBox for DE-specific bits and pieces, and whatever internals gets offloaded to QFontComboBox in time, the better. I think a good option could also be to make the heuristic into a public method of e.g. QFontDatabase, when the clint wants to query about such stuff. --nextPart1586925.BI3OyDZI01 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBIIFYEMSGXgigGr3ERAtyhAJ0QCmkX4cPeC/0cx7RPHqnfR51EVgCgmzpw rUI4dnO8zN6Ed7dxVKfa6tI= =HL7t -----END PGP SIGNATURE----- --nextPart1586925.BI3OyDZI01--