Commit c6feac9c authored by Devin Lin's avatar Devin Lin 🎨
Browse files

taskpanel: Remove keyboard button setting, only show when unsupported

parent 336f35a2
Pipeline #230850 passed with stage
in 1 minute and 6 seconds
......@@ -107,19 +107,6 @@ void MobileShellSettings::setNavigationPanelEnabled(bool navigationPanelEnabled)
m_config->sync();
}
bool MobileShellSettings::keyboardButtonEnabled() const
{
auto group = KConfigGroup{m_config, GENERAL_CONFIG_GROUP};
return group.readEntry("keyboardButtonEnabled", false);
}
void MobileShellSettings::setKeyboardButtonEnabled(bool keyboardButtonEnabled)
{
auto group = KConfigGroup{m_config, GENERAL_CONFIG_GROUP};
group.writeEntry("keyboardButtonEnabled", keyboardButtonEnabled, KConfigGroup::Notify);
m_config->sync();
}
bool MobileShellSettings::taskSwitcherPreviewsEnabled() const
{
auto group = KConfigGroup{m_config, GENERAL_CONFIG_GROUP};
......
......@@ -28,7 +28,6 @@ class MobileShellSettings : public QObject
// navigation panel
Q_PROPERTY(bool navigationPanelEnabled READ navigationPanelEnabled WRITE setNavigationPanelEnabled NOTIFY navigationPanelEnabledChanged)
Q_PROPERTY(bool keyboardButtonEnabled READ keyboardButtonEnabled WRITE setKeyboardButtonEnabled NOTIFY keyboardButtonEnabledChanged)
// task switcher
Q_PROPERTY(bool taskSwitcherPreviewsEnabled READ taskSwitcherPreviewsEnabled WRITE setTaskSwitcherPreviewsEnabled NOTIFY taskSwitcherPreviewsEnabledChanged)
......@@ -116,18 +115,6 @@ public:
*/
void setNavigationPanelEnabled(bool navigationPanelEnabled);
/**
* Whether the keyboard toggle button on the navigation panel is enabled.
*/
bool keyboardButtonEnabled() const;
/**
* Set whether the keyboard toggle button on the navigation panel is enabled.
*
* @param keyboardButtonEnabled Whether the keyboard button on the navigation panel should be enabled.
*/
void setKeyboardButtonEnabled(bool keyboardButtonEnabled);
/**
* Whether task switcher application previews are enabled.
*/
......
......@@ -107,8 +107,8 @@ MobileShell.NavigationPanel {
rightCornerAction: MobileShell.NavigationPanelAction {
id: keyboardToggleAction
visible: MobileShell.MobileShellSettings.keyboardButtonEnabled
enabled: Keyboards.KWinVirtualKeyboard.available
visible: Keyboards.KWinVirtualKeyboard.available && !Keyboards.KWinVirtualKeyboard.activeClientSupportsTextInput
enabled: true
iconSource: "input-keyboard-virtual-symbolic"
iconSizeFactor: 0.75
......
......@@ -80,25 +80,6 @@ KCM.SimpleKCM {
}
}
}
MobileForm.FormDelegateSeparator {
visible: MobileShell.MobileShellSettings.navigationPanelEnabled
above: gestureDelegate
below: keyboardButtonDelegate
}
MobileForm.FormSwitchDelegate {
id: keyboardButtonDelegate
visible: MobileShell.MobileShellSettings.navigationPanelEnabled
text: i18n("Keyboard Toggle")
description: i18n("Whether to show a keyboard button on the navigation panel.")
checked: MobileShell.MobileShellSettings.keyboardButtonEnabled
onCheckedChanged: {
if (checked != MobileShell.MobileShellSettings.keyboardButtonEnabled) {
MobileShell.MobileShellSettings.keyboardButtonEnabled = checked;
}
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment