Update to 0.5.90
This commit is contained in:
parent
1029036ab6
commit
6607a8fb4b
@ -1,45 +0,0 @@
|
||||
diff --git a/common/common.pro b/common/common.pro
|
||||
index 99bb9e3..c244613 100644
|
||||
--- a/common/common.pro
|
||||
+++ b/common/common.pro
|
||||
@@ -8,6 +8,7 @@ CONFIG += c++11 \
|
||||
QT += core \
|
||||
dbus \
|
||||
theme_support-private \
|
||||
+ x11extras \
|
||||
widgets
|
||||
|
||||
PKGCONFIG += gtk+-3.0 \
|
||||
diff --git a/common/gnomehintssettings.cpp b/common/gnomehintssettings.cpp
|
||||
index b50bd34..2a1d172 100644
|
||||
--- a/common/gnomehintssettings.cpp
|
||||
+++ b/common/gnomehintssettings.cpp
|
||||
@@ -36,6 +36,8 @@
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusMessage>
|
||||
|
||||
+#include <QX11Info>
|
||||
+
|
||||
Q_LOGGING_CATEGORY(QGnomePlatform, "qt.qpa.qgnomeplatform")
|
||||
|
||||
const QDBusArgument &operator>>(const QDBusArgument &argument, QMap<QString, QVariantMap> &map)
|
||||
@@ -119,7 +121,8 @@ GnomeHintsSettings::GnomeHintsSettings()
|
||||
m_hints[QPlatformTheme::IconPixmapSizes] = QVariant::fromValue(QList<int>() << 512 << 256 << 128 << 64 << 32 << 22 << 16 << 8);
|
||||
m_hints[QPlatformTheme::PasswordMaskCharacter] = QVariant(QChar(0x2022));
|
||||
|
||||
- cursorSizeChanged();
|
||||
+ if (!QX11Info::isPlatformX11())
|
||||
+ cursorSizeChanged();
|
||||
|
||||
// Watch for changes
|
||||
QStringList watchList = { "changed::gtk-theme", "changed::icon-theme", "changed::cursor-blink-time", "changed::font-name", "changed::monospace-font-name", "changed::cursor-size" };
|
||||
@@ -177,7 +180,8 @@ void GnomeHintsSettings::gsettingPropertyChanged(GSettings *settings, gchar *key
|
||||
} else if (changedProperty == QLatin1String("monospace-font-name")) {
|
||||
gnomeHintsSettings->fontChanged();
|
||||
} else if (changedProperty == QLatin1String("cursor-size")) {
|
||||
- gnomeHintsSettings->cursorSizeChanged();
|
||||
+ if (!QX11Info::isPlatformX11())
|
||||
+ gnomeHintsSettings->cursorSizeChanged();
|
||||
} else {
|
||||
qCDebug(QGnomePlatform) << "GSetting property change: " << key;
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
diff --git a/decoration/qgnomeplatformdecoration.cpp b/decoration/qgnomeplatformdecoration.cpp
|
||||
index 107d2c3..3da478f 100644
|
||||
--- a/decoration/qgnomeplatformdecoration.cpp
|
||||
+++ b/decoration/qgnomeplatformdecoration.cpp
|
||||
@@ -102,6 +102,8 @@ QGnomePlatformDecoration::QGnomePlatformDecoration()
|
||||
initializeButtonPixmaps();
|
||||
initializeColors();
|
||||
|
||||
+ m_lastButtonClick = QDateTime::currentDateTime();
|
||||
+
|
||||
QTextOption option(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
option.setWrapMode(QTextOption::NoWrap);
|
||||
m_windowTitle.setTextOption(option);
|
||||
@@ -411,6 +413,8 @@ void QGnomePlatformDecoration::processMouseTop(QWaylandInputDevice *inputDevice,
|
||||
{
|
||||
Q_UNUSED(mods);
|
||||
|
||||
+ QDateTime currentDateTime = QDateTime::currentDateTime();
|
||||
+
|
||||
if (!closeButtonRect().contains(local) && !maximizeButtonRect().contains(local) && !minimizeButtonRect().contains(local)) {
|
||||
updateButtonHoverState(Button::None);
|
||||
}
|
||||
@@ -452,10 +456,20 @@ void QGnomePlatformDecoration::processMouseTop(QWaylandInputDevice *inputDevice,
|
||||
if (clickButton(b, Minimize))
|
||||
window()->setWindowState(Qt::WindowMinimized);
|
||||
} else {
|
||||
+ if (clickButton(b, Maximize)) {
|
||||
+ const int doubleClickDistance = m_hints->hint(QPlatformTheme::MouseDoubleClickDistance).toInt();
|
||||
+ QPointF posDiff = m_lastButtonClickPosition - local;
|
||||
+ if ((m_lastButtonClick.msecsTo(currentDateTime) <= m_hints->hint(QPlatformTheme::MouseDoubleClickInterval).toInt()) &&
|
||||
+ ((posDiff.x() <= doubleClickDistance && posDiff.x() >= -doubleClickDistance) && ((posDiff.y() <= doubleClickDistance && posDiff.y() >= -doubleClickDistance))))
|
||||
+ window()->setWindowStates(window()->windowStates() ^ Qt::WindowMaximized);
|
||||
+ m_lastButtonClick = currentDateTime;
|
||||
+ m_lastButtonClickPosition = local;
|
||||
+ } else {
|
||||
#if QT_CONFIG(cursor)
|
||||
- waylandWindow()->restoreMouseCursor(inputDevice);
|
||||
+ waylandWindow()->restoreMouseCursor(inputDevice);
|
||||
#endif
|
||||
- startMove(inputDevice,b);
|
||||
+ startMove(inputDevice,b);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/decoration/qgnomeplatformdecoration.h b/decoration/qgnomeplatformdecoration.h
|
||||
index 600e082..cb5904b 100644
|
||||
--- a/decoration/qgnomeplatformdecoration.h
|
||||
+++ b/decoration/qgnomeplatformdecoration.h
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
#include <QtWaylandClient/private/qwaylandabstractdecoration_p.h>
|
||||
|
||||
+#include <QDateTime>
|
||||
+
|
||||
class GnomeHintsSettings;
|
||||
class QPixmap;
|
||||
|
||||
@@ -77,6 +79,9 @@ private:
|
||||
bool m_maximizeButtonHovered;
|
||||
bool m_minimizeButtonHovered;
|
||||
|
||||
+ // For double-click support
|
||||
+ QDateTime m_lastButtonClick;
|
||||
+ QPointF m_lastButtonClickPosition;
|
||||
|
||||
QStaticText m_windowTitle;
|
||||
Button m_clicking = None;
|
||||
@ -1,50 +0,0 @@
|
||||
diff --git a/common/gnomehintssettings.cpp b/common/gnomehintssettings.cpp
|
||||
index 4dfe990..b50bd34 100644
|
||||
--- a/common/gnomehintssettings.cpp
|
||||
+++ b/common/gnomehintssettings.cpp
|
||||
@@ -119,8 +119,10 @@ GnomeHintsSettings::GnomeHintsSettings()
|
||||
m_hints[QPlatformTheme::IconPixmapSizes] = QVariant::fromValue(QList<int>() << 512 << 256 << 128 << 64 << 32 << 22 << 16 << 8);
|
||||
m_hints[QPlatformTheme::PasswordMaskCharacter] = QVariant(QChar(0x2022));
|
||||
|
||||
+ cursorSizeChanged();
|
||||
+
|
||||
// Watch for changes
|
||||
- QStringList watchList = { "changed::gtk-theme", "changed::icon-theme", "changed::cursor-blink-time", "changed::font-name", "changed::monospace-font-name" };
|
||||
+ QStringList watchList = { "changed::gtk-theme", "changed::icon-theme", "changed::cursor-blink-time", "changed::font-name", "changed::monospace-font-name", "changed::cursor-size" };
|
||||
|
||||
for (const QString &watchedProperty : watchList) {
|
||||
g_signal_connect(m_settings, watchedProperty.toStdString().c_str(), G_CALLBACK(gsettingPropertyChanged), this);
|
||||
@@ -174,6 +176,8 @@ void GnomeHintsSettings::gsettingPropertyChanged(GSettings *settings, gchar *key
|
||||
gnomeHintsSettings->fontChanged();
|
||||
} else if (changedProperty == QLatin1String("monospace-font-name")) {
|
||||
gnomeHintsSettings->fontChanged();
|
||||
+ } else if (changedProperty == QLatin1String("cursor-size")) {
|
||||
+ gnomeHintsSettings->cursorSizeChanged();
|
||||
} else {
|
||||
qCDebug(QGnomePlatform) << "GSetting property change: " << key;
|
||||
}
|
||||
@@ -204,6 +208,12 @@ void GnomeHintsSettings::cursorBlinkTimeChanged()
|
||||
}
|
||||
}
|
||||
|
||||
+void GnomeHintsSettings::cursorSizeChanged()
|
||||
+{
|
||||
+ int cursorSize = getSettingsProperty<int>(QStringLiteral("cursor-size"));
|
||||
+ qputenv("XCURSOR_SIZE", QString::number(cursorSize).toUtf8());
|
||||
+}
|
||||
+
|
||||
void GnomeHintsSettings::fontChanged()
|
||||
{
|
||||
const QFont oldSysFont = *m_fonts[QPlatformTheme::SystemFont];
|
||||
diff --git a/common/gnomehintssettings.h b/common/gnomehintssettings.h
|
||||
index a1ce4a1..aaaa454 100644
|
||||
--- a/common/gnomehintssettings.h
|
||||
+++ b/common/gnomehintssettings.h
|
||||
@@ -102,6 +102,7 @@ public:
|
||||
|
||||
public Q_SLOTS:
|
||||
void cursorBlinkTimeChanged();
|
||||
+ void cursorSizeChanged();
|
||||
void fontChanged();
|
||||
void iconsChanged();
|
||||
void themeChanged();
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
|
||||
Name: qgnomeplatform
|
||||
Version: 0.5
|
||||
Release: 17%{?dist}
|
||||
Version: 0.5.90
|
||||
Release: 1%{?dist}
|
||||
Summary: Qt Platform Theme aimed to accommodate Gnome settings
|
||||
|
||||
License: LGPLv2+
|
||||
@ -9,10 +9,6 @@ URL: https://github.com/MartinBriza/QGnomePlatform
|
||||
Source0: https://github.com/MartinBriza/QGnomePlatform/archive/%{version}/QGnomePlatform-%{version}.tar.gz
|
||||
|
||||
# Upstream patches
|
||||
Patch0: qgnomeplatform-gnome-decorations.patch
|
||||
Patch1: qgnomeplatform-fix-cursor-size.patch
|
||||
Patch2: qgnomeplatform-double-click-to-maximize.patch
|
||||
Patch3: qgnomeplatform-cursor-only-on-wayland.patch
|
||||
|
||||
BuildRequires: pkgconfig(gio-2.0)
|
||||
BuildRequires: pkgconfig(udev)
|
||||
@ -61,6 +57,9 @@ make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
|
||||
%{_qt5_libdir}/qt5/plugins/wayland-decoration-client/libqgnomeplatformdecoration.so
|
||||
|
||||
%changelog
|
||||
* Fri Oct 04 2019 Jan Grulich <jgrulich@redhat.com> - 0.5.90-1
|
||||
- Update to 0.5.90
|
||||
|
||||
* Thu Oct 03 2019 Jan Grulich <jgrulich@redhat.com> - 0.5-17
|
||||
- Link decorations against qtx11extras
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user