yad icon indicating copy to clipboard operation
yad copied to clipboard

YAD 7.3: Dialog height too large

Open sarether opened this issue 3 years ago • 33 comments

Dialog height isn't minimum unless specify a height or specify a small value for the height. But any width is allowed and that's OK, as with previous YAD versions.

yad --title="app - title" --width=450 --text="text text text text text text text text text text text text text text text text.
text text text text?" --on-top --center --image=gtk-dialog-question --window-icon=$ICON --button="yad-no:1" --button="yad-yes:0"

YAD 7.2 and older versions: PrtSc-21 10 20_Wednesday_19:57:11 61

YAD 7.3: PrtSc-21 10 20_Wednesday_19:56:20 51

sarether avatar Oct 21 '20 16:10 sarether

There are two possible solution on the old site: https://sourceforge.net/p/yad-dialog/tickets/322/#f7e3/5aa0

buc-me avatar Oct 31 '20 22:10 buc-me

I can confirm the dialog height issue. As said, in 7.2 it was OK, but in 7.3 it is not.

manuel-192 avatar Nov 05 '20 09:11 manuel-192

Looks like commit 8442c52a2048e85e410eb8945641222eb0b9dc34 into main.c causes this issue. If that commit is reverted, then the size is as expected.

Note that I didn't test it thoroughly, only with one simple example.

manuel-192 avatar Nov 05 '20 10:11 manuel-192

I can confirm this issue as well, commit 8442c52a2048e85e410eb8945641222eb0b9dc34 is bad.

eworm-de avatar Nov 23 '20 15:11 eworm-de

Hi all,

Could you please check whether the patch (proposed on the old site) fixes your issues? https://sourceforge.net/p/yad-dialog/tickets/_discuss/thread/21ece8aec1/f7e3/5aa0/attachment/yad-7.3-size-request.patch

buc-me avatar Nov 23 '20 19:11 buc-me

Yes, works for me. What exactly was commit 8442c52a2048e85e410eb8945641222eb0b9dc34 supposed to fix?

eworm-de avatar Nov 23 '20 19:11 eworm-de

I believe this one: https://sourceforge.net/p/yad-dialog/tickets/322/

buc-me avatar Nov 23 '20 19:11 buc-me

Any news on this one? Is there a reason this is not committed?

eworm-de avatar Dec 16 '20 20:12 eworm-de

Still an issue in version 8.0...

eworm-de avatar Feb 17 '21 19:02 eworm-de

Still an issue in version 8.0...

Yes,

sarether avatar Feb 18 '21 17:02 sarether

So what can we do to get the patch merged? it is working and we do not see other issues with usage of patched version: EndeavourOS welcome YAD At EndeavourOS ISO we would like to see this solved as it is confusing users a lot and simply looking screwed ;)

@v1cont

Tested with latest Version and the pach: https://github.com/killajoe/yad-patched

killajoe avatar Mar 14 '21 10:03 killajoe

please use --text-width option with long strings in dialog's text

v1cont avatar Mar 16 '21 12:03 v1cont

Using --text-width results in just reducing the issue or unnecessarily wide windows. But the results are not perfect and this is far from intuitive.

What's wrong with applying the changes?

eworm-de avatar Mar 16 '21 14:03 eworm-de

Hi all,

Yet another patch which should fix the issue and the same time allow shrinking of the normal dialogs, see on the old site: https://sourceforge.net/p/yad-dialog/tickets/322/#6f2d

buc-me avatar Mar 17 '21 22:03 buc-me

Please, test whether this new patch resolves your issue(s), https://sourceforge.net/p/yad-dialog/tickets/_discuss/thread/21ece8aec1/6f2d/attachment/yad-github-issue-107.patch

buc-me avatar Mar 17 '21 22:03 buc-me

may a stupid question... but why there is "on the old site" at Sourceforge where Last Update: 2017-11-18 and latest version of YAD is: yad-0.40.0.tar.xz while here at GitHub we have: yad-9.1.tar.xz ... then i see a message with a "new" patch for version 8.0 ... Very confusing ;)

killajoe avatar Mar 18 '21 00:03 killajoe

Johannes Kamprad wrote:

may a stupid question... but why there is "on the old site" at Sourceforge where Last Update: 2017-11-18 and latest version of YAD is: yad-0.40.0.tar.xz while here at GitHub we have: yad-9.1.tar.xz ... then i see a message with a "new" patch for version 8.0 ... Very confusing ;)

In short: just habits. Someone starts years ago, and still feel more comfortable with SF, especially for occasional participation.

Plus such a people often use "oldschool" browsers (palemoon, seamonkey), which github dislikes (without any objective reasons for this).

For clarity, a counter "stupid" question :) -- Why you use shell+yad, whereas the use of, say, python for the same purpose is much more power? And it seems so easy for modern advanced developer to learn python... Answering this, you will answer your initial question too. ;)

buc-me avatar Mar 18 '21 16:03 buc-me

Sorry for asking, but i am still confused about the relation between GitHub and Sourceforge repositories and versions used. But i will be calm now. It was not my intention to step on your feet.

killajoe avatar Mar 18 '21 17:03 killajoe

Johannes Kamprad wrote:

 i am still confused about the relation between GitHub and Sourceforge repositories and versions used.

Well, the old SF repo seems just stalled on 0.40, without a proper mention that the project had been moved to github. Thus some distribution even are not aware of it and still continue to provide 0.40 only. :(

Once seeing a mention of newer versions somewhere in SF bugs, I guessed that the project had moved to github.

Many projects, initially being on SF, now are moved to github or gitlab. Some of them completely forget about SF, but some still use SF for "traditional" maillists and bug tracking, and update both sites properly. So it is not abnormal to still use SF nowadays, which I prefer to do for some reasons too.

buc-me avatar Mar 18 '21 17:03 buc-me

same issue with Notepads...specifying the --height option doesn't affect the sizing of the window created. tested version 7.3 and 9.1

mackendw avatar Apr 02 '21 20:04 mackendw

Please, test whether this new patch resolves your issue(s), https://sourceforge.net/p/yad-dialog/tickets/_discuss/thread/21ece8aec1/6f2d/attachment/yad-github-issue-107.patch

Yes, it does. With this applied the window is sized as expected.

eworm-de avatar Apr 05 '21 21:04 eworm-de

This is not true... (But looks like you noticed yourself.)

With this command...

yad --info --title "$(yad --version)" --no-markup --text "$(ip addr show)" --button=Close

... the result looks still bad with yad 10.1: Screenshot_2021-11-24_09-54-33

eworm-de avatar Nov 24 '21 08:11 eworm-de

This is not true... (But looks like you noticed yourself.)

I forgot that I patched YAD.

sarether avatar Nov 24 '21 09:11 sarether

Any upstream news on this? Would be nice if I could drop my custom rebuild.

eworm-de avatar Nov 29 '21 20:11 eworm-de

Still an issue with version 11.0... Any reason nothing happens here?

eworm-de avatar Mar 02 '22 15:03 eworm-de

did you see the news of last week? i was born in kiev, i live in kiev and i will die here. is that enough this reason?

v1cont avatar Mar 02 '22 15:03 v1cont

Sure I did see the news. And I am with you. All the best to you and the people in the Ukraine.

But this issue exists since October 2020 and has been present in a number of releases. Even patches are around. So this could have been fixed before Putin went mad (or at lease before he went that mad).

eworm-de avatar Mar 02 '22 16:03 eworm-de

@eworm-de I am really, really sorry, but that's a terrible thing to say to someone in a warzone. He clearly has more important things to worry about and it's not his fault. YAD is an excellent piece of software and it's painful to see it affected by war, but right now I'm more concerned about the developer and his loved ones.

If things to back to normal, open a pull request since you said you have a custom build, that'll help fix things for everyone and take a load off the dev's back.

magpie514 avatar Mar 05 '22 18:03 magpie514

it's all right. now i staying in reserve for territorial defense forces and waiting for rotation. so i have some free time. the goals of last release was primary political and ethical, not technical. main reason was drop the russian translation from yad. as for issue there must be an algorithm for calculating the text dimensions which i cannot implement right now. but i promise i'll implement it as soon as possible

v1cont avatar Mar 09 '22 13:03 v1cont

i will not apply this fix because it makes yad impossible to reduce it's width

feel free to patch yad by themselves, or use combination of --width, --text-width and --fixed options

v1cont avatar May 03 '22 08:05 v1cont