Changeset 769 for trunk/src/gui/widgets/qtabbar.cpp
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/widgets/qtabbar.cpp
r651 r769 68 68 #endif 69 69 70 #ifndef QT_NO_STYLE_S60 71 #include "qs60style.h" 72 #endif 73 70 74 QT_BEGIN_NAMESPACE 71 75 … … 479 483 if (useScrollButtons && tabList.count() && last > available) { 480 484 int extra = extraWidth(); 485 #ifndef QT_NO_STYLE_S60 486 QS60Style *s60Style = qobject_cast<QS60Style*>(QApplication::style()); 487 #endif 481 488 if (!vertTabs) { 482 489 Qt::LayoutDirection ld = q->layoutDirection(); … … 486 493 487 494 if (ld == Qt::LeftToRight) { 495 // In S60style, tab scroll buttons are layoutted separately, on the sides of the tabbar. 496 #ifndef QT_NO_STYLE_S60 497 if (s60Style) { 498 rightB->setGeometry(arrows.left() + extra / 2, arrows.top(), extra / 2, arrows.height()); 499 leftB->setGeometry(0, arrows.top(), extra / 2, arrows.height()); 500 } else { 501 #endif 488 502 leftB->setGeometry(arrows.left(), arrows.top(), extra/2, arrows.height()); 489 503 rightB->setGeometry(arrows.right() - extra/2 + buttonOverlap, arrows.top(), 490 504 extra/2, arrows.height()); 505 #ifndef QT_NO_STYLE_S60 506 } 507 #endif 491 508 leftB->setArrowType(Qt::LeftArrow); 492 509 rightB->setArrowType(Qt::RightArrow); 493 510 } else { 511 #ifndef QT_NO_STYLE_S60 512 if (s60Style) { 513 rightB->setGeometry(arrows.left() + extra / 2, arrows.top(), extra / 2, arrows.height()); 514 leftB->setGeometry(0, arrows.top(), extra / 2, arrows.height()); 515 } else { 516 #endif 494 517 rightB->setGeometry(arrows.left(), arrows.top(), extra/2, arrows.height()); 495 518 leftB->setGeometry(arrows.right() - extra/2 + buttonOverlap, arrows.top(), 496 519 extra/2, arrows.height()); 520 #ifndef QT_NO_STYLE_S60 521 } 522 #endif 497 523 rightB->setArrowType(Qt::LeftArrow); 498 524 leftB->setArrowType(Qt::RightArrow); 499 525 } 500 526 } else { 527 #ifndef QT_NO_STYLE_S60 528 if (s60Style) { 529 QRect arrows = QRect(0, 0, size.width(), available ); 530 leftB->setGeometry(arrows.left(), arrows.top(), arrows.width(), extra / 2); 531 leftB->setArrowType(Qt::UpArrow); 532 rightB->setGeometry(arrows.left(), arrows.bottom() - extra / 2 + 1, 533 arrows.width(), extra / 2); 534 rightB->setArrowType(Qt::DownArrow); 535 } else { 536 #endif 501 537 QRect arrows = QRect(0, available - extra, size.width(), extra ); 502 538 leftB->setGeometry(arrows.left(), arrows.top(), arrows.width(), extra/2); … … 505 541 arrows.width(), extra/2); 506 542 rightB->setArrowType(Qt::DownArrow); 543 #ifndef QT_NO_STYLE_S60 544 } 545 #endif 507 546 } 508 547 leftB->setEnabled(scrollOffset > 0);
Note:
See TracChangeset
for help on using the changeset viewer.