Procházet zdrojové kódy

vertical align title in CObjectListWindow if there is no header icon

Laserlicht před 2 týdny
rodič
revize
4dc2033a7e
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      client/windows/GUIClasses.cpp

+ 1 - 1
client/windows/GUIClasses.cpp

@@ -1638,7 +1638,7 @@ void CObjectListWindow::init(std::shared_ptr<CIntObject> titleWidget_, std::stri
 {
 	titleWidget = titleWidget_;
 
-	title = std::make_shared<CLabel>(152, 27, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, _title);
+	title = std::make_shared<CLabel>(152, titleWidget_ ? 27 : 51, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, _title);
 	descr = std::make_shared<CLabel>(145, 133, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE, _descr);
 	exit = std::make_shared<CButton>( Point(228, 402), AnimationPath::builtin(blue ? "MuBcanc" : "ICANCEL.DEF"), CButton::tooltip(), std::bind(&CObjectListWindow::exitPressed, this), EShortcut::GLOBAL_CANCEL);