1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-27 15:21:40 +03:00

update Actions for Meta key in Preferences

This commit is contained in:
Michail Vourlakos 2019-02-10 02:03:33 +02:00
parent 8f9140f67a
commit 7a95408c06
2 changed files with 59 additions and 29 deletions

View File

@ -196,7 +196,7 @@ SettingsDialog::SettingsDialog(QWidget *parent, Latte::Corona *corona)
});
connect(ui->autostartChkBox, &QCheckBox::stateChanged, this, &SettingsDialog::updateApplyButtonsState);
connect(ui->metaChkBox, &QCheckBox::stateChanged, this, &SettingsDialog::updateApplyButtonsState);
connect(ui->metaPressChkBox, &QCheckBox::stateChanged, this, &SettingsDialog::updateApplyButtonsState);
connect(ui->infoWindowChkBox, &QCheckBox::stateChanged, this, &SettingsDialog::updateApplyButtonsState);
connect(ui->tabWidget, &QTabWidget::currentChanged, this, &SettingsDialog::updateApplyButtonsState);
@ -753,7 +753,7 @@ void SettingsDialog::restoreDefaults()
//! Defaults for general Latte settings
ui->autostartChkBox->setChecked(true);
ui->infoWindowChkBox->setChecked(true);
ui->metaChkBox->setChecked(false);
ui->metaPressChkBox->setChecked(false);
ui->noBordersForMaximizedChkBox->setChecked(false);
ui->highSensitivityBtn->setChecked(true);
ui->screenTrackerSpinBox->setValue(SCREENTRACKERDEFAULTVALUE);
@ -920,7 +920,7 @@ void SettingsDialog::loadSettings()
ui->autostartChkBox->setChecked(m_corona->universalSettings()->autostart());
ui->infoWindowChkBox->setChecked(m_corona->universalSettings()->showInfoWindow());
ui->metaChkBox->setChecked(m_corona->universalSettings()->metaForwardedToLatte());
ui->metaPressChkBox->setChecked(m_corona->universalSettings()->metaForwardedToLatte());
ui->noBordersForMaximizedChkBox->setChecked(m_corona->universalSettings()->canDisableBorders());
if (m_corona->universalSettings()->mouseSensitivity() == Types::LowSensitivity) {
@ -953,7 +953,7 @@ QList<int> SettingsDialog::currentSettings()
settings << m_inMemoryButtons->checkedId();
settings << (int)ui->autostartChkBox->isChecked();
settings << (int)ui->infoWindowChkBox->isChecked();
settings << (int)ui->metaChkBox->isChecked();
settings << (int)ui->metaPressChkBox->isChecked();
settings << (int)ui->noBordersForMaximizedChkBox->isChecked();
settings << m_mouseSensitivityButtons->checkedId();
settings << ui->screenTrackerSpinBox->value();
@ -1208,7 +1208,7 @@ void SettingsDialog::updateApplyButtonsState()
//! Defaults for general Latte settings
if (!ui->autostartChkBox->isChecked()
|| ui->metaChkBox->isChecked()
|| ui->metaPressChkBox->isChecked()
|| !ui->infoWindowChkBox->isChecked()
|| ui->noBordersForMaximizedChkBox->isChecked()
|| !ui->highSensitivityBtn->isChecked()
@ -1333,7 +1333,7 @@ bool SettingsDialog::saveAllChanges()
//! Update universal settings
Latte::Types::MouseSensitivity sensitivity = static_cast<Latte::Types::MouseSensitivity>(m_mouseSensitivityButtons->checkedId());
bool autostart = ui->autostartChkBox->isChecked();
bool forwardMeta = ui->metaChkBox->isChecked();
bool forwardMeta = ui->metaPressChkBox->isChecked();
bool showInfoWindow = ui->infoWindowChkBox->isChecked();
bool noBordersForMaximized = ui->noBordersForMaximizedChkBox->isChecked();

View File

@ -140,7 +140,8 @@
</property>
<property name="icon">
<iconset theme="user-identity">
<normaloff>.</normaloff>.</iconset>
<normaloff/>
</iconset>
</property>
</widget>
</item>
@ -154,7 +155,8 @@
</property>
<property name="icon">
<iconset theme="media-playback-pause">
<normaloff>.</normaloff>.</iconset>
<normaloff/>
</iconset>
</property>
</widget>
</item>
@ -213,7 +215,8 @@
</property>
<property name="icon">
<iconset theme="add">
<normaloff>.</normaloff>.</iconset>
<normaloff/>
</iconset>
</property>
</widget>
</item>
@ -227,7 +230,8 @@
</property>
<property name="icon">
<iconset theme="edit-copy">
<normaloff>.</normaloff>.</iconset>
<normaloff/>
</iconset>
</property>
<property name="flat">
<bool>false</bool>
@ -244,7 +248,8 @@
</property>
<property name="icon">
<iconset theme="list-remove">
<normaloff>.</normaloff>.</iconset>
<normaloff/>
</iconset>
</property>
</widget>
</item>
@ -274,7 +279,8 @@
</property>
<property name="icon">
<iconset theme="object-locked">
<normaloff>.</normaloff>.</iconset>
<normaloff/>
</iconset>
</property>
<property name="checkable">
<bool>true</bool>
@ -351,7 +357,8 @@
</property>
<property name="icon">
<iconset theme="document-import">
<normaloff>.</normaloff>.</iconset>
<normaloff/>
</iconset>
</property>
<property name="default">
<bool>false</bool>
@ -368,7 +375,8 @@
</property>
<property name="icon">
<iconset theme="document-export">
<normaloff>.</normaloff>.</iconset>
<normaloff/>
</iconset>
</property>
</widget>
</item>
@ -382,7 +390,8 @@
</property>
<property name="icon">
<iconset theme="favorites">
<normaloff>.</normaloff>.</iconset>
<normaloff/>
</iconset>
</property>
</widget>
</item>
@ -445,23 +454,14 @@
<x>0</x>
<y>0</y>
<width>805</width>
<height>518</height>
<height>523</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>0</number>
</property>
<item>
@ -642,12 +642,42 @@
</spacer>
</item>
<item>
<widget class="QCheckBox" name="metaChkBox">
<widget class="QCheckBox" name="metaPressChkBox">
<property name="toolTip">
<string>Forward Meta key from KWin to Latte in order to activate Application Launcher. It is suggested to disable that option if you remove Latte.</string>
<string>Forward ⌘ press from KWin to Latte in order to activate Application Launcher. It is suggested to disable that option if you remove Latte.</string>
</property>
<property name="text">
<string>Meta key activates Application Launcher</string>
<string>Press ⌘ to activate Application Launcher</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="metaPressHoldChkBox">
<property name="toolTip">
<string>Press and hold ⌘ to show shortcuts badges for applets and tasks</string>
</property>
<property name="text">
<string>Press and Hold ⌘ to show shortcuts badges</string>
</property>
</widget>
</item>