VirtualBox

Ignore:
Timestamp:
Jul 15, 2024 4:47:01 PM (9 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
163983
Message:

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

File:
1 edited

Legend:

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

    r105329 r105330  
    12601260        /* Retranslate finally: */
    12611261        sltRetranslateUI();
     1262    }
     1263
     1264    /** Handles translation event. */
     1265    virtual void sltRetranslateUI() RT_OVERRIDE
     1266    {
     1267        /* Call to base-class: */
     1268        UISessionStateStatusBarIndicator::sltRetranslateUI();
     1269
     1270        /* Append description with more info: */
     1271        const QString strStatus = state() & UIKeyboardStateType_KeyboardCaptured
     1272                                ? tr("keyboard is captured", "Keyboard tooltip")
     1273                                : tr("keyboard is not captured", "Keyboard tooltip");
     1274        m_strDescription = QString("%1, %2").arg(m_strDescription, strStatus);
     1275    }
     1276
     1277private slots:
     1278
     1279    /** Handles state change. */
     1280    void setState(int iState) RT_OVERRIDE
     1281    {
     1282        /* Call to base-class: */
     1283        QIStateStatusBarIndicator::setState(iState);
     1284
     1285        /* Update everything: */
     1286        updateAppearance();
    12621287    }
    12631288};
Note: See TracChangeset for help on using the changeset viewer.

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