summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Data.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2019-03-31 11:29:30 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2019-04-04 14:17:55 +0200
commitae1e23651a6d2e97d39bbe46bab83b7982d19611 (patch)
treee00b9bcfd92093bb5a4c5c9dff88af46b6cd6ac6 /vcl/qt5/Qt5Data.cxx
parent558956dc811a1f0f07411e348f7081a467bbc3b5 (diff)
KDE5 merge KDE5SalData into Qt5Data
Currently there is no point for a seperate KDE5 SalData class. The additional NWF settings fix the wrong popup menu for qt5, so this just moves all the NWF data and gets rid of KDE5SalData. Change-Id: I1c02d1f660df288a0d2e1c6607b34fc1ce593727 Reviewed-on: https://gerrit.libreoffice.org/70005 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/qt5/Qt5Data.cxx')
-rw-r--r--vcl/qt5/Qt5Data.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/vcl/qt5/Qt5Data.cxx b/vcl/qt5/Qt5Data.cxx
index 597a0a4d0a77..9f9bf2557c3d 100644
--- a/vcl/qt5/Qt5Data.cxx
+++ b/vcl/qt5/Qt5Data.cxx
@@ -19,8 +19,10 @@
#include <Qt5Data.hxx>
-#include <QtGui/QCursor>
#include <QtGui/QBitmap>
+#include <QtGui/QCursor>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QStyle>
#include <sal/log.hxx>
@@ -156,8 +158,17 @@ Qt5Data::Qt5Data(SalInstance* pInstance)
{
ImplSVData* pSVData = ImplGetSVData();
- // draw toolbars on separate lines
pSVData->maNWFData.mbDockingAreaSeparateTB = true;
+ pSVData->maNWFData.mbFlatMenu = true;
+ pSVData->maNWFData.mbRolloverMenubar = true;
+ pSVData->maNWFData.mbNoFocusRects = true;
+ pSVData->maNWFData.mbNoFocusRectsForFlatButtons = true;
+
+ QStyle* style = QApplication::style();
+ pSVData->maNWFData.mnMenuFormatBorderX = style->pixelMetric(QStyle::PM_MenuPanelWidth)
+ + style->pixelMetric(QStyle::PM_MenuHMargin);
+ pSVData->maNWFData.mnMenuFormatBorderY = style->pixelMetric(QStyle::PM_MenuPanelWidth)
+ + style->pixelMetric(QStyle::PM_MenuVMargin);
}
// outline dtor b/c of GlyphCache incomplete type