diff --git a/adwaita-qt.spec b/adwaita-qt.spec index e82b7f3..0972dfa 100644 --- a/adwaita-qt.spec +++ b/adwaita-qt.spec @@ -1,12 +1,14 @@ Name: adwaita-qt Version: 0.4 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Summary: Adwaita theme for Qt-based applications Url: https://github.com/MartinBriza/adwaita-qt Source0: https://github.com/MartinBriza/adwaita-qt/archive/adwaita-qt-%{version}.tar.gz +Patch0: qt-creator-menubar-fix.patch + BuildRequires: cmake BuildRequires: qt4-devel BuildRequires: qt5-qtbase-devel @@ -46,6 +48,7 @@ Adwaita theme variant for applications utilizing Qt5 %prep %setup -q -n %{name}-%{version} +%patch0 -p1 -b .qt-creator-menubar-fix %build mkdir -p "%{_target_platform}-qt4" @@ -80,6 +83,9 @@ make install/fast DESTDIR=%{buildroot} -C "%{_target_platform}-qt5" %files %changelog +* Wed Jun 22 2016 Jan Grulich - 0.4-2 +- Attempt to fix missing menubar issue in QtCreator + * Thu Apr 21 2016 Jan Grulich - 0.4-1 - Update to version 0.4 diff --git a/qt-creator-menubar-fix.patch b/qt-creator-menubar-fix.patch new file mode 100644 index 0000000..a7446c4 --- /dev/null +++ b/qt-creator-menubar-fix.patch @@ -0,0 +1,20 @@ +diff --git a/src/style/adwaita.cpp b/src/style/adwaita.cpp +index f751d50..700bd97 100644 +--- a/src/style/adwaita.cpp ++++ b/src/style/adwaita.cpp +@@ -1675,9 +1675,15 @@ QSize Adwaita::sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt + case CT_MenuItem: { + return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget) + QSize(24, 0); + } ++ ++ // FIXME: is it necessary to set MenuBar size? Height should be already set by MenuBarItem to 30px and setting ++ // width to 30px doesn't really make sense to me. Resolves: https://github.com/MartinBriza/adwaita-qt/issues/34 ++ ++ /* + case CT_MenuBar: { + return QSize(30, 30); + } ++ */ + case CT_ComboBox: { + return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget) + QSize(4, 6); + }