-
-
Notifications
You must be signed in to change notification settings - Fork 669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix minimum size in gtk backend #1293
Closed
MuhammadMuradG
wants to merge
25
commits into
beeware:master
from
MuhammadMuradG:fix-mim-size-in-gtk-backend
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
11c49ee
Draw the structre of how the min_width will update
4d1f266
Debug the code
62d6de5
Debug the code
33079ec
Implement the min_width of gtk backend
f08a2cc
Implement min_height of the gtk backend
8f3ccdb
Implement min_height of the gtk backend
5e0ec09
Fix the style to be flex SpliterContainer in examples_overview example
8c32850
Showing window after setting layout in gtk backend
44c3294
flake8 formating
da0fdf8
flake8 line length formating
7506d2b
flake8
2253838
Enhance code by removing redundant cases
21d7148
Handle edge cases for some widget that does not has interinsic size
5666de1
Flake8::fix line missing indentation
ec8c6fc
Flake8::fix do not use bare 'except'
e33eead
fix typos
d05711a
Fix if conditions indent
0a3f4d7
Flake8::fix continuation line under-indented
b7aa08b
Fix typo
MuhammadMuradG 2585adb
Gtk backend::Fix minimum width of numberinput that used in rehint
b9ee171
Gtk backend::Fix minimum width of Selection widget that used in rehint
4deda0d
Gtk backend::Rehint widget before calculate its min width
67f2719
Gtk backend::Handle some edge cases in Box widget; when Box has speci…
ad3eb2c
Flake8::fix continuation line under-indented
0a53bfa
WARNING::Revert to correct platfore
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear why you've made this change. The old layout should be sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The structure of the app is as following:
outer_box
|...Label
|...SpliterContainer
|...|...left_box (Box widget)
|...|...|...table (Table widget)
|...|...|...button_box (Box widget has 2 button)
|...|...info_view (MultilineTextInput widget)
Are we need to tell the
SpliterContainer
to occupy available space ofouter_box
? Why it will occupy available space without specifyflex=1
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not as straightforward as that.
outer_box
is also the main content of the window, and the layout must conform to the height of the window. The only content in the box is a label and a splitter container, and of those two, label has a fixed height. As a result, the splitter will must absorb all the remaining height.flex=1
should have no effect here - there no ambiguity over where the expansion weight can go.By way of (weak) proof - macOS and Windows both render this layout the same, and adding flex=1 changes nothing.
There is perhaps a design argument to be made that the interaction between outer_box and window size, and whether it should be possible to specify a window axis size of "None" that causes the window to conform to the minimum possible size; but that's definitely in territory of "feature", rather than "bug".