summaryrefslogtreecommitdiffstats
path: root/client/config/themes.cpp
diff options
context:
space:
mode:
authorDaniel Würl <trinity@dwrl.de>2025-03-22 19:10:20 +0100
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-03-26 17:25:26 +0900
commit521f6d7e758c63358b6ec7ef4d5ff9b91d421589 (patch)
treeecabbf8cbd05c8914e17ceed96bc42101f2b7cdd /client/config/themes.cpp
parentbc0eb61f40f7508a1822edc1227c711796e843c5 (diff)
downloadtwin-style-dekorator-521f6d7e.tar.gz
twin-style-dekorator-521f6d7e.zip
Allow themes to use new filenames mirroring the new part names by checking for leftUpperCornerFrameBg.png, falling back to old file names if neccessary. Also use new files names in kcm.
Signed-off-by: Daniel Würl <trinity@dwrl.de> (cherry picked from commit 8b707d2afc657b90b34f28675933badd28e29a62)
Diffstat (limited to 'client/config/themes.cpp')
-rw-r--r--client/config/themes.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/client/config/themes.cpp b/client/config/themes.cpp
index 1688874..f309ba7 100644
--- a/client/config/themes.cpp
+++ b/client/config/themes.cpp
@@ -372,13 +372,27 @@ void IconThemesConfig::themeSelected( TQListViewItem *item, TQLabel *previewLabe
}
TQString dirNameStr = dirName + item->text( 0 ) + "/deco/" ;
- topLeftCornerBg.load( dirNameStr + "topLeftCornerBg.png" );
- leftButtonsBg.load( dirNameStr + "leftButtonsBg" );
- leftTitleBg.load( dirNameStr + "leftTitleBg.png" );
- midTitleBg.load( dirNameStr + "midTitleBg.png" );
- rightTitleBg.load( dirNameStr + "rightTitleBg.png" );
- rightButtonsBg.load( dirNameStr + "rightButtonsBg.png" );
- topRightCornerBg.load( dirNameStr + "topRightCornerBg.png" );
+ bool useNewFileNames = topLeftCornerBg.load( dirNameStr + "leftUpperCornerFrameBg.png" );
+
+ if ( useNewFileNames )
+ {
+ leftButtonsBg.load( dirNameStr + "buttonsLeftBg" );
+ leftTitleBg.load( dirNameStr + "titleLeftBg.png" );
+ midTitleBg.load( dirNameStr + "titleMidBg.png" );
+ rightTitleBg.load( dirNameStr + "titleRightBg.png" );
+ rightButtonsBg.load( dirNameStr + "buttonsRightBg.png" );
+ topRightCornerBg.load( dirNameStr + "rightUpperCornerFrameBg.png" );
+ }
+ else
+ {
+ topLeftCornerBg.load( dirNameStr + "topLeftCornerBg.png" );
+ leftButtonsBg.load( dirNameStr + "leftButtonsBg" );
+ leftTitleBg.load( dirNameStr + "leftTitleBg.png" );
+ midTitleBg.load( dirNameStr + "midTitleBg.png" );
+ rightTitleBg.load( dirNameStr + "rightTitleBg.png" );
+ rightButtonsBg.load( dirNameStr + "rightButtonsBg.png" );
+ topRightCornerBg.load( dirNameStr + "topRightCornerBg.png" );
+ }
w = topLeftCornerBg.width() + leftButtonsBg.width() + leftTitleBg.width() + midTitleBg.width() + rightTitleBg.width() + rightButtonsBg.width() + topRightCornerBg.width() + 8;
h = midTitleBg.height() + 8;