Bug 233752 - configuration dialogue in Amarok is too wide, can't be shrinked
Summary: configuration dialogue in Amarok is too wide, can't be shrinked
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.3.0
Platform: Mandriva RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-08 18:06 UTC by Cyril Brosch
Modified: 2010-04-10 17:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.3.1


Attachments
screenshot of Amarok config dialogue (237.06 KB, image/png)
2010-04-08 18:08 UTC, Cyril Brosch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cyril Brosch 2010-04-08 18:06:39 UTC
Version:            (using KDE 4.4.2)
OS:                Linux
Installed from:    Mandriva RPMs

I think this is a wish, though it bugs me:
Although I have a not-so-small resolution of 1280x800, the config window of Amarok (2.3) in German is too wide for my 13,3", screen, so that a part is invisible (see the screenshot). I can't change it's width, but in the configuration sections I can't see, what causes the extraordinary lenght of the items, maybe it's the second sentence in the collection section?
Comment 1 Cyril Brosch 2010-04-08 18:08:18 UTC
Created attachment 42600 [details]
screenshot of Amarok config dialogue
Comment 2 Sven Krohlas 2010-04-09 11:20:46 UTC
Amarok version? Does it only happen using German locales?
Comment 3 Cyril Brosch 2010-04-09 11:26:16 UTC
It's Amarok 2.3.

The English version is only half that wide. Comparing the dialogues I guess that there are only two lines reserved for the long description in the collection section. The English text is much shorter there, while the text in the data base section has more or less the same length as with German locales.
Comment 4 Mark Kretschmann 2010-04-09 11:45:25 UTC
That is indeed problematic. I'll see if we can fix it by setting a flag for automatic word wrap (line breaks).
Comment 5 Mark Kretschmann 2010-04-10 09:37:34 UTC
commit 80aef22f53352461ff77778faa73fd1b99823761
Author: Mark Kretschmann <kretschmann@kde.org>
Date:   Sat Apr 10 09:35:12 2010 +0200

    Use word wrap in collection settings to prevent huge width.
    
    One label caused issues with translated versions of Amarok: The whole
    dialog would become extremely wide, depending on the length of the translated
    text. I've enabled word wrap to fix this.
    
    BUG: 233752

diff --git a/ChangeLog b/ChangeLog
index 1275dfe..da78a03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,6 +54,7 @@ VERSION 2.3.1-Beta 1
        some MySQL versions. (BR 225052)
 
   BUGFIXES:
+     * Settings dialog could become too wide with translations. (BR 233752)
      * Fix re-mounting iPhoneOS devices after having been unplugged without being
        unmounted. Thanks to Jeffrey Dodge <hazridi@gmail.com>. (BR 233305)
      * Fix connecting to iPod Touch devices. Patch by Jeffrey Dodge
diff --git a/src/dialogs/CollectionSetup.cpp b/src/dialogs/CollectionSetup.cpp
index 048de21..087505b 100644
--- a/src/dialogs/CollectionSetup.cpp
+++ b/src/dialogs/CollectionSetup.cpp
@@ -92,11 +92,13 @@ CollectionSetup::CollectionSetup( QWidget *parent )
     setObjectName( "CollectionSetup" );
     s_instance = this;
 
-    (new QLabel( i18n(
+    QLabel* descriptionLabel = new QLabel( i18n( 
         "These folders will be scanned for "
-        "media to make up your collection. You can\n"
+        "media to make up your collection. You can "
         "right-click on a folder to individually "
-        "rescan it, if it was previously selected:"), this ))->setAlignment( Qt::AlignJustify );
+        "rescan it, if it was previously selected:" ), this );
+    descriptionLabel->setAlignment( Qt::AlignJustify );
+    descriptionLabel->setWordWrap( true );
 
     m_view  = new CollectionSetupTreeView( this );
     m_view->setHeaderHidden( true );