Properly fix missing menubar in QtCreator
This commit is contained in:
parent
9d7bdee048
commit
d585b429c1
@ -1,6 +1,6 @@
|
|||||||
Name: adwaita-qt
|
Name: adwaita-qt
|
||||||
Version: 0.4
|
Version: 0.4
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Summary: Adwaita theme for Qt-based applications
|
Summary: Adwaita theme for Qt-based applications
|
||||||
|
|
||||||
@ -83,6 +83,9 @@ make install/fast DESTDIR=%{buildroot} -C "%{_target_platform}-qt5"
|
|||||||
%files
|
%files
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 30 2016 Jan Grulich <jgrulich@redhat.com> - 0.4-3
|
||||||
|
- Properly fix missing menubar in QtCreator
|
||||||
|
|
||||||
* Wed Jun 22 2016 Jan Grulich <jgrulich@redhat.com> - 0.4-2
|
* Wed Jun 22 2016 Jan Grulich <jgrulich@redhat.com> - 0.4-2
|
||||||
- Attempt to fix missing menubar issue in QtCreator
|
- Attempt to fix missing menubar issue in QtCreator
|
||||||
|
|
||||||
|
@ -1,8 +1,22 @@
|
|||||||
|
From 1a175067dfeec339ac77cbb12f23abc858f8f4bb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Grulich <jgrulich@redhat.com>
|
||||||
|
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
|
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
|
--- a/src/style/adwaita.cpp
|
||||||
+++ b/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<const QStyleOptionMenuItem*>(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: {
|
case CT_MenuItem: {
|
||||||
return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget) + QSize(24, 0);
|
return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget) + QSize(24, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user