Pull in upstream fixes
This commit is contained in:
parent
e9d76d26a1
commit
708d9f3255
24
adwaita-qt-upstream-fixes.patch
Normal file
24
adwaita-qt-upstream-fixes.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/style/adwaitastyle.cpp b/style/adwaitastyle.cpp
|
||||
index aeeb8ae..6d2860e 100644
|
||||
--- a/style/adwaitastyle.cpp
|
||||
+++ b/style/adwaitastyle.cpp
|
||||
@@ -392,6 +392,10 @@ void Style::polish(QWidget *widget)
|
||||
} else if (widget->inherits("QTipLabel")) {
|
||||
setTranslucentBackground(widget);
|
||||
} else if (QLineEdit *lineEdit = qobject_cast<QLineEdit *>(widget)) {
|
||||
+ // Do not use additional margin if the QLineEdit is really small
|
||||
+ const bool useMarginWidth = lineEdit->width() > lineEdit->fontMetrics().width("#####");
|
||||
+ const int marginWidth = useMarginWidth ? Metrics::LineEdit_MarginWidth : 0;
|
||||
+ lineEdit->setTextMargins(marginWidth, Metrics::LineEdit_MarginHeight, marginWidth, Metrics::LineEdit_MarginHeight);
|
||||
lineEdit->setTextMargins(Metrics::LineEdit_MarginWidth, Metrics::LineEdit_MarginHeight, Metrics::LineEdit_MarginWidth, Metrics::LineEdit_MarginHeight);
|
||||
} else if (QSpinBox *spinBox = qobject_cast<QSpinBox *>(widget)) {
|
||||
if (!spinBox->isEnabled()) {
|
||||
@@ -4844,7 +4848,7 @@ bool Style::drawMenuBarItemControl(const QStyleOption *option, QPainter *painter
|
||||
QRect textRect = option->fontMetrics.boundingRect(rect, textFlags, menuItemOption->text);
|
||||
|
||||
// render text
|
||||
- const QPalette::ColorRole role = (useStrongFocus && sunken) ? QPalette::Highlight : QPalette::WindowText;
|
||||
+ const QPalette::ColorRole role = (useStrongFocus && sunken) ? QPalette::Link : QPalette::WindowText;
|
||||
drawItemText(painter, textRect, textFlags, palette, enabled, menuItemOption->text, role);
|
||||
|
||||
return true;
|
@ -1,12 +1,14 @@
|
||||
Name: adwaita-qt
|
||||
Version: 1.1.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: LGPLv2+
|
||||
Summary: Adwaita theme for Qt-based applications
|
||||
|
||||
Url: https://github.com/FedoraQt/adwaita-qt
|
||||
Source0: https://github.com/FedoraQt/adwaita-qt/archive/%{version}/adwaita-qt-%{version}.tar.gz
|
||||
|
||||
Patch0: adwaita-qt-upstream-fixes.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: qt4-devel
|
||||
|
||||
@ -74,6 +76,9 @@ make install/fast DESTDIR=%{buildroot} -C "%{_target_platform}-qt5"
|
||||
%files
|
||||
|
||||
%changelog
|
||||
* Tue Jul 30 2019 Jan Grulich <jgrulich@redhat.com> - 1.1.0-2
|
||||
- Pull in upstream fixes
|
||||
|
||||
* Mon Jul 29 2019 Jan Grulich <jgrulich@redhat.com> - 1.1.0-1
|
||||
- Update to 1.1.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user