From fed4d7bff421fe03f9d5ce839e41214f3068cd30 Mon Sep 17 00:00:00 2001 From: wangyan <“wangyan@kylinos.cn”> Date: Thu, 28 Dec 2023 17:36:18 +0800 Subject: [PATCH] =?UTF-8?q?Feat:=20=E8=A7=A6=E6=91=B8=E5=B1=8F=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E5=A2=9E=E5=8A=A0=E5=B9=B3=E6=9D=BF=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=90=AF=E7=94=A8/=E7=A6=81=E7=94=A8=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/touchscreen-settings/tabletmodewidget.cpp | 160 ++++++++++++++++++ src/touchscreen-settings/tabletmodewidget.h | 35 ++++ .../touchscreen-settings.cpp | 2 +- .../touchscreen-settings.pro | 2 + src/touchscreen-settings/touchscreen.cpp | 50 +++--- src/touchscreen-settings/touchscreen.h | 1 + .../translations/bo_CN.ts | 23 ++- .../translations/de_DE.ts | 37 +++- .../translations/es_ES.ts | 37 +++- .../translations/fr_FR.ts | 37 +++- .../translations/kk_KZ.ts | 37 +++- .../translations/ky_KG.ts | 37 +++- .../translations/mn_MN.ts | 33 +++- .../translations/ug_CN.ts | 37 +++- .../translations/zh_CN.ts | 37 +++- .../translations/zh_HK.ts | 33 +++- 16 files changed, 530 insertions(+), 68 deletions(-) create mode 100644 src/touchscreen-settings/tabletmodewidget.cpp create mode 100644 src/touchscreen-settings/tabletmodewidget.h diff --git a/src/touchscreen-settings/tabletmodewidget.cpp b/src/touchscreen-settings/tabletmodewidget.cpp new file mode 100644 index 0000000..624a607 --- /dev/null +++ b/src/touchscreen-settings/tabletmodewidget.cpp @@ -0,0 +1,160 @@ +#include "tabletmodewidget.h" + +#include +#include +#include +#include +#include +#include +#include + +static const char* ICON_NAME = "dialog-warning"; + +TabletModeWidget::TabletModeWidget(QWidget* parent) + : QFrame(parent) + , m_tabletModeButton(nullptr) + , m_tabletTextWidegt(nullptr) +{ + setContentsMargins(16, 10, 16, 10); + setFrameShape(QFrame::Shape::Box); + + initLayout(); + + initTabletModeWidget(); + initConnect(); +} + +void TabletModeWidget::initLayout() +{ + QVBoxLayout* tabletModeVLayout = new QVBoxLayout; + tabletModeVLayout->setMargin(0); + setLayout(tabletModeVLayout); +} + +void TabletModeWidget::initTabletModeWidget() +{ + QWidget* tabletModeWidget = createTabletModeWidget(); + tabletModeWidget->setMinimumHeight(40); + layout()->addWidget(tabletModeWidget); + + if (getCurrentTabletMode()) { + m_tabletTextWidegt = createTabletTextWidget(); + layout()->setSpacing(0); + layout()->addWidget(m_tabletTextWidegt); + } +} + +void TabletModeWidget::initConnect() +{ + QDBusConnection::sessionBus().connect("com.kylin.statusmanager.interface", + "/", + "com.kylin.statusmanager.interface", + "modeChangeSignal", + this, + SLOT(onTabletModeChangedState(bool))); +} + +QWidget* TabletModeWidget::createTabletModeWidget() +{ + QWidget* tabletModeWidget = new QWidget; + QLabel* tabletModeText = new QLabel(tr("Tablet mode")); + m_tabletModeButton = new kdk::KSwitchButton(tabletModeWidget); + m_tabletModeButton->setChecked(getTabletModeEnabled()); + m_tabletModeButton->setEnabled(!getCurrentTabletMode()); + connect(m_tabletModeButton, &kdk::KSwitchButton::clicked, this, [this](bool checked) { + setTabletModeEnabled(checked); + ukcc::UkccCommon::buriedSettings("TouchScreen", "setTabletModeEnabled", "settings", checked ? "true":"false"); + }); + + QHBoxLayout* tabletModeLayout = new QHBoxLayout(tabletModeWidget); + tabletModeLayout->setContentsMargins(0, 0, 0, 0); + tabletModeLayout->addWidget(tabletModeText); + tabletModeLayout->addStretch(); + tabletModeLayout->addWidget(m_tabletModeButton); + tabletModeWidget->setLayout(tabletModeLayout); + + return tabletModeWidget; +} + +QWidget* TabletModeWidget::createTabletTextWidget() const +{ + QWidget* tabletTextWidget = new QWidget; + QLabel* tabletModeText = new QLabel(tr("Currently in tablet mode, please exit tablet mode if you want to close it")); + QLabel* tabletModeIcon = new QLabel; + QPixmap iconPixmap = QIcon::fromTheme(ICON_NAME).pixmap(16,16); + tabletModeIcon->setPixmap(iconPixmap); + + QHBoxLayout* tabletTextLayout = new QHBoxLayout(tabletTextWidget); + tabletTextLayout->setContentsMargins(0, 0, 0, 0); + tabletTextLayout->addWidget(tabletModeIcon); + tabletTextLayout->addWidget(tabletModeText); + tabletTextLayout->addStretch(); + tabletTextWidget->setLayout(tabletTextLayout); + + if(QGSettings::isSchemaInstalled("org.ukui.style")) { + QGSettings* styleSettings = new QGSettings("org.ukui.style", QByteArray(), tabletTextWidget); + connect(styleSettings, &QGSettings::changed, tabletModeIcon, [tabletModeIcon](const QString& key){ + if(key == "iconThemeName") { + QPixmap iconPixmap = QIcon::fromTheme(ICON_NAME).pixmap(16,16); + tabletModeIcon->setPixmap(iconPixmap); + } + }); + } + + return tabletTextWidget; +} + +bool TabletModeWidget::getTabletModeEnabled() const +{ + QDBusInterface statusManager("com.kylin.statusmanager.interface", + "/", + "com.kylin.statusmanager.interface"); + QDBusReply reply = statusManager.call("isTabletModeEnabled"); + if (!reply.isValid()) { + qWarning() << reply.error(); + return false; + } + + return reply.value(); +} + +bool TabletModeWidget::getCurrentTabletMode() const +{ + QDBusInterface statusManager("com.kylin.statusmanager.interface", + "/", + "com.kylin.statusmanager.interface"); + QDBusReply reply = statusManager.call("getCurrentTabletMode"); + if (!reply.isValid()) { + qWarning() << reply.error(); + return false; + } + + return reply.value(); +} + +void TabletModeWidget::setTabletModeEnabled(bool enabled) +{ + QDBusInterface statusManager("com.kylin.statusmanager.interface", + "/", + "com.kylin.statusmanager.interface"); + QDBusMessage res = statusManager.call("setTabletModeEnabled", + QVariant(enabled)); + + if (res.type() == QDBusMessage::ErrorMessage) { + qWarning() << res.errorName() << res.errorMessage(); + } +} + +void TabletModeWidget::onTabletModeChangedState(bool state) +{ + if (state && nullptr == m_tabletTextWidegt) { + m_tabletTextWidegt = createTabletTextWidget(); + this->layout()->setSpacing(0); + this->layout()->addWidget(m_tabletTextWidegt); + } else if (m_tabletTextWidegt != nullptr) { + delete m_tabletTextWidegt; + m_tabletTextWidegt = nullptr; + } + + m_tabletModeButton->setEnabled(!state); +} diff --git a/src/touchscreen-settings/tabletmodewidget.h b/src/touchscreen-settings/tabletmodewidget.h new file mode 100644 index 0000000..6a02021 --- /dev/null +++ b/src/touchscreen-settings/tabletmodewidget.h @@ -0,0 +1,35 @@ +#ifndef TABLETMODEWIDGET_H +#define TABLETMODEWIDGET_H + +#include + +namespace kdk { +class KSwitchButton; +} +class TabletModeWidget : public QFrame +{ + Q_OBJECT + +public: + TabletModeWidget(QWidget* parent = nullptr); + ~TabletModeWidget() = default; + +private: + kdk::KSwitchButton* m_tabletModeButton; + QWidget* m_tabletTextWidegt; + + void initLayout(); + void initTabletModeWidget(); + void initConnect(); + QWidget* createTabletModeWidget(); + QWidget* createTabletTextWidget() const; + + bool getCurrentTabletMode() const; + void setTabletModeEnabled(bool enabled); + bool getTabletModeEnabled() const; + +private slots: + void onTabletModeChangedState(bool state); +}; + +#endif // TABLETMODEWIDGET_H diff --git a/src/touchscreen-settings/touchscreen-settings.cpp b/src/touchscreen-settings/touchscreen-settings.cpp index 33a0d77..5a43b6a 100644 --- a/src/touchscreen-settings/touchscreen-settings.cpp +++ b/src/touchscreen-settings/touchscreen-settings.cpp @@ -112,7 +112,7 @@ QWidget *TouchscreenSettings::pluginUi() QObject::tr("show sidebar"), ":/gif/resources/右边缘左划显示侧边栏.gif") }; - pluginWidget = new TouchScreen(defaultGestureTypes, tr("Tablet Mode"), tr("auto switch tablet mode")); + pluginWidget = new TouchScreen(defaultGestureTypes, tr("Tablet Mode"), tr("Automatically switch tablet mode when plugging and unplugging keyboard")); } } diff --git a/src/touchscreen-settings/touchscreen-settings.pro b/src/touchscreen-settings/touchscreen-settings.pro index 2b73d7e..2482af3 100644 --- a/src/touchscreen-settings/touchscreen-settings.pro +++ b/src/touchscreen-settings/touchscreen-settings.pro @@ -37,11 +37,13 @@ include(../settings-common/settings-common.pri) SOURCES += \ gestureguidance.cpp \ + tabletmodewidget.cpp \ touchscreen-settings.cpp \ touchscreen.cpp HEADERS += \ gestureguidance.h \ + tabletmodewidget.h \ touchscreen-settings.h \ touchscreen.h diff --git a/src/touchscreen-settings/touchscreen.cpp b/src/touchscreen-settings/touchscreen.cpp index 11b31bb..e06fbec 100644 --- a/src/touchscreen-settings/touchscreen.cpp +++ b/src/touchscreen-settings/touchscreen.cpp @@ -38,6 +38,7 @@ #include "gesturewidget.h" #include "touchscreen-settings.h" #include "settingscommon.h" +#include "tabletmodewidget.h" #define KYLIN_USER_GUIDE_PATH "/" #define KYLIN_USER_GUIDE_SERVICE "com.kylinUserGuide.hotel" @@ -107,30 +108,14 @@ void TouchScreen::initUI() //~ contents_path /TouchScreen/Tablet Mode ui->switchTablet_label->setText(m_modeTypeText); - QHBoxLayout* switchTabletLayout = new QHBoxLayout(); - ui->switchTablet_frame->setFrameShape(QFrame::Shape::Box); - ui->switchTablet_frame->setLayout(switchTabletLayout); - QLabel* autoSwtich = new QLabel(m_autoSwitchText); - switchTabletLayout->addWidget(autoSwtich); - switchTabletLayout->addStretch(); - switchTabletLayout->setContentsMargins(16, 0, 16, 0); - m_autoSwitchTablet = new kdk::KSwitchButton(); - m_autoSwitchTablet->setChecked(this->autoSwitchTablet()); - switchTabletLayout->addWidget(m_autoSwitchTablet); - connect(m_autoSwitchTablet, &kdk::KSwitchButton::clicked, this, [this](bool checked) { - setAutoSwitchTablet(checked); - buriedSettings("AutoSwitchTabletModeButton", "settings", checked ? "true":"false"); - }); + TabletModeWidget* tabletModeWidget = new TabletModeWidget; + ui->verticalLayout->insertWidget(2, tabletModeWidget); - QDBusConnection::sessionBus().connect("com.kylin.statusmanager.interface", - "/", - "com.kylin.statusmanager.interface", - "modemonitor_change_signal", - this, - SLOT(setAutoSwitchTabletBtn(bool))); + initAutoTabletModeWidget(); //! \note Do not show tablet mode if os without tablet mode if (!SettingsCommon::isTabletProductFeat()) { + tabletModeWidget->deleteLater(); ui->switchTablet_label->hide(); ui->switchTablet_frame->hide(); ui->horizontalLayout_4->deleteLater(); @@ -160,6 +145,31 @@ void TouchScreen::initUI() }); } +void TouchScreen::initAutoTabletModeWidget() +{ + QHBoxLayout* switchTabletLayout = new QHBoxLayout(); + ui->switchTablet_frame->setFrameShape(QFrame::Shape::Box); + ui->switchTablet_frame->setLayout(switchTabletLayout); + QLabel* autoSwtich = new QLabel(m_autoSwitchText); + switchTabletLayout->addWidget(autoSwtich); + switchTabletLayout->addStretch(); + switchTabletLayout->setContentsMargins(16, 0, 16, 0); + m_autoSwitchTablet = new kdk::KSwitchButton(); + m_autoSwitchTablet->setChecked(this->autoSwitchTablet()); + switchTabletLayout->addWidget(m_autoSwitchTablet); + connect(m_autoSwitchTablet, &kdk::KSwitchButton::clicked, this, [this](bool checked) { + setAutoSwitchTablet(checked); + buriedSettings("AutoSwitchTabletModeButton", "settings", checked ? "true":"false"); + }); + + QDBusConnection::sessionBus().connect("com.kylin.statusmanager.interface", + "/", + "com.kylin.statusmanager.interface", + "modemonitor_change_signal", + this, + SLOT(setAutoSwitchTabletBtn(bool))); +} + void TouchScreen::buriedSettings(QString settingsName, QString action, QString value) const { ukcc::UkccCommon::buriedSettings("TouchScreen", settingsName, action, value); diff --git a/src/touchscreen-settings/touchscreen.h b/src/touchscreen-settings/touchscreen.h index 4d3fac3..23ce0f5 100644 --- a/src/touchscreen-settings/touchscreen.h +++ b/src/touchscreen-settings/touchscreen.h @@ -87,6 +87,7 @@ private: GestureWidget * createGestureWidget(const TouchGestureInfo& gestureInfo); QList createGestureWidgets(); void initUI(); + void initAutoTabletModeWidget(); void loadGif(); void playGif(const QString& gifPath); bool autoSwitchTablet(); diff --git a/src/touchscreen-settings/translations/bo_CN.ts b/src/touchscreen-settings/translations/bo_CN.ts index aa1d43c..a428d26 100644 --- a/src/touchscreen-settings/translations/bo_CN.ts +++ b/src/touchscreen-settings/translations/bo_CN.ts @@ -58,6 +58,17 @@ འགྲེམས་སྟོན་གྱི་གཞོགས་ངོས་མངོན་པ། + + TabletModeWidget + + Tablet mode + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + + TouchScreen @@ -145,6 +156,14 @@ ལག་བརྡ་དེ་བས་མང་བ། /TouchScreen/more gesture + + Tablet mode + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + TouchscreenSettings @@ -185,8 +204,8 @@ - auto switch tablet mode - + Automatically switch tablet mode when plugging and unplugging keyboard + diff --git a/src/touchscreen-settings/translations/de_DE.ts b/src/touchscreen-settings/translations/de_DE.ts index c262139..cacf9d5 100644 --- a/src/touchscreen-settings/translations/de_DE.ts +++ b/src/touchscreen-settings/translations/de_DE.ts @@ -76,6 +76,19 @@ Seitenleiste anzeigen + + TabletModeWidget + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + + TouchScreen @@ -89,12 +102,12 @@ - + Label1 - + Label2 @@ -161,17 +174,27 @@ Wechseln von Fenstern - + Touchscreen gesture Touchscreen-Geste /TouchScreen/touchscreen gesture - + More gesture Mehr Geste /TouchScreen/more gesture + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + TouchscreenSettings @@ -223,8 +246,12 @@ + Automatically switch tablet mode when plugging and unplugging keyboard + + + auto switch tablet mode - Automatisches Umschalten des Tablet-Modus + Automatisches Umschalten des Tablet-Modus diff --git a/src/touchscreen-settings/translations/es_ES.ts b/src/touchscreen-settings/translations/es_ES.ts index 3b1b798..5efa0c0 100644 --- a/src/touchscreen-settings/translations/es_ES.ts +++ b/src/touchscreen-settings/translations/es_ES.ts @@ -76,6 +76,19 @@ Mostrar barra lateral + + TabletModeWidget + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + + TouchScreen @@ -89,12 +102,12 @@ Etiqueta de texto - + Label1 Etiqueta1 - + Label2 Etiqueta2 @@ -161,17 +174,27 @@ Cambiar de ventana - + Touchscreen gesture Gesto de la pantalla táctil /TouchScreen/touchscreen gesture - + More gesture Más gesto /TouchScreen/more gesture + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + TouchscreenSettings @@ -223,8 +246,12 @@ + Automatically switch tablet mode when plugging and unplugging keyboard + + + auto switch tablet mode - Cambiar automáticamente el modo de tableta + Cambiar automáticamente el modo de tableta diff --git a/src/touchscreen-settings/translations/fr_FR.ts b/src/touchscreen-settings/translations/fr_FR.ts index 4feed4f..a045294 100644 --- a/src/touchscreen-settings/translations/fr_FR.ts +++ b/src/touchscreen-settings/translations/fr_FR.ts @@ -76,6 +76,19 @@ Afficher la barre latérale + + TabletModeWidget + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + + TouchScreen @@ -89,12 +102,12 @@ - + Label1 - + Label2 @@ -161,17 +174,27 @@ Changer de fenêtre - + Touchscreen gesture Geste sur l’écran tactile /TouchScreen/touchscreen gesture - + More gesture Plus de gestes /TouchScreen/more gesture + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + TouchscreenSettings @@ -223,8 +246,12 @@ + Automatically switch tablet mode when plugging and unplugging keyboard + + + auto switch tablet mode - Basculer automatiquement en mode tablette + Basculer automatiquement en mode tablette diff --git a/src/touchscreen-settings/translations/kk_KZ.ts b/src/touchscreen-settings/translations/kk_KZ.ts index b1d77f9..bb2d8dc 100644 --- a/src/touchscreen-settings/translations/kk_KZ.ts +++ b/src/touchscreen-settings/translations/kk_KZ.ts @@ -77,6 +77,19 @@ бүйірлік тақтаны көрсету + + TabletModeWidget + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + + TouchScreen @@ -90,27 +103,37 @@ - + Label1 - + Label2 - + Touchscreen gesture Сенсорлы экран қимылы /TouchScreen/touchscreen gesture - + More gesture Қосымша қимыл /TouchScreen/more gesture + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + TouchscreenSettings @@ -162,8 +185,12 @@ + Automatically switch tablet mode when plugging and unplugging keyboard + + + auto switch tablet mode - Планшет режимін автоматты түрде ауыстыру + Планшет режимін автоматты түрде ауыстыру diff --git a/src/touchscreen-settings/translations/ky_KG.ts b/src/touchscreen-settings/translations/ky_KG.ts index f41ab84..4b200fc 100644 --- a/src/touchscreen-settings/translations/ky_KG.ts +++ b/src/touchscreen-settings/translations/ky_KG.ts @@ -76,6 +76,19 @@ сидербар көрсөтүү + + TabletModeWidget + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + + TouchScreen @@ -89,27 +102,37 @@ - + Label1 - + Label2 - + Touchscreen gesture Сенсордук экрандын кыймылдары /TouchScreen/touchscreen gesture - + More gesture Дагы ымыркай /TouchScreen/more gesture + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + TouchscreenSettings @@ -161,8 +184,12 @@ + Automatically switch tablet mode when plugging and unplugging keyboard + + + auto switch tablet mode - Планшет режимин автоматтык түрдө которуу + Планшет режимин автоматтык түрдө которуу diff --git a/src/touchscreen-settings/translations/mn_MN.ts b/src/touchscreen-settings/translations/mn_MN.ts index 94f6fb4..a0a4d79 100644 --- a/src/touchscreen-settings/translations/mn_MN.ts +++ b/src/touchscreen-settings/translations/mn_MN.ts @@ -76,6 +76,19 @@ ᠬᠠᠵᠠᠭᠤ ᠪᠠᠭᠠᠷ ᠎ᠢ ᠳᠠᠭᠤᠳᠠᠬᠤ + + TabletModeWidget + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + + TouchScreen @@ -89,12 +102,12 @@ - + Label1 - + Label2 @@ -161,17 +174,27 @@ ᠨᠡᠬᠡᠬᠡᠭ᠌ᠰᠡᠨ ᠴᠤᠩᠬᠤᠨ ᠎ᠤ ᠬᠤᠭᠤᠷᠤᠨᠳᠤ ᠰᠤᠯᠢᠬᠤ - + Touchscreen gesture ᠬᠦᠷᠦᠯᠴᠡᠬᠦᠢ ᠳᠡᠯᠬᠡᠴᠡ ᠎ᠶ᠋ᠢᠨ ᠭᠠᠷ ᠎ᠤᠨ ᠲᠤᠬᠢᠶ᠎ᠠ /TouchScreen/touchscreen gesture - + More gesture ᠨᠡᠩ ᠤᠯᠠᠨ ᠭᠠᠷ ᠎ᠤᠨ ᠲᠤᠬᠢᠶ᠎ᠠ /TouchScreen/more gesture + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + TouchscreenSettings @@ -223,7 +246,7 @@ - auto switch tablet mode + Automatically switch tablet mode when plugging and unplugging keyboard diff --git a/src/touchscreen-settings/translations/ug_CN.ts b/src/touchscreen-settings/translations/ug_CN.ts index 2de62e6..a170b44 100644 --- a/src/touchscreen-settings/translations/ug_CN.ts +++ b/src/touchscreen-settings/translations/ug_CN.ts @@ -76,6 +76,19 @@ يانبالدىقى كۆرسىتىش + + TabletModeWidget + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + + TouchScreen @@ -89,27 +102,37 @@ - + Label1 - + Label2 - + Touchscreen gesture سېزىمچان ئېكرانلىق قول ئىشارىسى /TouchScreen/touchscreen gesture - + More gesture كۆپ قول ئىشارىسى /TouchScreen/more gesture + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + TouchscreenSettings @@ -161,8 +184,12 @@ + Automatically switch tablet mode when plugging and unplugging keyboard + + + auto switch tablet mode - ئاپتوماتىك تەكشى تاختىلىق ئەندىزىنى ئالماشتۇرۇش + ئاپتوماتىك تەكشى تاختىلىق ئەندىزىنى ئالماشتۇرۇش diff --git a/src/touchscreen-settings/translations/zh_CN.ts b/src/touchscreen-settings/translations/zh_CN.ts index 6fec0d6..cc84c2a 100644 --- a/src/touchscreen-settings/translations/zh_CN.ts +++ b/src/touchscreen-settings/translations/zh_CN.ts @@ -76,6 +76,19 @@ 呼出侧边栏 + + TabletModeWidget + + + Tablet mode + 平板模式 + + + + Currently in tablet mode, please exit tablet mode if you want to close it + 当前为平板环境,如要关闭请退出平板模式。 + + TouchScreen @@ -89,12 +102,12 @@ - + Label1 - + Label2 @@ -178,19 +191,29 @@ 在打开的窗口之间切换 - + Touchscreen gesture 触摸屏手势 触摸屏手势 /TouchScreen/touchscreen gesture - + More gesture 更多手势 更多手势 /TouchScreen/more gesture + + + Tablet mode + 平板模式 + + + + Currently in tablet mode, please exit tablet mode if you want to close it + 当前为平板环境,如要关闭请退出平板模式。 + TouchscreenSettings @@ -244,8 +267,12 @@ + Automatically switch tablet mode when plugging and unplugging keyboard + 插拔键盘时自动切换平板模式 + + auto switch tablet mode - 自动切换平板模式 + 自动切换平板模式 diff --git a/src/touchscreen-settings/translations/zh_HK.ts b/src/touchscreen-settings/translations/zh_HK.ts index 2359bbe..1f86ed4 100644 --- a/src/touchscreen-settings/translations/zh_HK.ts +++ b/src/touchscreen-settings/translations/zh_HK.ts @@ -76,6 +76,19 @@ 呼出側邊欄 + + TabletModeWidget + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + + TouchScreen @@ -89,12 +102,12 @@ - + Label1 - + Label2 @@ -161,17 +174,27 @@ 在打開的視窗之間切換 - + Touchscreen gesture 觸摸屏手勢 /TouchScreen/touchscreen gesture - + More gesture 更多手勢 /TouchScreen/more gesture + + + Tablet mode + + + + + Currently in tablet mode, please exit tablet mode if you want to close it + + TouchscreenSettings @@ -223,7 +246,7 @@ - auto switch tablet mode + Automatically switch tablet mode when plugging and unplugging keyboard