summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-11-20 15:59:17 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-11-30 20:40:57 +0100
commitaa0657e2983007c505b1223281df4a3a4eb6e73a (patch)
tree81cd1d9d6292ee304c4bf9a5e042f924be699f28 /vcl/source/app
parent97e91f6bbc2e81fdb8e6fbf55c551cf4b23fa8dd (diff)
weld ImplTabButtons
create a separate .ui for the ltr-in-rtl scroll arrow region Change-Id: I2ec9099f7441ba82555270b5a99541cd7a989890 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106288 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/weldutils.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/vcl/source/app/weldutils.cxx b/vcl/source/app/weldutils.cxx
index 76e887c67644..837220447063 100644
--- a/vcl/source/app/weldutils.cxx
+++ b/vcl/source/app/weldutils.cxx
@@ -13,6 +13,7 @@
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <vcl/builderpage.hxx>
+#include <vcl/commandevent.hxx>
#include <vcl/commandinfoprovider.hxx>
#include <vcl/event.hxx>
#include <vcl/settings.hxx>
@@ -548,9 +549,11 @@ void WidgetStatusListener::dispose()
mWidget = nullptr;
}
-ButtonPressRepeater::ButtonPressRepeater(weld::Button& rButton, const Link<Button&, void>& rLink)
+ButtonPressRepeater::ButtonPressRepeater(weld::Button& rButton, const Link<Button&, void>& rLink,
+ const Link<const CommandEvent&, void>& rContextLink)
: m_rButton(rButton)
, m_aLink(rLink)
+ , m_aContextLink(rContextLink)
, m_bModKey(false)
{
// instead of connect_clicked because we want a button held down to
@@ -563,6 +566,12 @@ ButtonPressRepeater::ButtonPressRepeater(weld::Button& rButton, const Link<Butto
IMPL_LINK(ButtonPressRepeater, MousePressHdl, const MouseEvent&, rMouseEvent, bool)
{
+ if (rMouseEvent.IsRight())
+ {
+ m_aContextLink.Call(
+ CommandEvent(rMouseEvent.GetPosPixel(), CommandEventId::ContextMenu, true));
+ return false;
+ }
m_bModKey = rMouseEvent.IsMod1();
if (!m_rButton.get_sensitive())
return false;