mirror of https://github.com/kivy/kivy.git
Inititalize disabled color when creating label and disabled (#7527)
This commit is contained in:
parent
28bfe768d8
commit
e10ef1a11c
|
@ -341,8 +341,12 @@ class Label(Widget):
|
||||||
if (markup and cls is not CoreMarkupLabel) or \
|
if (markup and cls is not CoreMarkupLabel) or \
|
||||||
(not markup and cls is not CoreLabel):
|
(not markup and cls is not CoreLabel):
|
||||||
# markup have change, we need to change our rendering method.
|
# markup have change, we need to change our rendering method.
|
||||||
d = Label._font_properties
|
dkw = {x: getattr(self, x) for x in self._font_properties}
|
||||||
dkw = dict(list(zip(d, [getattr(self, x) for x in d])))
|
dkw['usersize'] = self.text_size
|
||||||
|
if self.disabled:
|
||||||
|
dkw['color'] = self.disabled_color
|
||||||
|
dkw['outline_color'] = self.disabled_outline_color
|
||||||
|
|
||||||
if markup:
|
if markup:
|
||||||
self._label = CoreMarkupLabel(**dkw)
|
self._label = CoreMarkupLabel(**dkw)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue