Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Plasma
Plasma Desktop
Commits
1948f21b
Commit
1948f21b
authored
Feb 15, 2018
by
Albert Astals Cid
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/Plasma/5.12'
parents
a0ca2d1b
2b098f69
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
160 additions
and
25 deletions
+160
-25
applets/kicker/package/contents/ui/DashboardRepresentation.qml
...ts/kicker/package/contents/ui/DashboardRepresentation.qml
+95
-2
applets/kicker/package/contents/ui/DashboardTabBar.qml
applets/kicker/package/contents/ui/DashboardTabBar.qml
+20
-0
applets/kicker/package/contents/ui/ItemGridView.qml
applets/kicker/package/contents/ui/ItemGridView.qml
+30
-22
applets/kicker/plugin/dashboardwindow.cpp
applets/kicker/plugin/dashboardwindow.cpp
+3
-1
containments/desktop/package/contents/ui/FolderViewLayer.qml
containments/desktop/package/contents/ui/FolderViewLayer.qml
+1
-0
kcms/lookandfeel/CMakeLists.txt
kcms/lookandfeel/CMakeLists.txt
+2
-0
kcms/lookandfeel/kcm.cpp
kcms/lookandfeel/kcm.cpp
+2
-0
kcms/touchpad/src/backends/x11/xlibbackend.cpp
kcms/touchpad/src/backends/x11/xlibbackend.cpp
+7
-0
No files found.
applets/kicker/package/contents/ui/DashboardRepresentation.qml
View file @
1948f21b
...
...
@@ -319,6 +319,28 @@ Kicker.DashboardWindow {
flat
:
false
onClicked
:
searchField
.
clear
();
Keys.onPressed
:
{
if
(
event
.
key
==
Qt
.
Key_Tab
)
{
event
.
accepted
=
true
;
if
(
runnerModel
.
count
)
{
mainColumn
.
tryActivate
(
0
,
0
);
}
else
{
systemFavoritesGrid
.
tryActivate
(
0
,
0
);
}
}
else
if
(
event
.
key
==
Qt
.
Key_Backtab
)
{
event
.
accepted
=
true
;
if
(
tabBar
.
visible
)
{
tabBar
.
focus
=
true
;
}
else
if
(
globalFavoritesGrid
.
enabled
)
{
globalFavoritesGrid
.
tryActivate
(
0
,
0
);
}
else
{
systemFavoritesGrid
.
tryActivate
(
0
,
0
);
}
}
}
}
Row
{
...
...
@@ -339,8 +361,6 @@ Kicker.DashboardWindow {
Item
{
id
:
favoritesColumn
anchors
{
top
:
parent
.
top
bottom
:
parent
.
bottom
...
...
@@ -438,6 +458,23 @@ Kicker.DashboardWindow {
systemFavoritesGrid
.
tryActivate
(
0
,
currentCol
());
}
Keys.onPressed
:
{
if
(
event
.
key
==
Qt
.
Key_Tab
)
{
event
.
accepted
=
true
;
if
(
tabBar
.
visible
)
{
tabBar
.
focus
=
true
;
}
else
if
(
searching
)
{
cancelSearchButton
.
focus
=
true
;
}
else
{
mainColumn
.
tryActivate
(
0
,
0
);
}
}
else
if
(
event
.
key
==
Qt
.
Key_Backtab
)
{
event
.
accepted
=
true
;
systemFavoritesGrid
.
tryActivate
(
0
,
0
);
}
}
Binding
{
target
:
globalFavorites
property
:
"
iconSize
"
...
...
@@ -477,6 +514,32 @@ Kicker.DashboardWindow {
onKeyNavUp
:
{
globalFavoritesGrid
.
tryActivate
(
globalFavoritesGrid
.
rows
-
1
,
currentCol
());
}
Keys.onPressed
:
{
if
(
event
.
key
==
Qt
.
Key_Tab
)
{
event
.
accepted
=
true
;
if
(
globalFavoritesGrid
.
enabled
)
{
globalFavoritesGrid
.
tryActivate
(
0
,
0
);
}
else
if
(
tabBar
.
visible
)
{
tabBar
.
focus
=
true
;
}
else
if
(
searching
&&
!
runnerModel
.
count
)
{
cancelSearchButton
.
focus
=
true
;
}
else
{
mainColumn
.
tryActivate
(
0
,
0
);
}
}
else
if
(
event
.
key
==
Qt
.
Key_Backtab
)
{
event
.
accepted
=
true
;
if
(
filterList
.
enabled
)
{
filterList
.
forceActiveFocus
();
}
else
if
(
searching
&&
!
runnerModel
.
count
)
{
cancelSearchButton
.
focus
=
true
;
}
else
{
mainColumn
.
tryActivate
(
0
,
0
);
}
}
}
}
}
...
...
@@ -693,6 +756,30 @@ Kicker.DashboardWindow {
target
.
tryActivate
(
targetRow
,
favoritesColumn
.
columns
-
1
);
}
}
Keys.onPressed
:
{
if
(
event
.
key
==
Qt
.
Key_Tab
)
{
event
.
accepted
=
true
;
if
(
filterList
.
enabled
)
{
filterList
.
forceActiveFocus
();
}
else
{
systemFavoritesGrid
.
tryActivate
(
0
,
0
);
}
}
else
if
(
event
.
key
==
Qt
.
Key_Backtab
)
{
event
.
accepted
=
true
;
if
(
searching
)
{
cancelSearchButton
.
focus
=
true
;
}
else
if
(
tabBar
.
visible
)
{
tabBar
.
focus
=
true
;
}
else
if
(
globalFavoritesGrid
.
enabled
)
{
globalFavoritesGrid
.
tryActivate
(
0
,
0
);
}
else
{
systemFavoritesGrid
.
tryActivate
(
0
,
0
);
}
}
}
}
Item
{
...
...
@@ -953,6 +1040,12 @@ Kicker.DashboardWindow {
var
currentRow
=
Math
.
max
(
0
,
Math
.
ceil
(
currentItem
.
y
/
mainGrid
.
cellHeight
)
-
1
);
mainColumn
.
tryActivate
(
currentRow
,
mainColumn
.
columns
-
1
);
}
else
if
(
event
.
key
==
Qt
.
Key_Tab
)
{
event
.
accepted
=
true
;
systemFavoritesGrid
.
tryActivate
(
0
,
0
);
}
else
if
(
event
.
key
==
Qt
.
Key_Backtab
)
{
event
.
accepted
=
true
;
mainColumn
.
tryActivate
(
0
,
0
);
}
}
}
...
...
applets/kicker/package/contents/ui/DashboardTabBar.qml
View file @
1948f21b
...
...
@@ -66,5 +66,25 @@ Row {
activeTab
=
1
;
}
}
Keys.onPressed
:
{
if
(
event
.
key
==
Qt
.
Key_Tab
)
{
event
.
accepted
=
true
;
if
(
searching
)
{
cancelSearchButton
.
focus
=
true
;
}
else
{
mainColumn
.
tryActivate
(
0
,
0
);
}
}
else
if
(
event
.
key
==
Qt
.
Key_Backtab
)
{
event
.
accepted
=
true
;
if
(
globalFavoritesGrid
.
enabled
)
{
globalFavoritesGrid
.
tryActivate
(
0
,
0
);
}
else
{
systemFavoritesGrid
.
tryActivate
(
0
,
0
);
}
}
}
}
applets/kicker/package/contents/ui/ItemGridView.qml
View file @
1948f21b
...
...
@@ -359,12 +359,38 @@ FocusScope {
hoverEnabled
:
true
function
updatePositionProperties
(
x
,
y
)
{
// Prevent hover event synthesis in QQuickWindow interfering
// with keyboard navigation by ignoring repeated events with
// identical coordinates. As the work done here would be re-
// dundant in any case, these are safe to ignore.
if
(
lastX
==
x
&&
lastY
==
y
)
{
return
;
}
lastX
=
x
;
lastY
=
y
;
var
cPos
=
mapToItem
(
gridView
.
contentItem
,
x
,
y
);
var
item
=
gridView
.
itemAt
(
cPos
.
x
,
cPos
.
y
);
if
(
!
item
)
{
gridView
.
currentIndex
=
-
1
;
pressedItem
=
null
;
}
else
{
gridView
.
currentIndex
=
item
.
itemIndex
;
itemGrid
.
focus
=
(
currentIndex
!=
-
1
)
}
}
onPressed
:
{
mouse
.
accepted
=
true
;
updatePositionProperties
(
mouse
.
x
,
mouse
.
y
);
pressX
=
mouse
.
x
;
pressY
=
mouse
.
y
;
mouse
.
accepted
=
true
;
if
(
mouse
.
button
==
Qt
.
RightButton
)
{
if
(
gridView
.
currentItem
)
{
if
(
gridView
.
currentItem
.
hasActionList
)
{
...
...
@@ -400,27 +426,9 @@ FocusScope {
}
onPositionChanged
:
{
// Prevent hover event synthesis in QQuickWindow interfering
// with keyboard navigation by ignoring repeated events with
// identical coordinates. As the work done here would be re-
// dundant in any case, these are safe to ignore.
if
(
mouse
.
x
==
lastX
&&
mouse
.
y
==
lastY
)
{
return
;
}
lastX
=
mouse
.
x
;
lastY
=
mouse
.
y
;
var
cPos
=
mapToItem
(
gridView
.
contentItem
,
mouse
.
x
,
mouse
.
y
);
var
item
=
gridView
.
itemAt
(
cPos
.
x
,
cPos
.
y
);
if
(
!
item
)
{
gridView
.
currentIndex
=
-
1
;
pressedItem
=
null
;
}
else
{
gridView
.
currentIndex
=
item
.
itemIndex
;
itemGrid
.
focus
=
(
currentIndex
!=
-
1
)
updatePositionProperties
(
mouse
.
x
,
mouse
.
y
);
if
(
gridView
.
currentIndex
!=
-
1
)
{
if
(
dragEnabled
&&
pressX
!=
-
1
&&
dragHelper
.
isDrag
(
pressX
,
pressY
,
mouse
.
x
,
mouse
.
y
))
{
if
(
"
pluginName
"
in
item
.
m
)
{
dragHelper
.
startDrag
(
kicker
,
item
.
url
,
item
.
icon
,
...
...
applets/kicker/plugin/dashboardwindow.cpp
View file @
1948f21b
...
...
@@ -179,7 +179,9 @@ void DashboardWindow::keyPressEvent(QKeyEvent *e)
&&
!
(
e
->
key
()
==
Qt
::
Key_PageDown
)
&&
!
(
e
->
key
()
==
Qt
::
Key_Enter
)
&&
!
(
e
->
key
()
==
Qt
::
Key_Return
)
&&
!
(
e
->
key
()
==
Qt
::
Key_Menu
))
{
&&
!
(
e
->
key
()
==
Qt
::
Key_Menu
)
&&
!
(
e
->
key
()
==
Qt
::
Key_Tab
)
&&
!
(
e
->
key
()
==
Qt
::
Key_Backtab
))
{
QPointer
<
QQuickItem
>
previousFocusItem
=
activeFocusItem
();
...
...
containments/desktop/package/contents/ui/FolderViewLayer.qml
View file @
1948f21b
...
...
@@ -270,6 +270,7 @@ Item {
windowPin
=
windowPinComponent
.
createObject
(
label
);
}
else
if
(
windowPin
)
{
windowPin
.
destroy
();
windowPin
=
null
;
}
}
...
...
kcms/lookandfeel/CMakeLists.txt
View file @
1948f21b
...
...
@@ -71,6 +71,8 @@ set(lookandfeeltool_SRCS
qt5_add_dbus_interface
(
lookandfeeltool_SRCS
${
klauncher_xml
}
klauncher_iface
)
add_executable
(
lookandfeeltool
${
lookandfeeltool_SRCS
}
)
# TODO: load kcm plugin instead of using code copy
target_compile_definitions
(
lookandfeeltool PRIVATE -DDEFINE_NO_PLUGIN
)
target_link_libraries
(
lookandfeeltool
KF5::KIOWidgets
...
...
kcms/lookandfeel/kcm.cpp
View file @
1948f21b
...
...
@@ -57,7 +57,9 @@
# include <X11/extensions/Xfixes.h>
#endif
#ifndef DEFINE_NO_PLUGIN
K_PLUGIN_FACTORY_WITH_JSON
(
KCMLookandFeelFactory
,
"kcm_lookandfeel.json"
,
registerPlugin
<
KCMLookandFeel
>
();)
#endif
KCMLookandFeel
::
KCMLookandFeel
(
QObject
*
parent
,
const
QVariantList
&
args
)
:
KQuickAddons
::
ConfigModule
(
parent
,
args
)
...
...
kcms/touchpad/src/backends/x11/xlibbackend.cpp
View file @
1948f21b
...
...
@@ -164,6 +164,13 @@ void XlibBackend::setTouchpadEnabled(bool enable)
}
m_device
->
setEnabled
(
enable
);
// FIXME? This should not be needed, m_notifications should trigger
// a propertyChanged signal when we enable/disable the touchpad,
// that will emit touchpadStateChanged, but for some reason
// XlibNotifications is not getting the property change events
// so we just emit touchpadStateChanged from here as a workaround
Q_EMIT
touchpadStateChanged
();
}
void
XlibBackend
::
setTouchpadOff
(
TouchpadBackend
::
TouchpadOffState
state
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment