diff --git a/org.kde.desktop/CheckBox.qml b/org.kde.desktop/CheckBox.qml --- a/org.kde.desktop/CheckBox.qml +++ b/org.kde.desktop/CheckBox.qml @@ -70,5 +70,9 @@ visible: controlRoot.text horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter + + FocusRect { + control: controlRoot + } } } diff --git a/org.kde.desktop/RadioButton.qml b/org.kde.desktop/RadioButton.qml --- a/org.kde.desktop/RadioButton.qml +++ b/org.kde.desktop/RadioButton.qml @@ -70,5 +70,9 @@ visible: control.text horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter + + FocusRect { + control: controlRoot + } } } diff --git a/org.kde.desktop/private/FocusRect.qml b/org.kde.desktop/private/FocusRect.qml new file mode 100644 --- /dev/null +++ b/org.kde.desktop/private/FocusRect.qml @@ -0,0 +1,39 @@ +/* + * Copyright 2018 Kai Uwe Broulik + * Copyright 2017 The Qt Company Ltd. + * + * GNU Lesser General Public License Usage + * Alternatively, this file may be used under the terms of the GNU Lesser + * General Public License version 3 as published by the Free Software + * Foundation and appearing in the file LICENSE.LGPLv3 included in the + * packaging of this file. Please review the following information to + * ensure the GNU Lesser General Public License version 3 requirements + * will be met: https://www.gnu.org/licenses/lgpl.html. + * + * GNU General Public License Usage + * Alternatively, this file may be used under the terms of the GNU + * General Public License version 2.0 or later as published by the Free + * Software Foundation and appearing in the file LICENSE.GPL included in + * the packaging of this file. Please review the following information to + * ensure the GNU General Public License version 2.0 requirements will be + * met: http://www.gnu.org/licenses/gpl-2.0.html. + */ + + +import QtQuick 2.6 +import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate + +StylePrivate.StyleItem { + elementType: "focusrect" + // those random numbers come from QQC1 desktop style + anchors { + left: parent.left + top: parent.top + bottom: parent.bottom + leftMargin: parent.leftPadding - 2 + topMargin: parent.topPadding - 1 + bottomMargin: parent.bottomPadding - 1 + } + width: parent.implicitWidth - parent.leftPadding - parent.rightPadding + 3 + visible: control.activeFocus +}