You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the ScrollContainer is in nested boxes, it will display incompletely at the first time. It will become normal after its father box is added again into the grandparent box. And when maximum the window, the ScrollContainer will not change accordingly.
As the code shows, currently Box.clear() cannot work and the interim measure is using remove() method to remove children one by one.
open_file_dialog does not work on Android
There seems to be no function in toga to obtain resolution. However, if using pyautogui and screeninfo, when running on Android, the program will raise the following errors in terminal respectively:
(iResolutionWidth, iResolutionHeight) = pyautogui.size() # raise Error: com.chaquo.python.PyException: KeyError: 'DISPLAY'
ResolutionWidth = get_monitors()[0].width #raise Error: com.chaquo.python.PyException: DisplayConnectionError: Can't connect to display ":0": [Errno 2] No such file or directory
When a switch is used to control the display of a box, I want to let the initial value as False, in other words, the target box should be hidden at the first. However, the initial value is set as False, but the box is still visible
Steps to reproduce
Issue 1:
The part of definition
`
self.boxEditCardBody = toga.Box(style = Pack(direction = COLUMN, flex = 1))
The callback function def cbAddACardOnPress(self, widget): while len(self.boxBody.children) != 0: self.boxBody.remove(self.boxBody.children[0]) self.boxBody.add(self.boxEditCardBody) while len(self.boxBody.children) != 0: # A BUG: It must be execute twice at the first time, or the scrollcontainer opened at the first time could be incomplete self.boxBody.remove(self.boxBody.children[0]) self.boxBody.add(self.boxEditCardBody)
Issue 5:
The part of definition
`
boxRow2_wndAddCard = toga.Box(style = Pack(direction = COLUMN, flex = 1, padding_top = 5))
self.chkEnableBack_wndAddCard = toga.Switch("", value = True, on_change = self.cbEnableBack)
# There is a bug that if initial value is False, the boxRow3 should be hidden but will still be visible on the condition of visibility = HIDDEN
boxRow2_wndAddCard.add(
self.chkEnableBack_wndAddCard
)
I believe 1, 2 and 5 have been fixed as part of our widget audit; the fixes are all in the main branch, and will be in the next release.
3 isn't a bug - it's a feature that hasn't been implemented. File access is complicated on Android; it's not as simple as just opening a file. See #1158 for an initial attempt at an implementation, and a discussion of the complications.
4 is also a feature request; we have an implementation in development (nearing completion) in #1930. There's no chance at all that pyautogui will work on Android (at least at present), because the code for pyautogui assumes that it's running on a desktop machine, so it will be looking for XWindows APIs to determine screen size - something that isn't present on Android.
On an administrative note - If you've found 5 problems, it's much more helpful to open 5 individual tickets. That way, the discussion about reproducing problem 5 won't get tied up in the discussions around the requirement of feature 3.
On the basis that all the issues you've raised have either been resolved, or aren't bugs as you've described them, I'm going to close this ticket.
If you're able to reproduce problems 1, 2 or 5 with the current main branch of Toga, please open individual tickets with reproduction instructions.
Describe the bug
As the title says:
(iResolutionWidth, iResolutionHeight) = pyautogui.size() # raise Error: com.chaquo.python.PyException: KeyError: 'DISPLAY'
ResolutionWidth = get_monitors()[0].width #raise Error: com.chaquo.python.PyException: DisplayConnectionError: Can't connect to display ":0": [Errno 2] No such file or directory
Steps to reproduce
Issue 1:
The part of definition
`
self.boxEditCardBody = toga.Box(style = Pack(direction = COLUMN, flex = 1))
The callback function
def cbAddACardOnPress(self, widget): while len(self.boxBody.children) != 0: self.boxBody.remove(self.boxBody.children[0]) self.boxBody.add(self.boxEditCardBody) while len(self.boxBody.children) != 0: # A BUG: It must be execute twice at the first time, or the scrollcontainer opened at the first time could be incomplete self.boxBody.remove(self.boxBody.children[0]) self.boxBody.add(self.boxEditCardBody)
Issue 5:
The part of definition
`
boxRow2_wndAddCard = toga.Box(style = Pack(direction = COLUMN, flex = 1, padding_top = 5))
self.chkEnableBack_wndAddCard = toga.Switch("", value = True, on_change = self.cbEnableBack)
# There is a bug that if initial value is False, the boxRow3 should be hidden but will still be visible on the condition of visibility = HIDDEN
boxRow2_wndAddCard.add(
self.chkEnableBack_wndAddCard
)
The callback function
def cbEnableBack(self, widget):
if widget.value == True:
self.boxRow3_wndAddCard.style.update(visibility = VISIBLE)
else:
self.boxRow3_wndAddCard.style.update(visibility = HIDDEN)
`
Expected behavior
Waiting for the solutions
Screenshots
No response
Environment
Logs
Additional context
No response
The text was updated successfully, but these errors were encountered: