thumbnail_grid: allow screen reader to announce window name when pressing Alt+Tab
CCBUG: 472643
This commit is contained in:
parent
dbad45d052
commit
463c18f9fa
1 changed files with 8 additions and 5 deletions
|
@ -8,7 +8,7 @@
|
||||||
SPDX-License-Identifier: GPL-2.0-or-later
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.ksvg 1.0 as KSvg
|
import org.kde.ksvg 1.0 as KSvg
|
||||||
|
@ -96,7 +96,7 @@ KWin.TabBoxSwitcher {
|
||||||
GridView {
|
GridView {
|
||||||
id: thumbnailGridView
|
id: thumbnailGridView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
focus: true
|
||||||
model: tabBox.model
|
model: tabBox.model
|
||||||
|
|
||||||
readonly property int iconSize: Kirigami.Units.iconSizes.huge
|
readonly property int iconSize: Kirigami.Units.iconSizes.huge
|
||||||
|
@ -114,7 +114,10 @@ KWin.TabBoxSwitcher {
|
||||||
id: thumbnailGridItem
|
id: thumbnailGridItem
|
||||||
width: thumbnailGridView.cellWidth
|
width: thumbnailGridView.cellWidth
|
||||||
height: thumbnailGridView.cellHeight
|
height: thumbnailGridView.cellHeight
|
||||||
readonly property bool isCurrentItem: GridView.isCurrentItem
|
focus: GridView.isCurrentItem
|
||||||
|
|
||||||
|
Accessible.name: model.caption
|
||||||
|
Accessible.role: Accessible.ListItem
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
|
@ -173,7 +176,7 @@ KWin.TabBoxSwitcher {
|
||||||
visible: model.closeable && typeof tabBox.model.close !== 'undefined' &&
|
visible: model.closeable && typeof tabBox.model.close !== 'undefined' &&
|
||||||
(mouseArea.containsMouse
|
(mouseArea.containsMouse
|
||||||
|| closeButton.hovered
|
|| closeButton.hovered
|
||||||
|| thumbnailGridItem.isCurrentItem
|
|| thumbnailGridItem.focus
|
||||||
|| Kirigami.Settings.tabletMode
|
|| Kirigami.Settings.tabletMode
|
||||||
|| Kirigami.Settings.hasTransientTouchInput
|
|| Kirigami.Settings.hasTransientTouchInput
|
||||||
)
|
)
|
||||||
|
@ -187,7 +190,7 @@ KWin.TabBoxSwitcher {
|
||||||
PlasmaComponents3.Label {
|
PlasmaComponents3.Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: model.caption
|
text: model.caption
|
||||||
font.weight: thumbnailGridItem.isCurrentItem ? Font.Bold : Font.Normal
|
font.weight: thumbnailGridItem.focus ? Font.Bold : Font.Normal
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
|
|
Loading…
Reference in a new issue