[Bug 965927] New: SystemSettings5: Text length in Main Window is fixed in Chinese while not in English
http://bugzilla.opensuse.org/show_bug.cgi?id=965927 Bug ID: 965927 Summary: SystemSettings5: Text length in Main Window is fixed in Chinese while not in English Classification: openSUSE Product: openSUSE Tumbleweed Version: 2015* Hardware: All OS: SUSE Other Status: NEW Severity: Normal Priority: P5 - None Component: KDE Applications Assignee: opensuse-kde-bugs@opensuse.org Reporter: i@marguerite.su QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 664987 --> http://bugzilla.opensuse.org/attachment.cgi?id=664987&action=edit SystemSettings5 opened with Chinese locale 1. Open SystemSettings5, in English, you could see: https://userbase.kde.org/File:Systemsettings-plasma5_4.png There're good paddings between icons. 2. Open SystemSettings5, in Chinese (zh_CN.UTF-8), you could see the screenshot in attachment. There're almost no paddings and the text is wrapped. (looks like the length of line is fixed) It doesn't look good. And this happened in KDE4 too. Marguerite -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=965927 http://bugzilla.opensuse.org/show_bug.cgi?id=965927#c1 Marguerite Su changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|opensuse-kde-bugs@opensuse. |RBrownCCB@opensuse.org |org | --- Comment #1 from Marguerite Su --- assigned to RB. see if I can get some luck -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=965927 http://bugzilla.opensuse.org/show_bug.cgi?id=965927#c2 Marguerite Su changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |UPSTREAM --- Comment #2 from Marguerite Su --- https://bugs.kde.org/show_bug.cgi?id=234407 Mark as upstream to avoid flooding Richard's bug list. This is actually a regression of the re-implementation of Qt's QItemDelegate::painting. And this issue is still reproduceable with the latest Plasma 5. Because the item's text is passed with "QTextOption::WordWrap", but definition of WordWrap took no consideration about CJK. Will try to modify one of the rejected KDE patch as a workaround for the openSUSE side (because KDE upstream's potential fix will be a workaround too, the problem is actually in Qt 4.x and Qt 5.x). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=965927 http://bugzilla.opensuse.org/show_bug.cgi?id=965927#c3 --- Comment #3 from Marguerite Su --- Index: b/icons/IconMode.cpp =================================================================== --- a/icons/IconMode.cpp +++ b/icons/IconMode.cpp @@ -29,6 +29,7 @@ #include <QStackedWidget> #include <QAction> +#include <QLocale> #include <KAboutData> #include <KStandardAction> #include <KFileItemDelegate> @@ -174,7 +175,15 @@ void IconMode::initWidget() d->categoryView->viewport()->setAttribute( Qt::WA_Hover ); KFileItemDelegate *delegate = new KFileItemDelegate( d->categoryView ); - delegate->setWrapMode( QTextOption::WordWrap ); + + // Do not set WordWrap mode in CJK languages. + QString currentLang = QLocale::languageToString(QLocale().language()); + QString CJKLang("Chinese:Japanese:Korean"); + if( CJKLang.contains(currentLang) ) { + delegate->setWrapMode( QTextOption::NoWrap ); + } else { + delegate->setWrapMode( QTextOption::WordWrap ); + } d->categoryView->setItemDelegate( delegate ); d->categoryView->setFrameShape( QFrame::NoFrame ); The updated patch, in case someone need it. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com