summaryrefslogtreecommitdiff
path: root/nopacity.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-03-03 12:55:25 +0100
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-03-10 17:17:47 +0100
commitb386b8cab6beb65bfc8e5999273516762d0ee301 (patch)
tree23b1913c2029814e0a21e10c00b3890f866499c6 /nopacity.c
parent03337e57fdd83344d9b24ffcad394e76d5f92007 (diff)
downloadskin-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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/nopacity.c b/nopacity.c
index a4fcfb9..98c8a96 100644
--- a/nopacity.c
+++ b/nopacity.c
@@ -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));
}