D7828: createKMessageBox tries to focus a default button when available

Roman Gilg noreply at phabricator.kde.org
Wed Oct 25 01:00:39 UTC 2017


subdiff added a comment.


  Hi Emirald,
  
  first let me tell you that I totally get where you're coming from. To be honest the selected checkbox in this specific dialog of Dolphin has annoyed me already for a long time. So thank you for looking into this.
  
  But we have to dissect the situation a bit more: A button with focus and the default button in a KMessageBox are two different things per definition as Albert pointed out.
  
  That said I can only think of one sensible case where this distinction makes sense: When //no// element has focus, but you still want a default action to trigger on Enter. In any case having focus on some control element but then pressing Enter triggering an action related to some other button doesn't seem like good Ui to me. So this sounds similar to what you say.
  
  But in the end it should be up to the app developer to decide if the focus and default action element are the same one or different ones in his KMessageBox. I would still advise him in general to not make them different, but don't forget that your change is a change in Frameworks restricting it to our presumed best practice for //all// apps using a KMessageBox. And there might be corner cases we haven't thought about, where different focus and default action make sense.
  
  That said the focused checkbox in Dolphin should go away (as I said in the beginning it annoyed me already for a longer time). The rationale behind this was maybe, so a user could press Space for activating the checkbox and Enter for triggering the default action, but checking a focused checkbox with Space and not Enter isn't obvious and this checkbox also isn't something a user totally needs to have one button keyboard access to. So just set in this specific Dolphin dialog the focus item to the Ok button. By the way this is not something totally new to Dolphin. The "Confirm delete" dialog has its default button focused.

REVISION DETAIL
  https://phabricator.kde.org/D7828

To: emateli, #frameworks, ngraham, aacid, #vdg
Cc: subdiff, ngraham, aacid, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171025/df2adacf/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list