Bug 66495 - Icon bar too wide in configuration dialogs
Summary: Icon bar too wide in configuration dialogs
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-24 13:40 UTC by Hasso Tepper
Modified: 2003-11-03 15:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hasso Tepper 2003-10-24 13:40:22 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc-3.3.2 
OS:          Linux

Translated texts in configuration dialog icon bar are sometimes much longer than originals (see http://hasso.linux.ee/ksirc1.png). It isn't worst case. I tried to add "\n", but it doesn't work (see http://hasso.linux.ee/ksirc2.png). It doesn't have any effect to width of icon bar either.
Comment 1 Stephan Kulow 2003-10-24 14:10:26 UTC
Subject: Re:  New: Icon bar too wide in configuration dialogs

On Friday 24 October 2003 13:40, you wrote:
> Translated texts in configuration dialog icon bar are sometimes much longer than originals (see http://hasso.linux.ee/ksirc1.png). 
> It isn't worst case. I tried to add "\n", but it  
> doesn't work (see http://hasso.linux.ee/ksirc2.png). It doesn't have any effect to width of icon bar either. 
Can you try <br>?

Greetings, Stephan

Comment 2 Hasso Tepper 2003-10-24 14:54:08 UTC
Subject: Re:  Icon bar too wide in configuration dialogs

> Can you try <br>?

No effect. Even no line break. "Automaatne<br>
Comment 3 Tobias Koenig 2003-11-03 15:38:53 UTC
Subject: kdelibs/kdeui

CVS commit by tokoe: 

Draw text in QListBoxItem concerning the amount of newlines.
That fixes #66495.

@Hasso: As translator you can use \n now in long translations.

CCMAIL:66495-done@bugs.kde.org


  M +4 -2      kjanuswidget.cpp   1.69


--- kdelibs/kdeui/kjanuswidget.cpp  #1.68:1.69
@@ -1047,5 +1047,6 @@ void KJanusWidget::IconListItem::paint( 
   //int wt = fm.boundingRect(text()).width();
   int wp = mPixmap.width();
-  int ht = fm.lineSpacing();
+  int hf = text().contains( '\n' ) + 1;
+  int ht = hf * fm.lineSpacing();
   int hp = mPixmap.height();
 
@@ -1065,5 +1066,6 @@ int KJanusWidget::IconListItem::height( 
   else
   {
-    return( mPixmap.height() + lb->fontMetrics().lineSpacing()+10 );
+    int hf = text().contains( '\n' ) + 1;
+    return( mPixmap.height() + lb->fontMetrics().lineSpacing() * hf + 10 );
   }
 }


Comment 4 Hasso Tepper 2003-11-03 17:01:24 UTC
Subject: Re:  Icon bar too wide in configuration dialogs

> Draw text in QListBoxItem concerning the amount of newlines.
> That fixes #66495.
>
> @Hasso: As translator you can use \n now in long translations.
>
> CCMAIL:66495-done@bugs.kde.org

Hmm. Seems that it doesn't fix main problem. Icon bar is still as wide 
as there been string without "\n".

http://hasso.linux.ee/ksirc3.png