adjust column widths
authorsheepluva
Tue, 01 May 2012 16:16:09 +0200
changeset 6977 6a2ecad333da
parent 6976 ec6b4118e7b1
child 6978 1dc33050149d
adjust column widths fix a warning
QTfrontend/ui/page/pageroomslist.cpp
QTfrontend/ui/widget/frameTeam.cpp
--- a/QTfrontend/ui/page/pageroomslist.cpp	Tue May 01 16:20:12 2012 +0200
+++ b/QTfrontend/ui/page/pageroomslist.cpp	Tue May 01 16:16:09 2012 +0200
@@ -479,11 +479,12 @@
     roomsList->hideColumn(0);
 
     QHeaderView * h = roomsList->horizontalHeader();
-    h->resizeSection(1, 200);
-    h->resizeSection(2, 50);
-    h->resizeSection(3, 50);
+    h->setResizeMode(1, QHeaderView::Stretch);
+    h->resizeSection(2, 16);
+    h->resizeSection(3, 16);
     h->resizeSection(4, 100);
     h->resizeSection(5, 100);
     h->resizeSection(6, 100);
     h->resizeSection(7, 100);
+
 }
--- a/QTfrontend/ui/widget/frameTeam.cpp	Tue May 01 16:20:12 2012 +0200
+++ b/QTfrontend/ui/widget/frameTeam.cpp	Tue May 01 16:16:09 2012 +0200
@@ -63,7 +63,10 @@
 {
     int idx = availableColors.indexOf(currentColor);
 
-    idx = ++idx % availableColors.size();
+    idx++;
+
+    if (idx >= availableColors.size())
+        idx = 0;
 
     return availableColors.at(idx);
 }