Attempt to fix missing menubar issue in QtCreator
This commit is contained in:
parent
3b8d0c1040
commit
9d7bdee048
@ -1,12 +1,14 @@
|
|||||||
Name: adwaita-qt
|
Name: adwaita-qt
|
||||||
Version: 0.4
|
Version: 0.4
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Summary: Adwaita theme for Qt-based applications
|
Summary: Adwaita theme for Qt-based applications
|
||||||
|
|
||||||
Url: https://github.com/MartinBriza/adwaita-qt
|
Url: https://github.com/MartinBriza/adwaita-qt
|
||||||
Source0: https://github.com/MartinBriza/adwaita-qt/archive/adwaita-qt-%{version}.tar.gz
|
Source0: https://github.com/MartinBriza/adwaita-qt/archive/adwaita-qt-%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch0: qt-creator-menubar-fix.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: qt4-devel
|
BuildRequires: qt4-devel
|
||||||
BuildRequires: qt5-qtbase-devel
|
BuildRequires: qt5-qtbase-devel
|
||||||
@ -46,6 +48,7 @@ Adwaita theme variant for applications utilizing Qt5
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
|
|
||||||
|
%patch0 -p1 -b .qt-creator-menubar-fix
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir -p "%{_target_platform}-qt4"
|
mkdir -p "%{_target_platform}-qt4"
|
||||||
@ -80,6 +83,9 @@ make install/fast DESTDIR=%{buildroot} -C "%{_target_platform}-qt5"
|
|||||||
%files
|
%files
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 22 2016 Jan Grulich <jgrulich@redhat.com> - 0.4-2
|
||||||
|
- Attempt to fix missing menubar issue in QtCreator
|
||||||
|
|
||||||
* Thu Apr 21 2016 Jan Grulich <jgrulich@redhat.com> - 0.4-1
|
* Thu Apr 21 2016 Jan Grulich <jgrulich@redhat.com> - 0.4-1
|
||||||
- Update to version 0.4
|
- Update to version 0.4
|
||||||
|
|
||||||
|
20
qt-creator-menubar-fix.patch
Normal file
20
qt-creator-menubar-fix.patch
Normal file
@ -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);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user