VirtualBox

Changeset 105326 in vbox


Ignore:
Timestamp:
Jul 15, 2024 1:17:44 PM (6 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10672: Runtime UI: Improve accessibility for Mouse indicator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r105313 r105326  
    11601160    }
    11611161
     1162    /** Handles translation event. */
     1163    virtual void sltRetranslateUI() RT_OVERRIDE
     1164    {
     1165        /* Call to base-class: */
     1166        UISessionStateStatusBarIndicator::sltRetranslateUI();
     1167
     1168        /* Append description with more info: */
     1169        QString strState;
     1170        switch (state())
     1171        {
     1172            case 0: strState = tr("pointer is not captured", "Mouse tooltip"); break;
     1173            case 1: strState = tr("pointer is captured", "Mouse tooltip"); break;
     1174            case 2: strState = tr("mouse integration (MI) is On", "Mouse tooltip"); break;
     1175            case 3: strState = tr("MI is Off, pointer is captured", "Mouse tooltip"); break;
     1176            case 4: strState = tr("MI is Off, pointer is not captured", "Mouse tooltip"); break;
     1177            default: break;
     1178        }
     1179        if (!strState.isNull())
     1180            m_strDescription = QString("%1, %2").arg(m_strDescription, strState);
     1181    }
     1182
    11621183private slots:
    11631184
     
    11681189            (iState & UIMouseStateType_MouseAbsolute) &&
    11691190            !(iState & UIMouseStateType_MouseCaptured))
    1170         {
    11711191            QIStateStatusBarIndicator::setState(4);
    1172         }
    11731192        else
    1174         {
    11751193            QIStateStatusBarIndicator::setState(iState & (UIMouseStateType_MouseAbsolute | UIMouseStateType_MouseCaptured));
    1176         }
     1194        sltRetranslateUI();
    11771195    }
    11781196};
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette