diff options
| author | Daniel Würl <trinity@dwrl.de> | 2025-03-29 12:50:01 +0100 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-05 17:03:06 +0900 |
| commit | baf6878b0c2e70f122d74dbe17de22abad5872b2 (patch) | |
| tree | 8a32fe1c384b5bb0363e08f1c293b114d11ba52c | |
| parent | 756e1cd1cae081b3a6fb698dac77ec7402f78ef7 (diff) | |
| download | twin-style-dekorator-baf6878b.tar.gz twin-style-dekorator-baf6878b.zip | |
Fixed regression on loading of certain border parts.
Signed-off-by: Daniel Würl <trinity@dwrl.de>
(cherry picked from commit 4531d0929bd9714b6fe6c78a88d7d74d19b7fbbb)
| -rw-r--r-- | client/deKoratorclient.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/client/deKoratorclient.cpp b/client/deKoratorclient.cpp index 0e9c694..80d379d 100644 --- a/client/deKoratorclient.cpp +++ b/client/deKoratorclient.cpp @@ -594,17 +594,30 @@ bool DeKoratorFactory::readConfig() // Load border pixmaps and try to also get pixmaps for inactive state. bool DeKoratorFactory::loadBorderPixmap(decoType borderPart, const TQString& newName, const TQString& oldName) { TQString decoPixDir = DeKoratorFactory::framesPath_; - - bool imgLoaded = DECOARR[ borderPart ][ orig ] ->load( decoPixDir + "/" + newName + "Bg.png" ); + TQString preferredName; + TQString fallbackName; + + // Solve collision on parts 'bottomLeftFrame' and 'bottomRightFrame' between new and old image names. + if ( borderPart == bottomLeftFrame || borderPart == bottomRightFrame ) { + preferredName = oldName; + fallbackName = newName; + } + else + { + preferredName = newName; + fallbackName = oldName; + } + + bool imgLoaded = DECOARR[ borderPart ][ orig ] ->load( decoPixDir + "/" + preferredName + "Bg.png" ); if ( imgLoaded ) { - if ( !DECOARR[ borderPart ][ inActOrig ]->load( decoPixDir + "/" + newName + "InactiveBg.png" ) ) - DECOARR[ borderPart ][ inActOrig ] ->load( decoPixDir + "/" + newName + "Bg.png" ); + if ( !DECOARR[ borderPart ][ inActOrig ]->load( decoPixDir + "/" + preferredName + "InactiveBg.png" ) ) + DECOARR[ borderPart ][ inActOrig ] ->load( decoPixDir + "/" + preferredName + "Bg.png" ); } else { - imgLoaded = DECOARR[ borderPart ][ orig ] ->load( decoPixDir + "/" + oldName + "Bg.png" ); - if ( !DECOARR[ borderPart ][ inActOrig ]->load( decoPixDir + "/" + oldName + "InactiveBg.png" ) ) - DECOARR[ borderPart ][ inActOrig ] ->load( decoPixDir + "/" + oldName + "Bg.png" ); + imgLoaded = DECOARR[ borderPart ][ orig ] ->load( decoPixDir + "/" + fallbackName + "Bg.png" ); + if ( !DECOARR[ borderPart ][ inActOrig ]->load( decoPixDir + "/" + fallbackName + "InactiveBg.png" ) ) + DECOARR[ borderPart ][ inActOrig ] ->load( decoPixDir + "/" + fallbackName + "Bg.png" ); } if ( imgLoaded ) return true; |
