Changeset befdf4b


Ignore:
Timestamp:
05/14/14 13:41:08 (11 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1
Children:
27e9218
Parents:
441a9b7
Message:

Adjust the new taskmanager button state to be properly set depending on the "maximum" priority for the windows managed by the button.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lumina/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp

    re6e5ccdf rbefdf4b  
    8787    winMenu->addAction( WINLIST[i].icon(), WINLIST[i].text() ); 
    8888    Lumina::STATES stat = WINLIST[i].status(); 
    89     if(showstate!=Lumina::NOTIFICATION){  
    90         if(showstate!=Lumina::VISIBLE && stat!=Lumina::NOSHOW){ showstate = stat; } //this is alwasy an improvement 
    91         else if(stat ==Lumina::NOTIFICATION){ showstate = stat; } //only notification is higher than visible 
    92     } 
     89    if(stat==Lumina::NOTIFICATION){ showstate = stat; } //highest priority 
     90    else if( stat==Lumina::ACTIVE && showstate != Lumina::NOTIFICATION){ showstate = stat; } //next priority 
     91    else if( stat==Lumina::Lumina::VISIBLE && showstate != Lumina::NOTIFICATION && showstate != Lumina::ACTIVE){ showstate = stat; } 
     92    else if(showstate == Lumina::INVISIBLE || showstate == Lumina::NOSHOW){ showstate = stat; } //anything is the same/better 
    9393  } 
    9494  this->setState(showstate); 
     
    9797  if(showstate == Lumina::NOSHOW || WINLIST.length() < 1){ this->setVisible(false); } 
    9898  else{ this->setVisible(true); } 
    99   if(statusOnly){return; } 
    10099  // - functionality 
    101100  if(WINLIST.length() == 1){ 
     
    108107    this->setPopupMode(QToolButton::InstantPopup); 
    109108    this->setMenu(winMenu); 
    110     this->setText( cname +" ("+QString::number(WINLIST.length())+")" ); 
     109    this->setText( this->fontMetrics().elidedText(cname, Qt::ElideRight ,80) +" ("+QString::number(WINLIST.length())+")" ); 
    111110  } 
    112111} 
Note: See TracChangeset for help on using the changeset viewer.