Bug 337243

Summary: Tool-Tips ignoring custom font size setting.
Product: [Applications] digikam Reporter: Paul <pip.kde>
Component: Setup-TooltipsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin, wbauer1
Priority: NOR    
Version: 4.1.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 5.9.0
Sentry Crash Report:
Attachments: Choose/Set custom font to 'Ubuntu' 12pt
Tool-Tip font size is unchanged from 'Ubuntu' 9pt
Tool-Tips set to Times New Roman 16pt
Comparison of Tool-Tip Fonts....
fontsize-1.patch

Description Paul 2014-07-08 19:03:48 UTC
When setting a custom font for tool-tips the size is being ignored.

Settings > Configure digiKam > Tool-Tip > Tool-Tips Font > Custom Font > Choose .... 

Setting font type and size appears to work, 'Custom Font' text changes to selected size. However, when tool-tips are displayed the font size is unchanged, as shown in the following attachments.

Font set to 'Ubuntu' 12pt Regular (Sample text 'NIKON...' used to match subsequent tool-tip text for more obvious comparison).

Tool-tips still display as 'Ubuntu' 9pt Regular. (My) System Default setting.

Returning to Settings > Configure digiKam > Tool-Tip > Tool-Tips Font > Custom Font > Choose .... 
shows the font set to 'Custom Font' 'Ubuntu' 12pt Regular.

digiKam Version 4.1.0 - Build date: Jun 30 2014
Comment 1 Paul 2014-07-08 19:05:08 UTC
Created attachment 87649 [details]
Choose/Set custom font to 'Ubuntu' 12pt
Comment 2 Paul 2014-07-08 19:05:54 UTC
Created attachment 87650 [details]
Tool-Tip font size is unchanged from 'Ubuntu' 9pt
Comment 3 caulier.gilles 2014-07-09 07:57:10 UTC
Not reproducible here under Linux/KDE desktop, OSX, and Windows. I try to use exotic font and all work as expected.

https://www.flickr.com/photos/digikam/14630925563/

I suspect a dysfunction from your system. Do you use Gnome desktop ?

Gilles Caulier
Comment 4 Paul 2014-07-09 10:41:44 UTC
OK. Thanks for testing, clearly on your own system it works as intended.

I'm using KDE 'Current' (Platform Version 4.13.2) from the openSUSE repository. 'Oddities' of my system are I'm using my own QtCurve style, and the 'Ubuntu' font family.

If I don't use QtCurve or Ubuntu fonts the "problem" still persists. (I've cleared the KDE cache and re-booted.)

Attached image shows the result of using 'Oxygen' style and changing Tool-Tips to Times New Roman 16pt, (from the temporary new system default of Deja Vu Sans). Again, the font style changes, but not the size.  All very odd...
Comment 5 Paul 2014-07-09 10:42:24 UTC
Created attachment 87659 [details]
Tool-Tips set to Times New Roman 16pt
Comment 6 caulier.gilles 2014-07-09 11:42:53 UTC
Report this problem to OpenSuse team. This is not really a problem from digiKam.

Gilles Caulier
Comment 7 Paul 2014-07-09 17:13:46 UTC
(In reply to comment #6)
> Report this problem to OpenSuse team.

Yes, I appreciate it's not a digiKam bug. I'm unsure of what component to report the bug against though, any suggestions?

Thanks again for your time.
Comment 8 caulier.gilles 2014-07-09 17:14:48 UTC
OpenSuse has a bugzilla, i'm sure. Look into it...

Gilles Caulier
Comment 9 Paul 2014-07-09 17:34:49 UTC
Yes, I've reported bugs before using the openSUSE bugzilla... 

In this case there appeared no obvious component to report this against  - using 'digiKam' would be rather pointless :)

I'll file it against component 'other'...

Thanks once more.
Comment 10 Paul 2018-01-15 16:37:27 UTC
Re-opening as this is still a problem using digiKam 5.7.0 and not thought to be a distribution specific bug.

Further details:
https://forums.opensuse.org/showthread.php/529098-digiKam-Unable-to-change-tooltip-font-size
Comment 11 Maik Qualmann 2018-01-16 19:40:15 UTC
The font size is hardcoded in the HTML document for the tooltips. In principle, there are only sizes 1-7 for the HTML <font size> element. Any size from the font dialog is not possible, unless we use CSS. Is the font too small for you?

Maik
Comment 12 Paul 2018-01-17 12:53:19 UTC
Created attachment 109931 [details]
Comparison of Tool-Tip Fonts....

(In reply to Maik Qualmann from comment #11)

> Is the font too small for you?
It is not entirely a case of simply being too small, but one of overall readability. (see attached screen shot comparing 4 differing fonts)  

I'm currently using KDE/Plasma5 with the "General" font set to Noto-Sans 8 Regular.  I do not wish to change that, it's that font upon which it seems digiKam uses when set to "System Font".

When using noto-sans 8, yes, I find the Tool-Tip text too small, particularly the italic text. As the (digiKam) font size setting is ignored the only way to obtain (slightly) larger / more readable text is to experiment with differing fonts; not a very elegant solution.

The ability to set the tool-tip font size, is IMHO a necessity :)


> Any size from the font dialog is not possible, unless we use CSS. 
Then that should either be implemented, or if not, the size setting option should be removed completely, however, I assume that is not possible... So perhaps a note on the settings page against "Tool-Tip Settings" "Tool-Tip Font" to the effect that size can't be changed.
Comment 13 caulier.gilles 2018-01-17 13:45:31 UTC
Maik,

This is a regression here.

I'm sure that in older version, tooltip font settings has work properly. I don't know when this regression appears.

It can be easy to customize the font size in tooltip CSS.

Gilles
Comment 14 Maik Qualmann 2018-01-17 18:10:21 UTC
Git commit cdc4659165008995bc60d6ac6fabe482928b8aef by Maik Qualmann.
Committed on 17/01/2018 at 18:09.
Pushed by mqualmann into branch 'master'.

fix font size in the tooltips
FIXED-IN: 5.9.0

M  +2    -1    NEWS
M  +27   -14   libs/widgets/itemview/ditemtooltip.cpp

https://commits.kde.org/digikam/cdc4659165008995bc60d6ac6fabe482928b8aef
Comment 15 Wolfgang Bauer 2018-01-17 20:49:36 UTC
I tested the patch, and the custom font size is now respected.

But it seems to "break" the default case, the font size is now bigger than before if "system font" is selected.
Is this intended?
Comment 16 Maik Qualmann 2018-01-17 20:58:33 UTC
The font size previously did not correspond to the set system font size (font "general" under Plasma). Therefore, I think the current behavior is correct. The font size can now be selected smaller.

Maik
Comment 17 Wolfgang Bauer 2018-01-17 21:32:04 UTC
(In reply to Maik Qualmann from comment #16)
> The font size previously did not correspond to the set system font size
> (font "general" under Plasma). Therefore, I think the current behavior is
> correct. The font size can now be selected smaller.

Right, it used HTML's "-1" whatever that led too.
But I thought I'd mention it, just in case... ;-)

Although, maybe it would be better to use font "small" than general in that case? Just an idea.
But I don't mind really.

Thanks for fixing this though.
Comment 18 Maik Qualmann 2018-01-17 21:54:43 UTC
Created attachment 109954 [details]
fontsize-1.patch

We could generally reduce the font size by 1, which would restore the old behavior. What do you make of it?

Maik
Comment 19 Wolfgang Bauer 2018-01-17 22:35:27 UTC
(In reply to Maik Qualmann from comment #18)
> We could generally reduce the font size by 1, which would restore the old
> behavior. What do you make of it?

Hm, that would also be done with a custom set size, wouldn't it?
Probably unexpected behaviour then, I'd say...

As mentioned, please disregard my concerns, I just wanted to make sure that it didn't get in by mistake.
Comment 20 Paul 2018-01-18 11:38:25 UTC
@All

Thanks :)