mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix(accessible): 部分标记控件重命名
取出部分控件标记命名中的sni:文字, 解决托盘图标的tips控件标记名会变化的问题 Log: 控件标记的名称稍微修改了下 Change-Id: I68d9a18154e985d974af0d6c7971d86729bb7099 Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/578 Reviewed-by: <mailman@uniontech.com> Reviewed-by: fanpengcheng <fanpengcheng@uniontech.com> Tested-by: <mailman@uniontech.com>
This commit is contained in:
parent
947103c45d
commit
0103f4165c
@ -72,12 +72,8 @@ DockItemManager::DockItemManager(QObject *parent)
|
|||||||
|
|
||||||
// 刷新图标
|
// 刷新图标
|
||||||
QMetaObject::invokeMethod(this, "refershItemsIcon", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, "refershItemsIcon", Qt::QueuedConnection);
|
||||||
|
|
||||||
// 自动化测试,需要从后端读取的插件配置中,显示的插件默认需要有enable属性,这里主动向后端写入一次
|
|
||||||
m_updatePluginsOrderTimer->start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DockItemManager *DockItemManager::instance(QObject *parent)
|
DockItemManager *DockItemManager::instance(QObject *parent)
|
||||||
{
|
{
|
||||||
if (!INSTANCE)
|
if (!INSTANCE)
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include "../item/components/floatingpreview.h"
|
#include "../item/components/floatingpreview.h"
|
||||||
|
|
||||||
#include "../plugins/tray/snitraywidget.h"
|
#include "../plugins/tray/snitraywidget.h"
|
||||||
|
#include "../plugins/tray/abstracttraywidget.h"
|
||||||
#include "../plugins/tray/indicatortraywidget.h"
|
#include "../plugins/tray/indicatortraywidget.h"
|
||||||
#include "../plugins/tray/xembedtraywidget.h"
|
#include "../plugins/tray/xembedtraywidget.h"
|
||||||
#include "../plugins/tray/system-trays/systemtrayitem.h"
|
#include "../plugins/tray/system-trays/systemtrayitem.h"
|
||||||
@ -66,10 +67,11 @@ SET_BUTTON_ACCESSIBLE(PlaceholderItem, "placeholderitem")
|
|||||||
SET_BUTTON_ACCESSIBLE(AppDragWidget, "appdragwidget")
|
SET_BUTTON_ACCESSIBLE(AppDragWidget, "appdragwidget")
|
||||||
SET_BUTTON_ACCESSIBLE(AppSnapshot, "appsnapshot")
|
SET_BUTTON_ACCESSIBLE(AppSnapshot, "appsnapshot")
|
||||||
SET_BUTTON_ACCESSIBLE(FloatingPreview, "floatingpreview")
|
SET_BUTTON_ACCESSIBLE(FloatingPreview, "floatingpreview")
|
||||||
SET_BUTTON_ACCESSIBLE(XEmbedTrayWidget, m_w->itemKeyForConfig())
|
SET_BUTTON_ACCESSIBLE(XEmbedTrayWidget, m_w->itemKeyForConfig().replace("sni:",""))
|
||||||
SET_BUTTON_ACCESSIBLE(IndicatorTrayWidget, m_w->itemKeyForConfig())
|
SET_BUTTON_ACCESSIBLE(IndicatorTrayWidget, m_w->itemKeyForConfig().replace("sni:",""))
|
||||||
SET_BUTTON_ACCESSIBLE(SNITrayWidget, m_w->itemKeyForConfig())
|
SET_BUTTON_ACCESSIBLE(SNITrayWidget, m_w->itemKeyForConfig().replace("sni:",""))
|
||||||
SET_BUTTON_ACCESSIBLE(SystemTrayItem, m_w->itemKeyForConfig())
|
SET_BUTTON_ACCESSIBLE(AbstractTrayWidget, m_w->itemKeyForConfig().replace("sni:",""))
|
||||||
|
SET_BUTTON_ACCESSIBLE(SystemTrayItem, m_w->itemKeyForConfig().replace("sni:",""))
|
||||||
SET_FORM_ACCESSIBLE(FashionTrayItem, "fashiontrayitem")
|
SET_FORM_ACCESSIBLE(FashionTrayItem, "fashiontrayitem")
|
||||||
SET_FORM_ACCESSIBLE(FashionTrayWidgetWrapper, "fashiontraywrapper")
|
SET_FORM_ACCESSIBLE(FashionTrayWidgetWrapper, "fashiontraywrapper")
|
||||||
SET_BUTTON_ACCESSIBLE(FashionTrayControlWidget, "fashiontraycontrolwidget")
|
SET_BUTTON_ACCESSIBLE(FashionTrayControlWidget, "fashiontraycontrolwidget")
|
||||||
@ -91,7 +93,7 @@ SET_FORM_ACCESSIBLE(MultitaskingWidget, "plugin-multitasking")
|
|||||||
SET_FORM_ACCESSIBLE(ShowDesktopWidget, "plugin-showdesktop")
|
SET_FORM_ACCESSIBLE(ShowDesktopWidget, "plugin-showdesktop")
|
||||||
SET_FORM_ACCESSIBLE(OverlayWarningWidget, "plugin-overlaywarningwidget")
|
SET_FORM_ACCESSIBLE(OverlayWarningWidget, "plugin-overlaywarningwidget")
|
||||||
SET_FORM_ACCESSIBLE(QWidget, m_w->objectName().isEmpty() ? "widget" : m_w->objectName())
|
SET_FORM_ACCESSIBLE(QWidget, m_w->objectName().isEmpty() ? "widget" : m_w->objectName())
|
||||||
SET_LABEL_ACCESSIBLE(QLabel, m_w->objectName() == "notifications" ? m_w->objectName() : m_w->text().isEmpty() ? m_w->objectName().isEmpty() ? "text" : m_w->objectName() : m_w->text())
|
SET_LABEL_ACCESSIBLE(QLabel, m_w->objectName() == "notifications" ? m_w->objectName() : m_w->text().isEmpty() ? m_w->objectName().isEmpty() ? "text" : m_w->objectName() : m_w->text())
|
||||||
SET_BUTTON_ACCESSIBLE(DIconButton, m_w->objectName().isEmpty() ? "imagebutton" : m_w->objectName())
|
SET_BUTTON_ACCESSIBLE(DIconButton, m_w->objectName().isEmpty() ? "imagebutton" : m_w->objectName())
|
||||||
SET_BUTTON_ACCESSIBLE(DSwitchButton, m_w->text().isEmpty() ? "switchbutton" : m_w->text())
|
SET_BUTTON_ACCESSIBLE(DSwitchButton, m_w->text().isEmpty() ? "switchbutton" : m_w->text())
|
||||||
SET_BUTTON_ACCESSIBLE(DesktopWidget, "desktopWidget");
|
SET_BUTTON_ACCESSIBLE(DesktopWidget, "desktopWidget");
|
||||||
@ -113,6 +115,7 @@ QAccessibleInterface *accessibleFactory(const QString &classname, QObject *objec
|
|||||||
USE_ACCESSIBLE(classname, AppSnapshot);
|
USE_ACCESSIBLE(classname, AppSnapshot);
|
||||||
USE_ACCESSIBLE(classname, FloatingPreview);
|
USE_ACCESSIBLE(classname, FloatingPreview);
|
||||||
USE_ACCESSIBLE(classname, SNITrayWidget);
|
USE_ACCESSIBLE(classname, SNITrayWidget);
|
||||||
|
USE_ACCESSIBLE(classname, AbstractTrayWidget);
|
||||||
USE_ACCESSIBLE(classname, SystemTrayItem);
|
USE_ACCESSIBLE(classname, SystemTrayItem);
|
||||||
USE_ACCESSIBLE(classname, FashionTrayItem);
|
USE_ACCESSIBLE(classname, FashionTrayItem);
|
||||||
USE_ACCESSIBLE(classname, FashionTrayWidgetWrapper);
|
USE_ACCESSIBLE(classname, FashionTrayWidgetWrapper);
|
||||||
|
@ -46,7 +46,6 @@ SoundItem::SoundItem(QWidget *parent)
|
|||||||
, m_applet(new SoundApplet(this))
|
, m_applet(new SoundApplet(this))
|
||||||
, m_sinkInter(nullptr)
|
, m_sinkInter(nullptr)
|
||||||
{
|
{
|
||||||
m_tipsLabel->setObjectName("sound");
|
|
||||||
m_tipsLabel->setAccessibleName("soundtips");
|
m_tipsLabel->setAccessibleName("soundtips");
|
||||||
m_tipsLabel->setVisible(false);
|
m_tipsLabel->setVisible(false);
|
||||||
|
|
||||||
|
@ -603,7 +603,8 @@ void SNITrayWidget::showHoverTips()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
m_tipsLabel->setText(tooltip.title);
|
m_tipsLabel->setText(tooltip.title);
|
||||||
m_tipsLabel->setAccessibleName(tooltip.title);
|
m_tipsLabel->setAccessibleName(itemKeyForConfig().replace("sni:",""));
|
||||||
|
|
||||||
showPopupWindow(m_tipsLabel);
|
showPopupWindow(m_tipsLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ SystemTrayItem::SystemTrayItem(PluginsItemInterface *const pluginInter, const QS
|
|||||||
hLayout->setMargin(0);
|
hLayout->setMargin(0);
|
||||||
|
|
||||||
setLayout(hLayout);
|
setLayout(hLayout);
|
||||||
setAccessibleName(m_pluginInter->pluginName() + "-" + m_itemKey);
|
setAccessibleName(m_itemKey);
|
||||||
setAttribute(Qt::WA_TranslucentBackground);
|
setAttribute(Qt::WA_TranslucentBackground);
|
||||||
|
|
||||||
if (PopupWindow.isNull()) {
|
if (PopupWindow.isNull()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user