--text and --text-info windows do not size properly
I wrote most of the following as a reply to a similar, and possibly related, bug report. But while I thought this was reported long ago, when I looked I couldn't find it. So, maybe this is redundant, maybe not. These issues have been around a while and worked the same way on previous hardware setups and previous operating systems so it is not unique to a plain Openbox "DE" (if you want to call it that) under Ubuntu 18.04, nor to dual monitors or large monitors. But, for context:
$ xrandr |grep ''
1366x768 60.02+ 40.01
3840x2160 30.00*+ 25.00 24.00 29.97 23.98
The small monitor is built in to my laptop. The larger, on the second line, is primary, and where all of these examples are happening.
yad --width=3800 --posx=1 --posy=1 --text="sssss ssssss" works exactly as it should
yad --width=3800 --posx=1 --posy=1 --text="sssss ssssss sss" adds empty vertical space below the text, like additional blank lines or invisible space characters making the window bigger than it needs to be.
Constraining such invocations with the --height=n option has no effect. So yad --width=3800 --height=15 --posx=1 --posy=1 --text="sssss ssssss sss" still shows the extra vertical space.
The longer the text, the larger the amount of useless space added is and the larger the RATIO of empty space to text grows. This, with the --height option at 15 as shown, or at 1500, or with no height option, all have the same effect- the yad window will have far more empty space than text, so much that the buttons are below the bottom edge of my monitor and can only be seen or clicked by dragging the window up.: yad --width=3800 --posx=1 --posy=1 --height=15 --text="sssssssssssss ssssssssssss sssssssssssssssss ssssssssssssssssssss sssssssssssssss sssssssssssssssssssss ssssssssssssssssssss sssssssssssssssss ssssssssssssssssss ssssssssssssssssssssss sssssssssssss ssssssssssss sssssssssssssssss ssssssssssssssssssss sssssssssssssss sssssssssssssssssssss ssssssssssssssssssss sssssssssssssssss ssssssssssssssssss ssssssssssssssssssssss sssssssssssss sssss sssss"
In contrast, using --text-info, also fails, but quite differently: $ echo "sssssssssssss ssssssssssss sssssssssssssssss ssssssssssssssssssss sssssssssssssss sssssssssssssssssssss ssssssssssssssssssss sssssssssssssssss ssssssssssssssssss ssssssssssssssssssssss sssssssssssss ssssssssssss sssssssssssssssss ssssssssssssssssssss sssssssssssssss sssssssssssssssssssss ssssssssssssssssssss sssssssssssssssss ssssssssssssssssss ssssssssssssssssssssss sssssssssssss sssss sssss" > temp $ yad --width=3800 --posx=1 --posy=1 --text-info --filename=temp The resulting window is 3800 in width as specified but the there are TWO problems with it:
- It is collapsed vertically showing only the title bar and buttons and the text is completely invisible. 2.I can resize the window by dragging down the bottom edge until the beginning of the text is visible, BUT it runs out of the box on the right edge and there is no scroll bar. Without the --width option, yad --posx=1 --posy=1 --text-info --filename=temp it's even worse. The window is collapsed vertically AND horizontally and is just big enough to show the default buttons. If I use the --no-buttons option yad --posx=1 --posy=1 --text-info --filename=temp --no-buttons it collapses a bit less vertically, showing the beginning of the text and one empty line below it, but collapses EVEN MORE horizontally, and is rendered just wide enough to show the close and maximize buttons in the title bar. If I add --undecorated yad --posx=1 --posy=1 --text-info --filename=temp --no-buttons --undecorated it doesn't shrink further though, apart from leaving off the title bar. Adding the --wrap option yad --width=3800 --posx=1 --posy=1 --text-info --filename=temp --wrap does, indeed, make the text wrap, but the window is still collapsed vertically, showing no text area at all. To see the text you have to manually resize the window. The only way around this is to force the height to a specified number, like this: yad --width=3800 --posx=1 --posy=1 --text-info --filename=temp --wrap --height=1500
In summary "--text" doesn't work worth a hoot with long text strings even if they are broken up into short words with spaces. And --text-info, in addition to being a lot more trouble to use, still ain't right, although you can force it to be good enough to be useful. This has been broken for a LONG time.
Perhaps you were thinking of #107?
The patch mentioned there doesn't apply cleanly to my fork so I doubt it can apply to 14.1. However, I was able to manually apply the text-label part of the patch to my fork, and I did see an improvement; no more extra vertical space for your test case above, and for the test case at https://github.com/v1cont/yad/issues/107#issuecomment-977666931.
yad --title "$(yad --version)" --no-markup --text "$(ip addr show)" --button=Close
Oh. Chagrin. Face palm. Or as we say in the deep south, Imaidgit. I'm in the wrong Github page? I'm using 0.38.2 (GTK+ 3.22.30), so it says. That's the latest in the Ubunru 18.04 repo. Are you saying I can get rid of this annoying error if I install yours? Is there a repo I can add or do I have to do it the hard way?
Don't sweat it. You're in the right page. It's only that your version is very old. My fork, the other "page", is a maintenance fork for the GTK2 and GTK3 0.x branch, something you won't find here anymore. No, you won't get rid of this annoying error if you install mine, at least not until I bake in the patch. Right now, I'm testing it in my private build. There is no Debian package repository for my fork; it's the hard compile way.
i'm in a front right now. sorry, but i cannot spend a lot of time to yad right now. three years for now, and, as i see this war - at least two years more. apologise one more time
10 липня 2025 р. 06:18:55 GMT+03:00, Lew-Rockwell-Fan @.***> пише:
Lew-Rockwell-Fan left a comment (v1cont/yad#300)
Oh. Face palm, or as we say in the deep south, Imaidgit. I'm in the wrong Github page? I'm using 0.38.2 (GTK+ 3.22.30), so it says. That's the latest in the Ubunru 18.04 repo. Are you saying I can get rid of this annoying error if I install yours? Is there a repo I can add or do I have to do it the hard way?
-- Reply to this email directly or view it on GitHub: https://github.com/v1cont/yad/issues/300#issuecomment-3055197647 You are receiving this because you are subscribed to this thread.
Message ID: @.***>
@v1cont no need for apologies, the war is causing colossal changes and levels of hardship that I cannot even begin to imagine. I am sorry. Good luck and stay safe if you can.