mirror of https://github.com/buggins/dlangui.git
trying to fix theme font changes apply
This commit is contained in:
parent
e2dc679dac
commit
9244f8aaed
|
@ -342,6 +342,7 @@ protected:
|
|||
|
||||
public:
|
||||
void onThemeChanged() {
|
||||
_font.clear();
|
||||
_backgroundDrawable.clear();
|
||||
foreach(s; _substates)
|
||||
s.onThemeChanged();
|
||||
|
@ -458,6 +459,9 @@ public:
|
|||
return this;
|
||||
}
|
||||
|
||||
void clearCachedObjects() {
|
||||
onThemeChanged();
|
||||
}
|
||||
|
||||
//===================================================
|
||||
// font properties
|
||||
|
@ -701,32 +705,37 @@ public:
|
|||
}
|
||||
|
||||
@property Style fontFace(string face) {
|
||||
if (_fontFace != face)
|
||||
clearCachedObjects();
|
||||
_fontFace = face;
|
||||
_font.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@property Style fontFamily(FontFamily family) {
|
||||
if (_fontFamily != family)
|
||||
clearCachedObjects();
|
||||
_fontFamily = family;
|
||||
_font.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@property Style fontStyle(ubyte style) {
|
||||
if (_fontStyle != style)
|
||||
clearCachedObjects();
|
||||
_fontStyle = style;
|
||||
_font.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@property Style fontWeight(ushort weight) {
|
||||
if (_fontWeight != weight)
|
||||
clearCachedObjects();
|
||||
_fontWeight = weight;
|
||||
_font.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
@property Style fontSize(int size) {
|
||||
if (_fontSize != size)
|
||||
clearCachedObjects();
|
||||
_fontSize = size;
|
||||
_font.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue