Replies: 18 comments 20 replies
-
I will look into this soon. |
Beta Was this translation helpful? Give feedback.
-
You can specify a minimum default size for the window by setting the func main() {
b := gi.NewAppBody("My App")
b.Style(func(s *styles.Style) {
s.Min.Set(units.Dp(500), units.Dp(300))
})
b.NewWindow().Run().Wait()
} |
Beta Was this translation helpful? Give feedback.
-
Thanks you. |
Beta Was this translation helpful? Give feedback.
-
func main() {
b := gi.NewAppBody("My App")
b.Style(func(s *styles.Style) {
s.Min.Set(units.Dp(500), units.Dp(300))
})
w := b.NewWindow()
w.SetFullWindow(true)
w.Run().Wait()
} The setting size and full screen still do not take effect, the first run takes effect, the subsequent run is still a small window, and w.SetFullWindow(true) cannot be full screen |
Beta Was this translation helpful? Give feedback.
-
Maybe I don't understand what you mean, setting the minimum value of the body style to resize the main window has always succeeded once, and each subsequent one has failed. As for the full-screen scenario, there are these: packet grabbers, debugger programs, etc., which require large windows or even DND mode. |
Beta Was this translation helpful? Give feedback.
-
It will be triggered as soon as the window is closed, and it will be triggered every time.
…---Original---
From: ***@***.***>
Date: Sat, Feb 10, 2024 14:38 PM
To: ***@***.***>;
Cc: ***@***.***>;"State ***@***.***>;
Subject: Re: [cogentcore/core] Window size (Discussion #795)
What did you do that led to this panic? Is it reliably reproducible?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Whether it's the close button in the top right corner or the taskbar right-click close, it's triggered by any application. Why do you think the security check I suggest will never happen?
https://github.com/uber-go/nilaway
#858
…---Original---
From: ***@***.***>
Date: Sat, Feb 10, 2024 14:48 PM
To: ***@***.***>;
Cc: ***@***.***>;"State ***@***.***>;
Subject: Re: [cogentcore/core] Window size (Discussion #795)
How are you closing the window? It does not panic for me when I close it using the Close window button in the taskbar context menu. Does it still crash for you when you are not using the debugger? Does it still crash for you when closing the demo, or only when closing this specific app?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
It's the same when running outside of goland, for nilaway, I reported to you a null pointer scan in the discussion forum a long time ago, and I'm using it to check my golibrary repositories, as well as other repositories
#745
…---Original---
From: ***@***.***>
Date: Sat, Feb 10, 2024 14:57 PM
To: ***@***.***>;
Cc: ***@***.***>;"State ***@***.***>;
Subject: Re: [cogentcore/core] Window size (Discussion #795)
I will look more into the possibility of using nilaway. Can you please answer whether this happens when running an app normally outside of GoLand? Also, can't you try running nilaway on the codebase and informing me of any errors that are produced?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Run the hello example code of code directly to reproduce it
…---Original---
From: ***@***.***>
Date: Sat, Feb 10, 2024 14:38 PM
To: ***@***.***>;
Cc: ***@***.***>;"State ***@***.***>;
Subject: Re: [cogentcore/core] Window size (Discussion #795)
What did you do that led to this panic? Is it reliably reproducible?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I fixed the window closing crash in 13d8db3. |
Beta Was this translation helpful? Give feedback.
-
The full screen finally worked, and the setting size still didn't work |
Beta Was this translation helpful? Give feedback.
-
I didn't pay attention to the zoom value under the Windows system settings before,When you asked me to check, I also saw that it was 200%,Generally speaking,100% should be the default value,I don't know if it's automatically set by the Win11 system or Huawei PC Manager is set to such a value when installing the driver。 So my initial idea was the same as you described, and it was normal to change 200% to 100%, but when I adjusted it to 100%, the whole window was quite small, and all the widgets on it were only the size of bees, which was too small. Another reason is as I described on AnyDesk before: I have also tested on Android phones, compared to tablets, the default display parameters of various systems of Android phones are stable, and I have not changed them, but it is also very large on Android phones, I have compiled 6 apks to test, and each apk has to be adjusted once zoom, otherwise it will not work. If I want, I can record a video for the troubles on Android to demonstrate that all 6 apks need to do this. At this point, my suggestion is still described in Anydesk: It's too troublesome to investigate this confusion, please give me a way to set the zoom and space of the current app in the main function, and I will manually set it in the main function of each app.
…---Original---
From: ***@***.***>
Date: Mon, Feb 12, 2024 08:53 AM
To: ***@***.***>;
Cc: ***@***.***>;"State ***@***.***>;
Subject: Re: [cogentcore/core] Window size (Discussion #795)
I did the math, and it seems like the app is scaled correctly on your device; it is just big because you have a scale factor of 200% set in your Windows settings. You can either decrease the scale factor in your Windows settings or in your Cogent Core settings, as you have done. If you have any other window sizing or scaling issues, please let me know.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
In addition, setting the window size still doesn't work, yesterday on anydesk we didn't change the width and height value to test, after updating your submission, no matter what the size of the set width and height value is, this window is large and has not changed
…---Original---
From: ***@***.***>
Date: Mon, Feb 12, 2024 08:53 AM
To: ***@***.***>;
Cc: ***@***.***>;"State ***@***.***>;
Subject: Re: [cogentcore/core] Window size (Discussion #795)
I did the math, and it seems like the app is scaled correctly on your device; it is just big because you have a scale factor of 200% set in your Windows settings. You can either decrease the scale factor in your Windows settings or in your Cogent Core settings, as you have done. If you have any other window sizing or scaling issues, please let me know.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I just updated your submission today.,It's normal on Windows.,Yesterday no matter how you dragged the window to resize.,It's big to run again.,Today I can actually save the size of the dragged or full screen.,Windows is finally normal.,Thank you.。 Wait for me a minute I'll set up the SDK and compile the apk test, haven't refreshed the apk for a long time
…---Original---
From: ***@***.***>
Date: Mon, Feb 12, 2024 10:25 AM
To: ***@***.***>;
Cc: ***@***.***>;"State ***@***.***>;
Subject: Re: [cogentcore/core] Window size (Discussion #795)
Can you send me a screenshot of the demo on an Android device with default 100% zoom, and then a screenshot of some other standard app with similar widgets on the same device? It does not make any sense to manually set the settings in the main function; if there is something wrong with our sizing, we need to fix it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Tested the latest submission and the apk is back to normal, thank you
…---Original---
From: ***@***.***>
Date: Mon, Feb 12, 2024 10:25 AM
To: ***@***.***>;
Cc: ***@***.***>;"State ***@***.***>;
Subject: Re: [cogentcore/core] Window size (Discussion #795)
Can you send me a screenshot of the demo on an Android device with default 100% zoom, and then a screenshot of some other standard app with similar widgets on the same device? It does not make any sense to manually set the settings in the main function; if there is something wrong with our sizing, we need to fix it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I seem to see a way to set the window size in the goosi driver window object, but the goosi window interface doesn't seem to provide the signature. In general, every app should have a way to set the size, but at the moment I haven't found this method, if there is a way to set the size of the main window, please let me know, if not, whether it is allowed to add a window interface signature to operate it.
Beta Was this translation helpful? Give feedback.
All reactions