Bug 386546

Summary: bad textarea width for rename file if filename too short
Product: [Plasma] plasmashell Reporter: painless roaster <painless.roaster>
Component: Application Dashboard widgetAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, hein, kde, nate, notuxius
Priority: NOR    
Version First Reported In: 5.10.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: bad textarea width
patch (for correct width)
correct textarea width
patch with correct rtl support

Description painless roaster 2017-11-05 11:03:44 UTC
Created attachment 108710 [details]
bad textarea width

steps for replicate:
 - create file (on plasma-destkop) with filename 't1'
 - try rename file to: 't1 test test'

image describing a problem: bad_textarea_width.png

corrupted from commit:
 - author: Eike Hein
 - date: 2017.03.01
 - commit id: 6a0b3f8a3dc580046f61ae4e01c0553377c12cbf

repair patch: FolderView_01.patch

image describing correct width (after apply patch in attachment): correct_textarea_width.png
Comment 1 painless roaster 2017-11-05 11:04:21 UTC
Created attachment 108711 [details]
patch (for correct width)
Comment 2 painless roaster 2017-11-05 11:04:46 UTC
Created attachment 108712 [details]
correct textarea width
Comment 3 painless roaster 2017-11-05 11:07:22 UTC
Hi Eike,

to start edit filename in plasma-desktop, you can not use 'targetItem.label.paintedWidth'. It does not work for short filenames. :-)
Comment 4 Nate Graham 2017-11-05 14:45:25 UTC
Thanks for the patch! Can you submit it on https://phabricator.kde.org/? Patches in bugs tend to get lost.

When you do, please put "BUG: 386546" on its own line in the summary section.
Comment 5 painless roaster 2017-11-06 07:22:50 UTC
https://phabricator.kde.org/D8676
Comment 6 Alexander Mentyu 2017-12-09 11:47:45 UTC
Can confirm this bug in:

Netrunner Rolling
KDE Plasma 5.10.3
KDE Frameworks 5.35
KDE Applications 17.04.2
Qt5.9.0

After updating of the system -there is 'Malformed URL' bug upon creating of a new file on the desktop https://bugs.kde.org/show_bug.cgi?id=387529 so can't reproduce after update
Comment 7 David Edmundson 2017-12-23 22:24:33 UTC
Updating based on phabricator status:
 - patch needs some rework to not break RTL support. 

You can test with plasmashell --reverse.
Comment 8 Patrick Silva 2018-02-21 22:59:41 UTC
plasma 5.122 has the same bug.
Comment 9 painless roaster 2018-02-25 18:03:15 UTC
Created attachment 110993 [details]
patch with correct rtl support

patch with correct rtl support
Comment 10 painless roaster 2018-02-25 18:43:14 UTC
https://phabricator.kde.org/D10837
Comment 11 Eike Hein 2018-03-15 10:28:50 UTC
Git commit d6818eac6fbe495facf558b41cd570604bb7cbcb by Eike Hein, on behalf of Radek Bucek.
Committed on 15/03/2018 at 10:28.
Pushed by hein into branch 'Plasma/5.12'.

bad textarea width for rename file if filename too short

plasma-desktop - bad textarea width in rename file

steps for replicate:

create file (on plasma-destkop) with filename 't1'
try rename file to: 't1 test test'

Reviewers: #plasma, hein

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10837

M  +5    -7    containments/desktop/package/contents/ui/FolderView.qml

https://commits.kde.org/plasma-desktop/d6818eac6fbe495facf558b41cd570604bb7cbcb