~ubuntu-branches/ubuntu/saucy/clementine/saucy

« back to all changes in this revision

Viewing changes to src/widgets/fancytabwidget.cpp

  • Committer: Package Import Robot
  • Author(s): Thomas PIERSON
  • Date: 2012-01-01 20:43:39 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120101204339-lsb6nndwhfy05sde
Tags: 1.0.1+dfsg-1
New upstream release. (Closes: #653926, #651611, #657391)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
#include "fancytabwidget.h"
31
31
#include "stylehelper.h"
 
32
#include "core/logging.h"
32
33
 
33
34
#include <QDebug>
34
35
 
589
590
  switch (mode) {
590
591
    case Mode_None:
591
592
    default:
592
 
      qDebug() << "Unknown fancy tab mode" << mode;
 
593
      qLog(Warning) << "Unknown fancy tab mode" << mode;
593
594
      // fallthrough
594
595
 
595
596
    case Mode_LargeSidebar: {
673
674
  bar->setShape(shape);
674
675
  bar->setDocumentMode(true);
675
676
  bar->setUsesScrollButtons(true);
 
677
  bar->setElideMode(Qt::ElideRight);
676
678
 
677
679
  if (shape == QTabBar::RoundedWest) {
678
680
    bar->setIconSize(QSize(22, 22));
704
706
    else if (text)
705
707
      tab_id = bar->addTab(label);
706
708
 
707
 
    bar->setTabToolTip(tab_id, item.tab_label_);
 
709
    // Adds tooltips only in Tabs mode or IconOnlyTabs mode
 
710
    // TODO in tab mode, show only if not elided, complicated since this doesn't inherit from QTabWidget
 
711
    if (shape == QTabBar::RoundedNorth && ((!text && icons) || (text && !icons)))
 
712
      bar->setTabToolTip(tab_id, item.tab_label_);
708
713
  }
709
714
 
710
715
  bar->setCurrentIndex(stack_->currentIndex());