| 387 | } |
| 388 | |
| 389 | void TabControl::_showItem(TabItem* _item, bool _show, bool _smooth) |
| 390 | { |
| 391 | if (!_smooth) |
| 392 | { |
| 393 | ControllerManager::getInstance().removeItem(_item); |
| 394 | _item->setAlpha(ALPHA_MAX); |
| 395 | |
| 396 | _item->setVisible(_show); |
| 397 | |
| 398 | return; |
| 399 | } |
| 400 | |
| 401 | if (_show) |
| 402 | { |
| 403 | // enable _item in case actionWidgetHide was skipped due to rapid click |
| 404 | _item->setEnabled(true); |
| 405 | ControllerFadeAlpha* controller = createControllerFadeAlpha(ALPHA_MAX, TAB_SPEED_FADE_COEF, true); |
| 406 | ControllerManager::getInstance().addItem(_item, controller); |
| 407 | } |
| 408 | else |
| 409 | { |
| 410 | ControllerFadeAlpha* controller = createControllerFadeAlpha(ALPHA_MIN, TAB_SPEED_FADE_COEF, false); |
| 411 | controller->eventPostAction += newDelegate(this, &TabControl::actionWidgetHide); |
| 412 | ControllerManager::getInstance().addItem(_item, controller); |
| 413 | } |
| 414 | } |
| 415 | |
| 416 | Button* TabControl::createButton() |
| 417 | { |
nothing calls this directly
no test coverage detected