Increase the "Add Source" dialog's width
ClosedPublic

Authored by ngraham on Mar 10 2018, 9:30 PM.

Details

Summary

As @ach pointed out, even after my last round of polish on the Add Source dialog, it was still too narrow, and many or even most URLs would not be fully visible in the text field. This patch remedies that, and now it can accommodate longer repo URLs without cutting anything off.

Test Plan

with KDEApps Flatpak repo string, before:

After:

Diff Detail

Repository
R134 Discover Software Store
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Mar 10 2018, 9:30 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 10 2018, 9:30 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Mar 10 2018, 9:30 PM
ngraham retitled this revision from Increase the "Add Source" dialog's width, to accommodate longer repo URLs without cutting anything off to Increase the "Add Source" dialog's width.Mar 10 2018, 9:31 PM
ngraham edited the summary of this revision. (Show Details)
ngraham edited the test plan for this revision. (Show Details)
apol added a comment.Mar 12 2018, 11:42 AM

I wonder if wit would make sense to make it in terms of the parent size too. Something like: width: Math.min(gridUnit*20, parent.width*0.8)

In D11219#223908, @apol wrote:

I wonder if wit would make sense to make it in terms of the parent size too. Something like: width: Math.min(gridUnit*20, parent.width * 0.8)

For some reason Math.min (Kirigami.Units.gridUnit * 20, parent.width * 0.8) does not work, and always gives me the value of Kirigami.Units.gridUnit * 20, even when I can verify that alone width: parent.width*0.8 works fine. What's going on here? Is there an Import that we need for Math.min()?

apol accepted this revision.Mar 13 2018, 12:02 AM

I'm not sure. Oh well, land it as is, if it becomes a problem we'll solve it.

This revision is now accepted and ready to land.Mar 13 2018, 12:02 AM
ngraham updated this revision to Diff 29369.Mar 13 2018, 3:44 AM

Rebase on master

ngraham updated this revision to Diff 29370.Mar 13 2018, 3:48 AM

For some reason rebaseing on master pulled in an unrelated appstream change

ngraham updated this revision to Diff 29371.Mar 13 2018, 3:51 AM

Stupid caveman fix using the web interface

This revision was automatically updated to reflect the committed changes.