Explorar o código

UI Dialog größenanpassung verbessert

Kolja Strohm %!s(int64=5) %!d(string=hai) anos
pai
achega
b9b204e06c
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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