mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 07:03:08 +00:00
taskpanel: Remove keyboard button setting, only show when unsupported
This commit is contained in:
parent
336f35a235
commit
c6feac9ce0
4 changed files with 2 additions and 47 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue