-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Document window and panel window should have a minimum width. #998
Comments
Reviewed |
Is there any particular value in doing this? If the user doesn't want their window very tiny, they won't resize it to be that small -- and conversely, if the user explicitly wants a window or panel very small for some reason, why shouldn't we let them do that? Most other apps don't seem to restrict window size, at least. |
One reason is that making either the editor or sidebar width to be less than a certain threshold causes layout to reflow in ridiculous ways. The sidebar is no longer too bad in this regard, but the editor header gets really bad. Another reason is that after sizing some views to zero, the thing you grabbed to size them down is no longer there to size them back up. |
Actually, many of the apps on my Mac have a minimum horizontal window size--Chrome and Sublime both do, for example. I think it's reasonable to have a small but non-zero minimum. |
@peterflynn was reviewing a pull request (adobe/brackets-shell#193) that implemented this, so re-assigning to him. |
has this been fixed? It seems there is a min width, but that does not include the document window. If this is still open I'd like to have a crack at it. |
Nope, hasn't been fixed yet. This would need to be fixed in the native shell, I believe. @larz0 might have an opinion about what the minimum window width should be. |
@njx Here are the various minimum sizes of various OS X apps. Brackets obviously needs a minimum size (window next to the Terminal). I recommend 600x360 which is close to the Messages app because Brackets has a sidebar. Thoughts? |
I see that mynetx has fixed this problem. He has set the min height and min width to 450 and 300. Was something wrong with his code or was it just not integrated into brackets? His fix is below. |
Fwiw, I'd vote for a lower minimum. To me it feels heavy-handed to physically prevent users from ever resizing a window below 600px wide. Especially on a laptop screen, that's not all that narrow. Maybe this is a difference in Mac/Win platform expectations, but on Windows I feel like most apps don't restrict window size so heavily. I can resize Outlook down to 135x150; Chrome goes down to 193x113; Notepad goes down to a miniscule 131x38; and folder windows go down to 160x240. The Reflow window in the screenshot above goes down to 375x202; they have a sidebar and are a close cousin to Brackets/Edge Code, so we could follow that precedent. |
@peterflynn 375x202 sounds good. |
fwiw this seems to be more of a Mac thing than a Windows thing. Here is a quick result from my testing of what I consider "common" or "popular" Windows apps. Tested on Windows 7
So the only one that won't let you shrink to nothing or a very small size is... an Apple product ;) BTW, I think this might have been fixed and not closed because on Windows 7 with Sprint 37, I get a min window size for Brackets of: 390x200 Personally, this seems like it could be even smaller or none but it's not terrible the way it is. |
Closing since it appears that the new dark shell already enforces the bounds the way we want -- @M0J0R1S1NG & @basarat, thanks for confirming! |
Steps to reproduce:
1 Open Brackets
2 Grab the frame in order to resize the app window.
3 Minimize the width
Results:
Minimum width obviously is set by native controls (Mac), the document window can completely disappear, which doesn't seem useful. I'm on the fence whether this should be medium or low priority, set it as low priority for now.
Expected: I'm not sure.
Should we at least show the menu in a single line? A minimum height may also be useful.
The text was updated successfully, but these errors were encountered: