-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
[widget audit] toga.MultilineTextInput #1938
Changes from 26 commits
5cac536
5429acc
c0cf0f3
cc80700
8fa3aa9
9096f52
cf9da9c
5800c40
6a5be8a
d89e49c
2f8f214
7aea2d0
7fceda3
ead982d
43759f9
c763aa9
4cdab2c
ff27cde
e636a1f
98343dc
375d26c
8ef583d
838c6e4
6dff342
80ea9f6
b3b8ed3
cbe63ec
9eec789
2ff9920
08c8d50
e379547
5db4c77
be9ca2f
07abb24
e9132f0
df00658
bb71950
3ad5352
e687898
4ca8a9b
87fffda
fee4bb6
9f871ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
from android.os import Build | ||
|
||
from .base import SimpleProbe | ||
from .properties import toga_alignment, toga_color, toga_font | ||
from .properties import toga_alignment, toga_color, toga_font, toga_vertical_alignment | ||
|
||
|
||
class LabelProbe(SimpleProbe): | ||
|
@@ -31,3 +31,7 @@ def alignment(self): | |
None if Build.VERSION.SDK_INT < 26 else self.native.getJustificationMode() | ||
) | ||
return toga_alignment(self.native.getGravity(), justification_mode) | ||
|
||
@property | ||
def vertical_alignment(self): | ||
return toga_vertical_alignment(self.native.getGravity()) | ||
Comment on lines
+35
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will have to be implemented by the other backends. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've done this for iOS, Cocoa, GTK and Winforms; although for iOS and Cocoa, it's a bit of a non-test because there's literally no property to inspect to verify vertical alignment - it's just what the widget does (or, in the case of iOS Label, what the widget has been overridden to do). |
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.
Because of the getLayoutParams issue, this code was never previously running during widget creation. It turns out WebView doesn't even have a setGravity method.
It doesn't make any sense for WebView to support alignment anyway, so I've just removed the method.