diff --git a/adwaita-qt.spec b/adwaita-qt.spec index 0972dfa..d46f530 100644 --- a/adwaita-qt.spec +++ b/adwaita-qt.spec @@ -1,6 +1,6 @@ Name: adwaita-qt Version: 0.4 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ Summary: Adwaita theme for Qt-based applications @@ -83,6 +83,9 @@ make install/fast DESTDIR=%{buildroot} -C "%{_target_platform}-qt5" %files %changelog +* Thu Jun 30 2016 Jan Grulich - 0.4-3 +- Properly fix missing menubar in QtCreator + * Wed Jun 22 2016 Jan Grulich - 0.4-2 - Attempt to fix missing menubar issue in QtCreator diff --git a/qt-creator-menubar-fix.patch b/qt-creator-menubar-fix.patch index a7446c4..76e9b08 100644 --- a/qt-creator-menubar-fix.patch +++ b/qt-creator-menubar-fix.patch @@ -1,8 +1,22 @@ +From 1a175067dfeec339ac77cbb12f23abc858f8f4bb Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 30 Jun 2016 11:28:00 +0200 +Subject: Attempt to fix missing menubar issue for QtCreator + +It shouldn't be necessary to set MenuBar size, as height should be already set by MenuBarItem and setting +width to 30px doesn't make much sense as it will be always wider + diff --git a/src/style/adwaita.cpp b/src/style/adwaita.cpp -index f751d50..700bd97 100644 +index f751d50..9c719a0 100644 --- a/src/style/adwaita.cpp +++ b/src/style/adwaita.cpp -@@ -1675,9 +1675,15 @@ QSize Adwaita::sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt +@@ -1670,14 +1670,20 @@ QSize Adwaita::sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt + } + case CT_MenuBarItem: { + //const QStyleOptionMenuItem *miopt = qstyleoption_cast(opt); +- return QSize(QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget).width() + 16, 30); ++ return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget) + QSize(16, 8); + } case CT_MenuItem: { return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget) + QSize(24, 0); }