Closed AccelQuasarDragon closed 10 months ago
old ver=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=
python amazingdancestar.py -m screen:s3
density
is a :class:~kivy.properties.AliasProperty
and can be
set to change the value. But, the :attr:density
is reloaded and reset if
we got it from the Window and the Window density
changed. https://github.com/kivy/kivy/blob/master/kivy/metrics.py#L250C12-L250C12[ ] answer (workaround):
cpdef float dpi2px(value, str ext) except *:
"""Converts the value according to the ext."""
# 1in = 2.54cm = 25.4mm = 72pt = 12pc
if g_dpi == -1:
dispatch_pixel_scale()
cdef float rv =
from kivy.modules import inspector
button = Button(text="Test")
inspector.create_inspector(Window, button)
\_MEI191442\fastcvapp\fastcvapp.pyc
\_MEI191442\fcvautils.py
import fastcvapp.fcvautils
fprint("does fcva utils work in pyinstaller env???", fastcvapp.fcvautils.__file__)
789f0589d8e7
I got "unable to provide window provider..." solution here:# self.font_path = os.path.join(this_dir, "fonts", "materialdesignicons-webfont.ttf")
# fprint("what is fontpath??", self.font_path)
# Clock.schedule_once(self.updateRepeatButtonID, 0)
# Clock.schedule_once(self.updatevolumeLabelID, 0)
density
is a :class:~kivy.properties.AliasProperty
and can be set to change the value. But, the :attr:density
is reloaded and reset if we got it from the Window and the Windowdensity
changed. https://github.com/kivy/kivy/blob/master/kivy/metrics.py#L250C12-L250C12[x] answer (workaround):
all of these must linearly scale the value (10xx = 10 * 1xx)
cdef float rv =float(value)
if ext == 'in':
return rv g_dpi
elif ext == 'px':
return rv
elif ext == 'dp':
return rv g_density (just the monitor density i think) https://github.com/kivy/kivy/blob/master/kivy/_metrics.pyx#L36C18-L36C18
elif ext == 'sp':
return rv g_density g_fontscale
elif ext == 'pt':
return rv g_dpi / 72.
elif ext == 'cm':
return rv g_dpi / 2.54
elif ext == 'mm':
return rv * g_dpi / 25.4
python amazingdancestar.py -m screen:s3
(they worked)789f0589d8e7
I got "unable to provide window provider..." solution here: