Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/windowswitcher/WindowSwitcher.qml
Show All 31 Lines | 29 | KWin.Switcher { | |||
---|---|---|---|---|---|
32 | readonly property real screenFactor: screenGeometry.width / screenGeometry.height | 32 | readonly property real screenFactor: screenGeometry.width / screenGeometry.height | ||
33 | 33 | | |||
34 | currentIndex: thumbnailListView.currentIndex | 34 | currentIndex: thumbnailListView.currentIndex | ||
35 | 35 | | |||
36 | PlasmaCore.Dialog { | 36 | PlasmaCore.Dialog { | ||
37 | id: dialog | 37 | id: dialog | ||
38 | location: Qt.application.layoutDirection === Qt.RightToLeft ? PlasmaCore.Types.RightEdge : PlasmaCore.Types.LeftEdge | 38 | location: Qt.application.layoutDirection === Qt.RightToLeft ? PlasmaCore.Types.RightEdge : PlasmaCore.Types.LeftEdge | ||
39 | visible: tabBox.visible | 39 | visible: tabBox.visible | ||
40 | flags: Qt.X11BypassWindowManagerHint | | |||
41 | x: screenGeometry.x + (Qt.application.layoutDirection === Qt.RightToLeft ? screenGeometry.width - width : 0) | 40 | x: screenGeometry.x + (Qt.application.layoutDirection === Qt.RightToLeft ? screenGeometry.width - width : 0) | ||
42 | y: screenGeometry.y | 41 | y: screenGeometry.y | ||
43 | 42 | | |||
44 | mainItem: PlasmaExtras.ScrollArea { | 43 | mainItem: PlasmaExtras.ScrollArea { | ||
45 | id: dialogMainItem | 44 | id: dialogMainItem | ||
46 | 45 | | |||
47 | focus: true | 46 | focus: true | ||
48 | 47 | | |||
broulik: Doesn't the `focus: true` imply that already? | |||||
It would if the window did end up having the focus in some form. As far as I can tell it doesn't ever get the focus (since kwin decided that it shouldn't). Doing this makes qt quick focus handling work while leaving the real window focus alone. gladhorn: It would if the window did end up having the focus in some form. As far as I can tell it… | |||||
Solutions like this always carry the risk of regression. What if in a future Qt release the window focus gets checked before focus gets force activated? romangg: Solutions like this always carry the risk of regression. What if in a future Qt release the… | |||||
49 | width: tabBox.screenGeometry.width * 0.15 + (__verticalScrollBar.visible ? __verticalScrollBar.width : 0) | 48 | width: tabBox.screenGeometry.width * 0.15 + (__verticalScrollBar.visible ? __verticalScrollBar.width : 0) | ||
50 | height: tabBox.screenGeometry.height - dialog.margins.top - dialog.margins.bottom | 49 | height: tabBox.screenGeometry.height - dialog.margins.top - dialog.margins.bottom | ||
51 | 50 | | |||
52 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | 51 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | ||
53 | LayoutMirroring.childrenInherit: true | 52 | LayoutMirroring.childrenInherit: true | ||
54 | 53 | | |||
55 | ListView { | 54 | ListView { | ||
56 | id: thumbnailListView | 55 | id: thumbnailListView | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 110 | PlasmaExtras.Heading { | |||
112 | Layout.fillWidth: true | 111 | Layout.fillWidth: true | ||
113 | height: undefined | 112 | height: undefined | ||
114 | level: 4 | 113 | level: 4 | ||
115 | text: model.caption | 114 | text: model.caption | ||
116 | elide: Text.ElideRight | 115 | elide: Text.ElideRight | ||
117 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere | 116 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere | ||
118 | maximumLineCount: 2 | 117 | maximumLineCount: 2 | ||
119 | lineHeight: 0.95 | 118 | lineHeight: 0.95 | ||
119 | focus: index == thumbnailListView.currentIndex | ||||
120 | } | 120 | } | ||
121 | } | 121 | } | ||
122 | } | 122 | } | ||
123 | } | 123 | } | ||
124 | 124 | | |||
125 | highlight: PlasmaComponents.Highlight {} | 125 | highlight: PlasmaComponents.Highlight {} | ||
126 | } | 126 | } | ||
127 | } | 127 | } | ||
128 | } | 128 | } | ||
129 | } | 129 | } | ||
130 | 130 | |
Doesn't the focus: true imply that already?