Bug 460163 - Pulldown for format in export dialog is cutting values
Summary: Pulldown for format in export dialog is cutting values
Status: CLOSED FIXED
Alias: None
Product: ghostwriter
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-09 13:30 UTC by Stefan
Modified: 2023-04-23 00:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 23.04.0
Sentry Crash Report:


Attachments
pulldown is cutting values (420.25 KB, image/gif)
2022-10-09 13:30 UTC, Stefan
Details
adjust width on change (224.98 KB, image/gif)
2022-10-11 21:36 UTC, Stefan
Details
Always full width (283.10 KB, image/gif)
2022-10-11 21:37 UTC, Stefan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan 2022-10-09 13:30:28 UTC
Created attachment 152665 [details]
pulldown is cutting values

If the exporter is changed, the pulldown for the format is cutting valuenames until the dialog is reopen.

STEPS TO REPRODUCE

1. open file > export
2. choose another exporter

OBSERVED RESULT

The values in pulldown for format are cutted.

See screenshot.

EXPECTED RESULT

The valuenames should shown in full
Comment 1 Stefan 2022-10-11 21:36:32 UTC
Created attachment 152722 [details]
adjust width on change
Comment 2 Stefan 2022-10-11 21:37:08 UTC
Created attachment 152723 [details]
Always full width
Comment 3 Stefan 2022-10-11 21:57:19 UTC
Hi megan

i am new to the code site of kde and looking for bugs, which seems to be fixable by me as a beginner.

created a fork with the attempt to fix this.

https://invent.kde.org/hotzeplotz/ghostwriter/-/compare/master...exportdialog-adjust-dropdown-size?from_project_id=12158

See Attachment "always full width" https://bugs.kde.org/attachment.cgi?id=152723

Read https://develop.kde.org/hig/components/editing/dropdown/. But it's not entirely clear to me what exactly the "design policy" is for such a pulldown. The image shows that the width is longer than the values, but it does not have a length of 100%.

Alternatively, the length of the field could be adjusted dynamically with `fileFormatComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);` but i guess this is not was the vdg want.

See Attachment "adjust width on change" https://bugs.kde.org/attachment.cgi?id=152722

After investigate a bit, i am confused. There are some pulldowns in other projects dialogs with a width of 100%, but i could not found the call of "setSize*" on such comboboxes …

Would my attempt be a solution for this? Are you interested in a merge request and could you help me with it? thanks.
Comment 4 Stefan 2022-10-11 21:58:08 UTC
Comment on attachment 152722 [details]
adjust width on change

fileFormatComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
Comment 5 megan.conkle 2022-10-12 19:15:11 UTC
(In reply to Stefan from comment #3)
> Hi megan
> 
> i am new to the code site of kde and looking for bugs, which seems to be
> fixable by me as a beginner.
> 
> created a fork with the attempt to fix this.
> 
> https://invent.kde.org/hotzeplotz/ghostwriter/-/compare/master...
> exportdialog-adjust-dropdown-size?from_project_id=12158
> 
> See Attachment "always full width"
> https://bugs.kde.org/attachment.cgi?id=152723
> 
> Read https://develop.kde.org/hig/components/editing/dropdown/. But it's not
> entirely clear to me what exactly the "design policy" is for such a
> pulldown. The image shows that the width is longer than the values, but it
> does not have a length of 100%.
> 
> Alternatively, the length of the field could be adjusted dynamically with
> `fileFormatComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);` but
> i guess this is not was the vdg want.
> 
> See Attachment "adjust width on change"
> https://bugs.kde.org/attachment.cgi?id=152722
> 
> After investigate a bit, i am confused. There are some pulldowns in other
> projects dialogs with a width of 100%, but i could not found the call of
> "setSize*" on such comboboxes …
> 
> Would my attempt be a solution for this? Are you interested in a merge
> request and could you help me with it? thanks.

Hi Stephan,

I think you're on the right track.  I recall having to do something similar to the StatisticsIndicator class.  Go ahead and put in the merge request, and I will test it on my end to confirm it's working, plus provide any feedback.

Thanks for your help!
Comment 6 Bug Janitor Service 2022-10-13 06:12:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/ghostwriter/-/merge_requests/3
Comment 7 megan.conkle 2022-10-13 16:34:51 UTC
Git commit a48044968e7880c8718ff48330222b68785b0a88 by Megan Conkle, on behalf of Stefan Mayer.
Committed on 13/10/2022 at 16:34.
Pushed by wereturtle into branch 'master'.

Adjust size of drop down in export dialog

The dropdown list of the export dialog cuts the values if the exporter is changed until the dialog is reopened.

This fix stretches both drop down fields to a width of 100%, like other projects do.

M  +3    -1    src/exportdialog.cpp

https://invent.kde.org/office/ghostwriter/commit/a48044968e7880c8718ff48330222b68785b0a88