I /think/ you want to change the checkbox to monitor activeFocus rather
than focus to show the correct highlight.

i.e in.
plasma/declarativeimports/plasmacomponents/qml/Private/DualStateButton.qml
change

line 79.
-        state: (dualButton.enabled && (dualButton.focus ||
mouseArea.containsMouse)) ? "hover" : "shadow"
+        state: (dualButton.enabled && (dualButton.activeFocus ||
mouseArea.containsMouse)) ? "hover" : "shadow"


Note the above is completely untested :)

David

On Tue, Jul 9, 2013 at 2:08 PM, Kai Uwe Broulik <k...@privat.broulik.de>wrote:

> Hi,
>
> I'm currently trying to improve (implement at all) keyboard navigation for
> the
> battery monitor. It works quite well except that the sliders don't have any
> visual "has focus" indication.
>
> What also gives me trouble is the checkbox.
> I have code that looks like
>
> FocusScope {
>     id: brightnessItem
>     focus: true
>
>     Components.CheckBox {
>         id: pmCheckBox
>         anchors …
>         focus: true
>         checked: true
>     }
> }
>
> Once the brightness item has focus (ie. I tabbed to it) I can turn the
> checkbox on and off using space or return. The checkbox itself, however,
> always looks like it's hovered, no matter if it has focus or not. What am I
> doing wrong here?
>
> Best,
> Kai Uwe
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to