Window height failed to set or override the default height #58

Open
opened 2025-04-17 01:43:18 +02:00 by jj11 · 5 comments

Describe the bug

  • Currently I was trying to set window default window width and height but don't why is not working

To Reproduce

  • Just use the internal function called defaultSize

Expected behavior

  • The height of window should change, in my case I want it to be just 20 or 30

Additional context

image.png

### Describe the bug - Currently I was trying to set window default window width and height but don't why is not working ### To Reproduce - Just use the internal function called ```defaultSize``` ### Expected behavior - The height of window should change, in my case I want it to be just 20 or 30 ### Additional context ![image.png](/attachments/602e9542-fa41-404c-aa03-99468100736b)
244 KiB
jj11 added the
bug
label 2025-04-17 01:43:18 +02:00
Author

image.png

![image.png](/attachments/db24b30c-bddb-448d-b658-a6f3388cb983)
182 KiB
Author

So I was playing around with searchEntry and questioned that is there a way possible to increase window size dynamically? Like if we set the window size as default my guess is that we cannot changes it?

So I was playing around with searchEntry and questioned that is there a way possible to increase window size dynamically? Like if we set the window size as default my guess is that we cannot changes it?
Author

Plus I found out that if we set height below 100 it will not work, not sure why? I was resize the window using the mouse, got to know that there's a limit on width and height size.
image.png

Plus I found out that if we set height below 100 it will not work, not sure why? I was resize the window using the mouse, got to know that there's a limit on width and height size. ![image.png](/attachments/78597983-e399-4689-a1e2-730a2cc9cd17)
157 KiB
Owner

I believe all your observations are due to the same problem (right?):

Plus I found out that if we set height below 100 it will not work, not sure why? I was resize the window using the mouse, got to know that there's a limit on width and height size.

I found out that the window's width request is set to 360 and the height request to 200, on any window. Not sure where this comes from, but I'll look into this.

Like if we set the window size as default my guess is that we cannot changes it?

No, we can change it. Is it maybe the limit that you described in your last post that is the problem here?

I believe all your observations are due to the same problem (right?): > Plus I found out that if we set height below 100 it will not work, not sure why? I was resize the window using the mouse, got to know that there's a limit on width and height size. I found out that the window's width request is set to 360 and the height request to 200, on any window. Not sure where this comes from, but I'll look into this. > Like if we set the window size as default my guess is that we cannot changes it? No, we can change it. Is it maybe the limit that you described in your last post that is the problem here?
Owner

It seems that the 360x200px minimum size is set automatically by libadwaita or GTK, which is a reasonable size for most use cases and prevents empty windows from crashing the whole app. I added the minSize(width:height:) modifier that you can use the customize the minimum height and set it to 20-30. Could you let me know whether this solves the previous problems?

It seems that the 360x200px minimum size is set automatically by libadwaita or GTK, which is a reasonable size for most use cases and prevents empty windows from crashing the whole app. I added the [`minSize(width:height:)`](https://adwaita-swift.aparoksha.dev/documentation/adwaita/window/minsize(width:height:)) modifier that you can use the customize the minimum height and set it to 20-30. Could you let me know whether this solves the previous problems?
Sign in to join this conversation.
No Milestone
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aparoksha/adwaita-swift#58
No description provided.