Browse Source

UI Dialog größenanpassung verbessert

Kolja Strohm 5 years ago
parent
commit
b9b204e06c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      UIDialog.cpp

+ 3 - 1
UIDialog.cpp

@@ -50,7 +50,9 @@ void UIDialog::adjustSize()
             max.y = MAX( max.y, m->getY() + m->getHeight() + 5 );
         }
     }
-    setSize( max + Punkt( getRBreite() * 2, getRBreite() * 2 + zTTextFeld()->getHeight() ) );
+    setSize( max + Punkt( hatStyle( Fenster::Style::Rahmen ) ? getRBreite() * 2 : 0, 
+        ( hatStyle( Fenster::Style::Rahmen ) ? getRBreite() * 2 : 0 ) + 
+             ( hatStyle( Fenster::Style::Titel ) ? zTTextFeld()->getHeight() : 0 ) ) );
 }
 
 // Fügt dem Fenster eine Zeichnung hinzu