QTfrontend/vertScrollArea.cpp
author displacer
Fri, 24 Feb 2006 16:06:12 +0000
changeset 63 27e2b5bb6d4b
child 85 44d9045b26ff
permissions -rw-r--r--
Scroll added to team control widget
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
63
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
     1
#include "vertScrollArea.h"
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
     2
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
     3
#include <QResizeEvent>
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
     4
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
     5
VertScrArea::VertScrArea(QColor frameColor, QWidget * parent) :
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
     6
  QScrollArea(parent)
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
     7
{
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
     8
  QPalette newPalette = palette();
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
     9
  newPalette.setColor(QPalette::Background, frameColor);
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
    10
  setPalette(newPalette);
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
    11
}
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
    12
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
    13
void VertScrArea::resizeEvent(QResizeEvent * event)
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
    14
{
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
    15
  widget()->resize(event->size().width(), widget()->sizeHint().height());
27e2b5bb6d4b Scroll added to team control widget
displacer
parents:
diff changeset
    16
}