Bug 197098 - KMessageBox with fixed size do not auto adjust on font-size change.
Summary: KMessageBox with fixed size do not auto adjust on font-size change.
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdeui (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-19 04:13 UTC by Jay LaCroix
Modified: 2024-09-14 17:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenshot (295.81 KB, image/png)
2009-06-19 04:14 UTC, Jay LaCroix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jay LaCroix 2009-06-19 04:13:16 UTC
Version:            (using KDE 4.2.90)
OS:                Linux
Installed from:    Ubuntu Packages

I noticed that there is a small error when changing fonts. A message comes up when you change settings that says "Some changes such as anti-aliasing will only affect newly started ap". (See screenshot). The sentence is missing some letters.
Comment 1 Jay LaCroix 2009-06-19 04:14:05 UTC
Created attachment 34646 [details]
Screenshot
Comment 2 Dario Andres 2009-06-24 20:51:43 UTC
Here using:

Qt: 4.5.1 (qt-copy  971295)
KDE: 4.2.92 (KDE 4.2.92 (KDE 4.3 >= 20090617))
kdelibs svn rev. 984425 / kdebase svn rev. 984427
on ArchLinux i686 - Kernel 2.6.30

I can't reproduce this bug, I even tried with bigger fonts,and the text was always wordwrapped (if the font is big), but never chopped.
My DPI is 96.

The Fonts KCM uses KMessageBox::information, so may be some bug at that class on kdelibs.

Thanks
Comment 3 Christoph Feck 2009-07-30 18:04:33 UTC
Steps to reproduce on a clean .kde:

* open KCM fonts
* change any antialiasing setting
* also increase font size (say to 32 pt)
* then click OK

The problem is that the message box is probably layed out with the old font size, but rendered in the new font size.
Comment 4 Dario Andres 2009-08-01 23:44:41 UTC
Ok, I can reproduce the bug here with the steps on comment 3, using:

Qt: 4.5.2 (KDE-Qt git commit f9802f2bbbd23137acb5f80d1f131fa6b1a85752
        Date:   Fri Jun 12 15:06:29 2009 +0200)
KDE: 4.3.61 (KDE 4.3.61 (KDE 4.4 >= 20090717))
kdelibs svn rev. 1001953 / kdebase svn rev. 1001954
on ArchLinux i686 - Kernel 2.6.30.1

I guess this could be also related to the special layouting of KMessageBox (used to bypass the word-wrap-enabled QLabel qt bug)
Comment 5 Dario Andres 2009-08-02 00:08:23 UTC
Ok, this is indeed a kdelibs bug.

- Run 'kdialog --msgbox "Some large text here"'
Leave the message open
- Increase the General font size.
The font is increased in the dialog, but it isn't relayouted, so the text is chopped; and the dialog can't be resized.

A simple solution will be connecting the "KGlobalSettings::global()::appearanceChanged" signal to an internal slot to force a relayout.
Comment 6 Dario Andres 2009-08-02 00:50:42 UTC
It seems my proposed "workaround" doesn't work properly.
The problem relays also on KMessageBox::createKMessageBox which calls dialog->setFixed() to bypass the layouting issues, causing this bug as well.
Comment 7 Christoph Feck 2009-08-02 01:41:22 UTC
While it is good when applications respect colors, fonts, icons, styles, and other theme choices, it is going to add an incredible burden for the developers to respect changes of these during runtime.

Maybe any change of those attributes should trigger a complete invalidation of layouts and size hints, and force a repaint.
Comment 8 Dario Andres 2009-08-02 17:40:31 UTC
I think that is the normal/default behaviour, but this seems to be a special case; as the code is forcing a fixed size for the dialog (to workaround the wordwrap label bug thing); even when the dialog invalidates and forces a relayout, it wont work as it wont override the "fixed" size. And it is a bit more difficult as the functions related to KMessageBox are all static and therefore blocking, so it is more difficult to catch external signals and use them to re-set the dialog size/fixed size/layout. :-\
Comment 9 Christoph Cullmann 2024-09-14 17:06:57 UTC
Hi,

kdelibs (version 4 and earlier) is no longer maintained since a few years.

KDE Frameworks 5 or 6 might already have resolved this bug.

If not, please re-open against the matching framework if feasible or against the application that shows the issue.

We then can still dispatch it to the right Bugzilla product or component.

Greetings
Christoph Cullmann