Open core-ai-bot opened 3 years ago
Comment by peterflynn Monday Mar 24, 2014 at 21:18 GMT
@
fxb Would you be interested in putting up a pull request for this?
We know we eventually want to migrate to a newer Visual Studio version for building brackets-shell, and in the meantime this may fix some window-drawing issues for users with custom window border sizes (as in #6801)...
Comment by JeffryBooher Monday Mar 24, 2014 at 21:26 GMT
I think the gyp files will also need to be patched to generate VS2013 and VS2012 solution files. Some of the work may have been done already by Marshall (http://www.magpcss.net/cef_downloads/) but, since our gyp files aren't direct descendents of the cef test app's gyp files, it may require some massaging.
Ultimately we probably won't take a fix for supporting VS2012/2013 without a grunt
script that can generate build solution workspace files so that we can test this. furthermore, we need to be able to build from the command line (i.e. no UI to convert the project files, etc..)
My suggestion would be to first put up a pull request to generate the VS2012/VS2013 workspace solutions from gyp
then put up another pull request to fix the border issue
Comment by fxb Monday Mar 24, 2014 at 22:18 GMT
Yes. I was just opening the solution in VS2013, it got converted, and I changed the platform toolset. It makes sense to get proper project generation in place first. In the case that Marshall needs to change anything, I can poke him next Monday. We actually work together :-)
I noticed that there are some more cases where borders seem to be too thin. For example when the window is maximized. It might take some time to find out how exactly these borders shall be calculated. The above code only fixed one of those.
Comment by JeffryBooher Wednesday Mar 26, 2014 at 16:14 GMT
@
fxb that's great. Can you post some screen shots of where the border is too thin? Technically there shouldn't be a left or right border when maximized just a title bar. I remember early on when I wrote the aero implementation I did compute border width as mNcMetrics.iBorderWidth + mNcMetrics.iPaddedBorderWidth
and it was too thick compared to VS2013's look. FWIW I'm running on Windows 8 but it seemed to look the same on Windows 7. Also compare it to Office 2013.
Issue by fxb Friday Mar 21, 2014 at 20:45 GMT Originally opened as https://github.com/adobe/brackets/issues/7288
I found that when compiling with VS2013 (platform toolset "v120"), the NONCLIENTMETRICS structure receives a iBorderWidth value of 1 and an iPaddedBorderWidth value of 4. These should be combined to get the total padded border width of 5 and make it look good.
On the other hand, when compiling with VS2010, iBorderWidth is set to 5 and iPaddedBorderWidth is set to 0.
Experimenting with VS2013, the VS2010 behavior can be achieved when linking with "/subsystemversion:5.01" or changing the platform toolset to "v120_xp".
From msdn.microsoft.com - NONCLIENTMETRICS structure (Windows):
When calling SystemParametersInfo on Windows Vista or greater, include the iPaddedBorderWidth member of the NONCLIENTMETRICS structure:
Whenever iBorderWidth is used, combine it with iPaddedBorderWidth.
should be changed to