VirtualBox

Changeset 88911 in vbox


Ignore:
Timestamp:
May 6, 2021 5:46:09 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8161. Saving softkeyboard color settings directly

Location:
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp

    r88910 r88911  
    40484048    if (m_pKeyboardWidget)
    40494049        m_pKeyboardWidget->setColorThemeByName(strColorThemeName);
     4050    saveSelectedColorThemeName();
    40504051}
    40514052
     
    41294130    m_pSettingsWidget->setColorSelectionButtonBackgroundAndTooltip(static_cast<KeyboardColorType>(iColorRow),
    41304131                                                                   newColor, m_pKeyboardWidget->isColorThemeEditable());
     4132    saveCustomColorTheme();
    41314133}
    41324134
     
    42404242}
    42414243
     4244void UISoftKeyboard::saveCustomColorTheme()
     4245{
     4246    if (!m_pKeyboardWidget)
     4247        return;
     4248    /* Save the changes to the 'Custom' color theme to extra data: */
     4249    QStringList colors = m_pKeyboardWidget->colorsToStringList("Custom");
     4250    colors.prepend("Custom");
     4251    gEDataManager->setSoftKeyboardColorTheme(colors);
     4252}
     4253
     4254void UISoftKeyboard::saveSelectedColorThemeName()
     4255{
     4256    if (!m_pKeyboardWidget)
     4257        return;
     4258    gEDataManager->setSoftKeyboardSelectedColorTheme(m_pKeyboardWidget->currentColorThemeName());
     4259}
     4260
    42424261void UISoftKeyboard::sltSaveSettings()
    42434262{
     
    42454264    if (m_pKeyboardWidget)
    42464265    {
    4247         /* Save the changes to the 'Custom' color theme to extra data: */
    4248         QStringList colors = m_pKeyboardWidget->colorsToStringList("Custom");
    4249         colors.prepend("Custom");
    4250         gEDataManager->setSoftKeyboardColorTheme(colors);
    4251         gEDataManager->setSoftKeyboardSelectedColorTheme(m_pKeyboardWidget->currentColorThemeName());
    42524266        gEDataManager->setSoftKeyboardOptions(m_pKeyboardWidget->hideNumPad(),
    42534267                                              m_pKeyboardWidget->hideOSMenuKeys(),
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.h

    r88910 r88911  
    114114    void prepareConnections();
    115115    void loadSettings();
     116    void saveCustomColorTheme();
     117    void saveSelectedColorThemeName();
    116118    void saveDialogGeometry();
    117119    void configure();
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