New 1.12 API: edje_object_base_scale_get
With proper test
This commit is contained in:
parent
5e8a644f24
commit
60e7e94889
|
@ -376,6 +376,20 @@ cdef class Edje(Object):
|
||||||
def scale_get(self):
|
def scale_get(self):
|
||||||
return edje_object_scale_get(self.obj)
|
return edje_object_scale_get(self.obj)
|
||||||
|
|
||||||
|
property base_scale:
|
||||||
|
""" The base scale factor set in the edc collection.
|
||||||
|
|
||||||
|
:type: float
|
||||||
|
|
||||||
|
.. versionadded:: 1.12
|
||||||
|
|
||||||
|
"""
|
||||||
|
def __get__(self):
|
||||||
|
return edje_object_base_scale_get(self.obj)
|
||||||
|
|
||||||
|
def base_scale_get(self):
|
||||||
|
return edje_object_base_scale_get(self.obj)
|
||||||
|
|
||||||
property mirrored:
|
property mirrored:
|
||||||
"""The RTL orientation for this object.
|
"""The RTL orientation for this object.
|
||||||
|
|
||||||
|
|
|
@ -227,6 +227,7 @@ cdef extern from "Edje.h":
|
||||||
Eina_Bool edje_object_preload(Evas_Object *obj, Eina_Bool cancel)
|
Eina_Bool edje_object_preload(Evas_Object *obj, Eina_Bool cancel)
|
||||||
Eina_Bool edje_object_scale_set(Evas_Object *obj, double scale)
|
Eina_Bool edje_object_scale_set(Evas_Object *obj, double scale)
|
||||||
double edje_object_scale_get(Evas_Object *obj)
|
double edje_object_scale_get(Evas_Object *obj)
|
||||||
|
double edje_object_base_scale_get(Evas_Object *obj)
|
||||||
|
|
||||||
void edje_object_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
|
void edje_object_mirrored_set(Evas_Object *obj, Eina_Bool rtl)
|
||||||
Eina_Bool edje_object_mirrored_get(Evas_Object *obj)
|
Eina_Bool edje_object_mirrored_get(Evas_Object *obj)
|
||||||
|
|
|
@ -53,6 +53,11 @@ class TestEdjeObject(unittest.TestCase):
|
||||||
self.assertIsNone(o.data_get("not_exist"))
|
self.assertIsNone(o.data_get("not_exist"))
|
||||||
o.delete()
|
o.delete()
|
||||||
|
|
||||||
|
def testBaseScaleGet(self):
|
||||||
|
o = edje.Edje(self.canvas, file=theme_file, group="main")
|
||||||
|
self.assertEqual(o.base_scale_get(), 1.0)
|
||||||
|
o.delete()
|
||||||
|
|
||||||
def testColorClasses(self):
|
def testColorClasses(self):
|
||||||
o = edje.Edje(self.canvas, file=theme_file, group="main")
|
o = edje.Edje(self.canvas, file=theme_file, group="main")
|
||||||
o.color_class_set("MyColorClass",
|
o.color_class_set("MyColorClass",
|
||||||
|
|
Loading…
Reference in New Issue