summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Würl <trinity@dwrl.de>2025-03-24 20:42:46 +0100
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-03-26 17:25:27 +0900
commit2a2efc95dccc754e7e6277e99b63e4a6fa011f07 (patch)
tree23adc669f71f326e35c068bb06a1f878b0821a6a
parent18a83dff1e83c4242f769895a4243f3c2560f67c (diff)
downloadtwin-style-dekorator-2a2efc95.tar.gz
twin-style-dekorator-2a2efc95.zip
Add testing logic for each image in kcm dialog as well.
Signed-off-by: Daniel Würl <trinity@dwrl.de> (cherry picked from commit 4e7f1c43a6798ee9f4c6031f6377641575d1e5bd)
-rw-r--r--client/config/themes.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/client/config/themes.cpp b/client/config/themes.cpp
index f309ba7..625929a 100644
--- a/client/config/themes.cpp
+++ b/client/config/themes.cpp
@@ -372,27 +372,21 @@ void IconThemesConfig::themeSelected( TQListViewItem *item, TQLabel *previewLabe
}
TQString dirNameStr = dirName + item->text( 0 ) + "/deco/" ;
- 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
- {
+
+ if ( !topLeftCornerBg.load( dirNameStr + "leftUpperCornerFrameBg.png" ) )
topLeftCornerBg.load( dirNameStr + "topLeftCornerBg.png" );
+ if ( !leftButtonsBg.load( dirNameStr + "buttonsLeftBg" ) )
leftButtonsBg.load( dirNameStr + "leftButtonsBg" );
+ if ( !leftTitleBg.load( dirNameStr + "titleLeftBg.png" ) )
leftTitleBg.load( dirNameStr + "leftTitleBg.png" );
+ if ( !midTitleBg.load( dirNameStr + "titleMidBg.png" ) )
midTitleBg.load( dirNameStr + "midTitleBg.png" );
+ if ( !rightTitleBg.load( dirNameStr + "titleRightBg.png" ) )
rightTitleBg.load( dirNameStr + "rightTitleBg.png" );
+ if ( !rightButtonsBg.load( dirNameStr + "buttonsRightBg.png" ) )
rightButtonsBg.load( dirNameStr + "rightButtonsBg.png" );
+ if ( !topRightCornerBg.load( dirNameStr + "rightUpperCornerFrameBg.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;