mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: 解决accesible问题
通知中心的tips消息是根据数量改变的需要按照objectName来显示,不可变换,系统插件和托盘插件未显示对应的信息 Log: 修改自动化标记问题 (cherry picked from commit 52b5cfa1f46a245c4c72a52593de6a5805f69ef8)
This commit is contained in:
parent
52e62425e9
commit
218e6ae867
@ -69,7 +69,8 @@ void DockPopupWindow::setContent(QWidget *content)
|
||||
QAccessibleEvent event(this, QAccessible::NameChanged);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
|
||||
setAccessibleName(content->objectName() + "-popup");
|
||||
if (!content->objectName().trimmed().isEmpty())
|
||||
setAccessibleName(content->objectName() + "-popup");
|
||||
|
||||
DArrowRectangle::setContent(content);
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ SET_FORM_ACCESSIBLE(MultitaskingWidget, "plugin-multitasking")
|
||||
SET_FORM_ACCESSIBLE(ShowDesktopWidget, "plugin-showdesktop")
|
||||
SET_FORM_ACCESSIBLE(OverlayWarningWidget, "plugin-overlaywarningwidget")
|
||||
SET_FORM_ACCESSIBLE(QWidget, m_w->objectName().isEmpty() ? "widget" : m_w->objectName())
|
||||
SET_LABEL_ACCESSIBLE(QLabel, 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(DSwitchButton, m_w->text().isEmpty() ? "switchbutton" : m_w->text())
|
||||
SET_BUTTON_ACCESSIBLE(DesktopWidget, "desktopWidget");
|
||||
|
@ -40,7 +40,7 @@ TrashPlugin::TrashPlugin(QObject *parent)
|
||||
, m_trashWidget(nullptr)
|
||||
, m_tipsLabel(new TipsWidget)
|
||||
{
|
||||
m_tipsLabel->setObjectName("trashtips");
|
||||
m_tipsLabel->setObjectName("trash");
|
||||
}
|
||||
|
||||
const QString TrashPlugin::pluginName() const
|
||||
|
@ -603,6 +603,7 @@ void SNITrayWidget::showHoverTips()
|
||||
return;
|
||||
|
||||
m_tipsLabel->setText(tooltip.title);
|
||||
m_tipsLabel->setAccessibleName(tooltip.title);
|
||||
showPopupWindow(m_tipsLabel);
|
||||
}
|
||||
|
||||
|
@ -137,11 +137,13 @@ void SystemTrayItem::sendClick(uint8_t mouseButton, int x, int y)
|
||||
|
||||
QWidget *SystemTrayItem::trayTipsWidget()
|
||||
{
|
||||
m_pluginInter->itemTipsWidget(m_itemKey)->setAccessibleName(m_pluginInter->pluginName());
|
||||
return m_pluginInter->itemTipsWidget(m_itemKey);
|
||||
}
|
||||
|
||||
QWidget *SystemTrayItem::trayPopupApplet()
|
||||
{
|
||||
m_pluginInter->itemPopupApplet(m_itemKey)->setAccessibleName(m_pluginInter->pluginName());
|
||||
return m_pluginInter->itemPopupApplet(m_itemKey);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user