• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D Design & Development v
1 2 3 4 5 … 11 Next »
Set Window Size - plugin

 
  • 0 Vote(s) - 0 Average
Set Window Size - plugin

micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,681
Threads: 185
Joined: Jun 2012
#1
02-20-2025, 07:03 PM
It has been very annoying to have to adjust the window size when I want to share it on social media before using the Print Screen command. So, I decided to create a plugin to choose or set a dimension for a window.

The option will be added to Tools menu, just bellow to the Screenshot... option.

The dialog will allow us to choose between the Main window and any other floating/undocked window.
[Image: Set-Window-Size.png]

But, not everything is perfect and for some unknow reason setting a window's size and getting its value are not matching with the dimension we get after past it on Paint (for instance). It becomes a little small with a difference of -14px x -7px (WxH) - at least on Windows OS.

Link for download: wpc_tools_win_resize.tar
[Image: tw.png] @MicheusVieira [Image: yt.png] @MicheusVieira [Image: da.png] Micheuss [Image: ig.png] micheus4wings3d
* Wings3D Team stands for: Björn and Dan
edb
Offline

Member

Posts: 135
Threads: 16
Joined: Nov 2022
#2
03-02-2025, 09:53 PM (This post was last modified: 03-02-2025, 09:53 PM by edb.)
Hello micheus,

micheus Wrote:setting a window's size and getting its value are not matching with the dimension we get after past it on Paint (for instance).

The same occurs here (in windows 11): 14px by 7px. I wonder if it is wxWidgets or windows API.
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,681
Threads: 185
Joined: Jun 2012
#3
03-02-2025, 10:06 PM
I have no clue from where this is coming. I still need to check on Linux, but no much free time now to "debug" things like this. So, I just leaved it this way because it was not possible to find a safe workaround. The amount can change if using screen scaling (if I'm not wrong).
[Image: tw.png] @MicheusVieira [Image: yt.png] @MicheusVieira [Image: da.png] Micheuss [Image: ig.png] micheus4wings3d
* Wings3D Team stands for: Björn and Dan
edb
Offline

Member

Posts: 135
Threads: 16
Joined: Nov 2022
#4
03-02-2025, 10:23 PM
Hello micheus,

I notice that when I bring the cursor towards the window, it becomes a resize cursor up to about 7 pixels on the left, bottom and right (but not the top, it starts at the title bar).

It might be that the window borders for (some?) apps in recent windows versions is invisible, and setSize sets the size of this window with its decoration, which would have been a thick border in older windows but is now transparent.

It might help to compensate by adding the extra decoration border thickness into setSize, then the window will be a little bit bigger.

The size of the (invisible) border can found with wxSystemSettings::GetMetric() I think:

https://erlang.org/documentation/doc-16-...etMetric/1

Probably wxSYS_EDGE_X and wxSYS_EDGE_Y will contain the information.

https://docs.wxwidgets.org/3.2/settings_...ac6f273cc4
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,681
Threads: 185
Joined: Jun 2012
#5
03-02-2025, 10:34 PM
I just noticed - using my notebook - after my wife had changed the theme setting that it comes from that. Using the windows contrast themes it returns the correct dimensions.
[Image: tw.png] @MicheusVieira [Image: yt.png] @MicheusVieira [Image: da.png] Micheuss [Image: ig.png] micheus4wings3d
* Wings3D Team stands for: Björn and Dan
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode