Fix team select buttons sometimes not having the full width (bug 737)
authorWuzzy <Wuzzy2@mail.ru>
Tue, 14 May 2019 19:46:43 +0200
changeset 14943 d01460ae866c
parent 14942 05cde9ba4183
child 14944 8b53cb1c0ada
Fix team select buttons sometimes not having the full width (bug #737)
QTfrontend/ui/widget/frameTeam.cpp
QTfrontend/ui/widget/frameTeam.h
--- a/QTfrontend/ui/widget/frameTeam.cpp	Tue May 14 18:04:15 2019 +0200
+++ b/QTfrontend/ui/widget/frameTeam.cpp	Tue May 14 19:46:43 2019 +0200
@@ -163,3 +163,11 @@
         setStyleSheet("FrameTeams{ border: transparent }");
     }
 }
+
+void FrameTeams::resizeEvent(QResizeEvent * event)
+{
+    Q_UNUSED(event);
+
+    QResizeEvent* pevent=new QResizeEvent(parentWidget()->size(), parentWidget()->size());
+    QCoreApplication::postEvent(parentWidget(), pevent);
+}
--- a/QTfrontend/ui/widget/frameTeam.h	Tue May 14 18:04:15 2019 +0200
+++ b/QTfrontend/ui/widget/frameTeam.h	Tue May 14 19:46:43 2019 +0200
@@ -53,6 +53,9 @@
         void addTeam(HWTeam team, bool willPlay);
         void removeTeam(HWTeam team);
 
+    protected:
+        virtual void resizeEvent(QResizeEvent * event);
+
     private:
         int currentColor;