TDEFontDialog: Fix font style matching. #164
Merged
blu.256
merged 1 commits from fix/font-styles
into master
2 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'fix/font-styles'
Deleting a branch is permanent. It CANNOT be undone. Continue?
This resolves issue TDE/tde#81.
5b182d3dba
to042633a711
2 years agoThere were several problems fixed with this commit:
a) Differently translated strings prevented matching font styles. This also resulted in awkward translations where one half of the name would be translated and the other one left as is. Fixed with a common
style_name(...)
function which returns the correct translation of the style string.b) Simplistic bold/italics matching disregarded other font styles (e.g. font weights). Fixed with a loop which matches the font style by name (like done elsewhere).
@SlavekB can you please test this?
So far I haven't done a test, but there is one note – see below.
familyListBox->setCurrentItem( 0 );
styleListBox->setCurrentItem(style);
styleListBox->setCurrentItem( 0 );
It seems that the call
setCurrentItem(...)
leads many other calls, such as theselectionChanged()
signal and perhaps also drawing in the user interface. Therefore, it seems clumsy to call it 2× – once before the loop and the second inside the loop. I propose to modify the code so thatsetCurrentItem()
is called once.Did not think of the possible overhead because my test was fine. Now it is probably solved.
Great, thank you, that's exactly how I meant it.
042633a711
toe902187194
2 years agoI did a test and while in TCC it seems to be okay, in KWord I still observe the same problem.
Problem confirmed.
Strange, maybe Kword uses another font picker? I'll take a look at its source.
Discussion of KWord (KOffice) issue continued in issue TDE/koffice#22.
Should we merge this PR as is and treat the problem of KWord as a separate bug (already tracked in TDE/koffice#22)?
It works well – nothing seems to prevent merging.
The case of KOffice will be solved separately.
e902187194
into master 2 years agoMerged together with TDE/koffice#24.
Reviewers
e902187194
.