Improve font size

This commit is contained in:
Jan Grulich 2016-03-16 12:49:58 +01:00
parent fc3186e1cd
commit 4200609bce
2 changed files with 23 additions and 2 deletions

17
improve-font-size.patch Normal file
View File

@ -0,0 +1,17 @@
diff --git a/src/qgnomeplatformtheme.cpp b/src/qgnomeplatformtheme.cpp
index 5d9419c..5cacfb8 100644
--- a/src/qgnomeplatformtheme.cpp
+++ b/src/qgnomeplatformtheme.cpp
@@ -84,10 +84,10 @@ void QGnomePlatformTheme::getFont() {
}
else {
m_font = new QFont(rawFont);
- fontSize = m_font->pixelSize();
+ fontSize = m_font->pointSize();
}
- m_font->setPixelSize(fontSize * scaling);
+ m_font->setPointSizeF(fontSize * scaling);
QGuiApplication::setFont(*m_font);

View File

@ -9,7 +9,7 @@
Name: qgnomeplatform
Version: 0.1
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Qt Platform Theme aimed to accommodate Gnome settings
License: LGPLv2+
@ -17,6 +17,7 @@ URL: https://github.com/MartinBriza/QGnomePlatform
Source0: https://github.com/MartinBriza/QGnomePlatform/archive/0.1.tar.gz#/QGnomePlatform-%{version}.tar.gz
# Upstream patches
Patch0: improve-font-size.patch
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(udev)
@ -36,7 +37,7 @@ modifying them - making them fit into the environment as well as possible.
%prep
%setup -q -n QGnomePlatform-%{version}
%autosetup -p1 -n QGnomePlatform-%{version}
%build
@ -58,6 +59,9 @@ make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
%changelog
* Wed Mar 16 2016 Jan Grulich <jgrulich@redhat.com> - 0.1-4
- Improve font size
* Thu Feb 25 2016 Jan Grulich <jgrulich@redhat.com> - 0.1-3
- Revert usage of qgnomeplatform.env in GDM