1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

display of license text fixed in android

This commit is contained in:
lufebe16 2023-12-28 12:11:16 +01:00
parent 20e0de112f
commit 49d4445c6b
2 changed files with 13 additions and 4 deletions

View file

@ -38,6 +38,7 @@ from kivy.graphics import Color
from kivy.graphics import Line
from kivy.graphics import Rectangle
from kivy.graphics import Triangle
from kivy.graphics import Callback
from kivy.properties import NumericProperty
from kivy.properties import StringProperty
from kivy.uix.actionbar import ActionButton
@ -1935,13 +1936,13 @@ class LApp(App):
# für hintrgrund und resume. Diese funktioneren gemäss logcat
# einwandfrei. Daher versuchen wir ... um den graphik context
# wieder zu aktivieren/auszurichten:
Clock.schedule_once(lambda dt: Window.update_viewport(), 2.0)
# (Es gibt auch Beispiele in den kivy issues die nahelegen, dass
# das nützlich sein könnte)
Clock.schedule_once(lambda dt: Window.update_viewport(), 3.0)
# fazit: schwarzer screen trotzdem gelegentlich wieder beobachtet.
Clock.schedule_once(lambda dt: self.mainWindow.rebuildContainer(), 4.0)
# Pause modus abschalten nach resume:
if app.game.pause:
Clock.schedule_once(self.makeEndPauseCmd(app), 3.0)
Clock.schedule_once(self.makeEndPauseCmd(app), 5.0)
def makeEndPauseCmd(self, app):
def endPauseCmd(dt):

View file

@ -569,6 +569,14 @@ class HTMLViewer:
# self.app.game._cancelDrag()
# pass
# this is a workaround for android: Small devices cannot
# render the whole text into a label ... and Android does not
# allow local files be displayed in the local browser. The
# simplest way is to take it from the original web site.
if get_platform() == 'android':
if os.path.basename(url) == 'license.html':
url = 'https://www.gnu.org/licenses/gpl-3.0-standalone.html'
# ftp: and http: would work if we use urllib, but this widget is
# far too limited to display anything but our documentation...
for p in REMOTE_PROTOCOLS: