Changeset View
Changeset View
Standalone View
Standalone View
lib/slidecontainer.cpp
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | |||||
123 | { | 123 | { | ||
124 | if (mContent) { | 124 | if (mContent) { | ||
125 | mContent->setGeometry(0, height() - mContent->height(), width(), mContent->height()); | 125 | mContent->setGeometry(0, height() - mContent->height(), width(), mContent->height()); | ||
126 | } | 126 | } | ||
127 | } | 127 | } | ||
128 | 128 | | |||
129 | bool SlideContainer::eventFilter(QObject*, QEvent* event) | 129 | bool SlideContainer::eventFilter(QObject*, QEvent* event) | ||
130 | { | 130 | { | ||
131 | if (event->type() == QEvent::Resize) { | 131 | switch (event->type()) { | ||
132 | case QEvent::Resize: | ||||
132 | if (!mSlidingOut && height() != 0) { | 133 | if (!mSlidingOut && height() != 0) { | ||
133 | animTo(mContent->height()); | 134 | animTo(mContent->height()); | ||
134 | } | 135 | } | ||
136 | break; | ||||
137 | case QEvent::LayoutRequest: | ||||
138 | updateGeometry(); | ||||
139 | break; | ||||
140 | default: | ||||
141 | break; | ||||
135 | } | 142 | } | ||
136 | return false; | 143 | return false; | ||
137 | } | 144 | } | ||
138 | 145 | | |||
139 | int SlideContainer::slideHeight() const | 146 | int SlideContainer::slideHeight() const | ||
140 | { | 147 | { | ||
141 | return isVisible() ? height() : 0; | 148 | return isVisible() ? height() : 0; | ||
142 | } | 149 | } | ||
Show All 18 Lines |