Make menu-bearing toolbar buttons show their menus with normal click rather than click-and-hold
ClosedPublic

Authored by ngraham on May 21 2018, 7:45 PM.

Details

Summary

Fixes Kate/KWrite's menu-bearing toolbar buttons so that they all show their drop-down menus immediately when clicked, instead of requiring a click-and-hold (which is the normal Qt behavior for toolbar buttons with menus).

Note: due to a Breeze design choice, this patch has the effect of removing the downward-pointing arrow that lets you know that the toolbar button will open a menu. There's an open patch that changes that, though: D13064

BUG: 353747
FIXED-IN: 5.47

Test Plan

Added Schema, Mode, Intentation, Bookmarks, Highlighting and Scripts buttons to Kate's toolbar and clicked them. They all showed their drop-down menus immediately.

Diff Detail

Repository
R39 KTextEditor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.May 21 2018, 7:45 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptMay 21 2018, 7:45 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
ngraham requested review of this revision.May 21 2018, 7:45 PM
ngraham edited the summary of this revision. (Show Details)May 25 2018, 6:33 PM

Friendly ping!

Hello,
I would appreciate that you rephrase the description for this patch (and others where the same comment appear): the dissapearing arrow with breeze is not a *bug* in breeze, but a (conscious) design choice, that is discussed in D13064 and in the bug attached. D13064 is not fixing that bug, it is a proposal to revert that design choice.

ngraham edited the summary of this revision. (Show Details)May 25 2018, 8:44 PM

Fair enough!

ngraham edited the summary of this revision. (Show Details)May 31 2018, 6:32 PM

The same holds true for other actions such as: Tools > Highlighting, Mode, Indentation, Script.

Question here is: Is this delayed thing needed for building the contents on-the-fly (look at the aboutToShow() functions)?

ngraham planned changes to this revision.Jun 9 2018, 1:13 PM

I don't think being delayed was a deliberate choice; it's simply the default interaction method for toolbuttons that open menus in Qt (for some odd reason). Every menu toolbutton throughout KDE software that shows its menu instantly does setDelayed(false);, and I've never seen the menu have to visually build itself while open.

Let me handle those other cases with this patch, too.

ngraham updated this revision to Diff 35890.Jun 9 2018, 1:28 PM

Also make this change for all other toolButtons that open menus

ngraham retitled this revision from Open Schema toolbar button with normal click rather than click-and-hold to Make menu-bearing toolbar buttons show their menus with normal click rather than click-and-hold.Jun 9 2018, 1:33 PM
ngraham edited the summary of this revision. (Show Details)
ngraham edited the test plan for this revision. (Show Details)

Friendly ping!

dhaumann accepted this revision.Jun 15 2018, 2:52 PM

Lgtm - thanks! Please only in master (as this review request shows).

This revision is now accepted and ready to land.Jun 15 2018, 2:52 PM
This revision was automatically updated to reflect the committed changes.