diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-07-28 10:41:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-07-28 17:24:54 +0200 |
commit | eaa0954fbf455ad7a71c011406e382ee7f7a8018 (patch) | |
tree | ec142813cb33b4a8a523d0ec8096df68802040fa /vcl | |
parent | 756ff6f6dfb24048c43b682a95241d5548a1bb8f (diff) |
gtk4: don't attempt to create a visual junction between float and launcher
the alignment won't match when using GtkPopover to implement these,
there's an extra border+margin between the launcher and the contents
Change-Id: Idb78d903874fee5a28e87c89951d9b3f9063c547
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137554
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/svdata.hxx | 2 | ||||
-rw-r--r-- | vcl/source/window/brdwin.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk3/salnativewidgets-gtk.cxx | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 8490a6f020c5..3651eb3bce61 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -327,6 +327,8 @@ struct ImplSVNWFData bool mbFlatMenu = false; // no popup 3D border bool mbNoFocusRects = false; // on Aqua/Gtk3 use native focus rendering, except for flat buttons bool mbNoFocusRectsForFlatButtons = false; // on Gtk3 native focusing is also preferred for flat buttons + bool mbNoFrameJunctionForPopups = false; // on Gtk4 popups are done via popovers and a toolbar menu won't align to its toolitem, so + // omit the effort the creation a visual junction bool mbCenteredTabs = false; // on Aqua, tabs are centered bool mbNoActiveTabTextRaise = false; // on Aqua the text for the selected tab // should not "jump up" a pixel diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index c003ed17b78d..6617de6414b3 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1363,7 +1363,8 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con vcl::Region oldClipRgn(rRenderContext.GetClipRegion()); // for popups, don't draw part of the frame - if (!(pData->mnTitleType & (BorderWindowTitleType::Normal | BorderWindowTitleType::Small))) + const bool bShowJunctionToLauncher = !(pData->mnTitleType & (BorderWindowTitleType::Normal | BorderWindowTitleType::Small)); + if (bShowJunctionToLauncher && !ImplGetSVData()->maNWFData.mbNoFrameJunctionForPopups) { FloatingWindow* pWin = dynamic_cast<FloatingWindow*>(pData->mpBorderWindow->GetWindow(GetWindowType::Client)); if (pWin) diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx index 3074dd0fbad7..3bbc9365f46d 100644 --- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx @@ -2823,6 +2823,9 @@ void GtkSalData::initNWF() pSVData->maNWFData.mbNoFocusRects = true; pSVData->maNWFData.mbNoFocusRectsForFlatButtons = true; pSVData->maNWFData.mbAutoAccel = true; +#if GTK_CHECK_VERSION(4, 0, 0) + pSVData->maNWFData.mbNoFrameJunctionForPopups = true; +#endif #if defined(GDK_WINDOWING_WAYLAND) //gnome#768128 for the car crash that is wayland |