[LyX/master] Use more convenient MenuButtonPopup

Scott Kostyshak skostysh at lyx.org
Sat Jul 18 04:33:28 UTC 2020


On Thu, Dec 27, 2018 at 11:08:11AM +0100, Juergen Spitzmueller wrote:
> commit eb1b88aba7e244b0c500d54ac4ff3cee753d3faf
> Author: Juergen Spitzmueller <spitz at lyx.org>
> Date:   Thu Dec 27 11:09:52 2018 +0100
> 
>     Use more convenient MenuButtonPopup
> ---
>  src/frontends/qt4/GuiToolbar.cpp |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

This is a nice feature (added at 9495ff66 and modified here), and I
agree that MenuButtonPopup is better. There is one thing that is a
little annoying, which is that the arrow is not disabled if there is no
item. We shouldn't disable the entire button because the action of the
button is to paste from the *system* clipboard.

To reproduce what I'm talking about, start LyX, start a new document and
click on the arrow next to the paste icon. The arrow lets you press it
and looks like it will give something but never does. I actually
expected something like the Edit > Paste Special submenu options to
show, so I was confused.

The attached patch attempts to improve things. It only shows an arrow if
there are items. It's not as nice as having a disabled arrow, but I
don't know how to achieve that. Another disadvantage of the patch is
that when it shows the arrow it takes up extra space on the toolbar so
shifts the items to the right, which is unpleasant to the eye. There
might be some style sheet padding magic that can be done to avoid the
shift but I couldn't figure it out.

Any thoughts?

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: paste_arrow.diff
Type: text/x-diff
Size: 1176 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200718/c815bd5b/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200718/c815bd5b/attachment-0001.asc>


More information about the lyx-devel mailing list