diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-03-03 12:55:25 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-03-10 17:17:47 +0100 |
commit | b386b8cab6beb65bfc8e5999273516762d0ee301 (patch) | |
tree | 23b1913c2029814e0a21e10c00b3890f866499c6 /nopacity.c | |
parent | 03337e57fdd83344d9b24ffcad394e76d5f92007 (diff) | |
download | skin-nopacity-b386b8cab6beb65bfc8e5999273516762d0ee301.tar.gz skin-nopacity-b386b8cab6beb65bfc8e5999273516762d0ee301.tar.bz2 |
Simplify cFontManager
Almost everything is done in the constructor and destructor of
cFontManager. So we can delete most of the funktions in this class.
This allows a new instance of fontmanager to be created
after configuration changes.
Diffstat (limited to 'nopacity.c')
-rw-r--r-- | nopacity.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -20,8 +20,7 @@ cNopacity::cNopacity(void) : cSkin("nOpacity", &::Theme) { config.SetFontName(); geoManager = new cGeometryManager(); geoManager->SetGeometry(); - fontManager = new cFontManager(); - fontManager->SetFonts(); + fontManager = NULL; imgCache = new cImageCache(); imgCache->CreateCache(); } @@ -78,8 +77,8 @@ void cNopacity::ReloadCaches(void) { config.SetThemeSetup(); config.SetFontName(); geoManager->SetGeometry(); - fontManager->DeleteFonts(); - fontManager->SetFonts(); + delete fontManager; + fontManager = new cFontManager(); imgCache->Reload(); dsyslog("nopacity: Cache reloaded in %d ms", int(cTimeMs::Now()-start)); } |