[opensuse-factory] Proposal to remove libqt5-prioritise-gtk2-platformtheme.patch in libqt5-qtbase repository
Greetings everyone, I am the maintainer of server:messaging/telegram-desktop. I am sending this email to propose removing the libqt5-prioritise-gtk2-platformtheme.patch in the libqt5-qtbase repository. The link to the patch is https://build.opensuse.org/package/view_file/KDE:Qt:5.15/libqt5-qtbase/libqt.... The patch is used for prioritising gtk2 platform plugin in a Qt app, such that the Qt app integrates better with the outside GTK world. There is also a gtk3 platform plugin, but it just not working as good as the gtk2 one and it seems Qt doesn't have plan to fix it (https://bugreports.qt.io/browse/QTBUG-72506). I am proposing to obsolete this patch for the following reasons: First, this patch creates big problem in packaging and running Telegram Desktop on openSUSE GTK-based desktop environments, including GNOME, XFCE, and Cinammon. Basically, Telegram doesn't provide many features when using GTK2 platform plugin, such as system-native notifications, dark mode, and causing clipboard issues (https://github.com/telegramdesktop/tdesktop/blob/6635d03818c90f62cfddb516aca...). Because only openSUSE has this Qt patch, this problem doesn't exist on any other distribution. Second, all mainstream GTK-based desktop environments have migrated to GTK3. It doesn't make sense to keep prioritising the gtk2 platform plugin. Third, I think the problem mentioned in QTBUG-72506 could be fixed by letting the QGtk3Theme find the correct GTK3 theme in src/plugins/platformthemes/gtk3/qgtk3theme.cpp, which should be the right way to do things. Possible solutions: 1. Don't touch libqt5-qtbase and workaround only in telegram-desktop. This is the current solution. Currently we are using hacks to let Telegram run on qgtk2 platform plugin, which is unstable and could break anytime. 2. Remove libqt5-prioritise-gtk2-platformtheme.patch and don't do anything else. Telegram will be happy, but some Qt applications on GTK3 environments will not be able to correctly themed because of QTBUG-72506. I am not sure about this tho since I am a KDE user. 3. Remove libqt5-prioritise-gtk2-platformtheme.patch and patch GTK3 platform plugin instead I believe this is the right way to go, but it could break other things I am not aware of. Please let me know what you guys think. Thank you very much. Regards, Xu -- Xu Zhao i@xuzhao.net -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hi, Am Sonntag, 30. August 2020, 17:50:54 CEST schrieb Xu Zhao:
Greetings everyone,
I am the maintainer of server:messaging/telegram-desktop. I am sending this email to propose removing the libqt5-prioritise-gtk2-platformtheme.patch in the libqt5-qtbase repository. The link to the patch is https://build.opensuse.org/package/view_file/KDE:Qt:5.15/libqt5-qtbase/libqt....
The patch is used for prioritising gtk2 platform plugin in a Qt app, such that the Qt app integrates better with the outside GTK world. There is also a gtk3 platform plugin, but it just not working as good as the gtk2 one and it seems Qt doesn't have plan to fix it (https://bugreports.qt.io/browse/QTBUG-72506).
Unfortunately it's not that simple. There are two things that need to be separated here: - platformtheme plugins, like KDEPlasmaPlatformTheme, qgtk2 or qgtk3: They provide platform-specific settings (style name, button order, etc.), preferences (fonts, colors, etc.) and provide integration like file dialogs. - style plugins, like fusion, breeze or qgtk2style: They draw UI elements based on the provided color palettes and fonts, optionally some other input like stylesheets or some custom config (like qtcurve). This means that you can use GTK2 dialogs with Fusion, GTK3 dialogs with Breeze or even KDE Frameworks dialogs with GTK2 themes.
I am proposing to obsolete this patch for the following reasons:
There are two issues: - The qgtk3 platformtheme and qgtk2style can't be used together due to symbol conflicts (this is also the issue you're hitting with telegram) - There is no generic qgtk3style using gtk3 themes as the API is/was not stable enough This means that if the patch is dropped, Qt applications won't be able to use any GTK themes, unless they also have a native Qt5 style plugin (Adwaita does, some others have some kind of approximation, but need manual fiddling). In the case that such a native style is used, neither qgtk2 or qgtk2style are used, so there is no conflict and everything works fine. In the other case, not using qgtk2 would be a regression in appearance. I'm not part of the target group though as I don't use any GTK desktop, so I can't really tell from my own experience. If there's feedback that qgtk2style is somehow a net negative, the patch can be dropped.
First, this patch creates big problem in packaging and running Telegram Desktop on openSUSE GTK-based desktop environments, including GNOME, XFCE, and Cinammon. Basically, Telegram doesn't provide many features when using GTK2 platform plugin, such as system-native notifications, dark mode, and causing clipboard issues (https://github.com/telegramdesktop/tdesktop/blob/6635d03818c90f62cfddb516aca...).
Do they use GTK3 for that? They could just use Qt or implement it themselves.
Because only openSUSE has this Qt patch, this problem doesn't exist on any other distribution.
It does, if the gtk2 style is enabled. (If not, some key info is missing here)
Second, all mainstream GTK-based desktop environments have migrated to GTK3. It doesn't make sense to keep prioritising the gtk2 platform plugin.
Third, I think the problem mentioned in QTBUG-72506 could be fixed by letting the QGtk3Theme find the correct GTK3 theme in src/plugins/platformthemes/gtk3/qgtk3theme.cpp, which should be the right way to do things.
bugreports.qt.io is currently down...
Possible solutions: 1. Don't touch libqt5-qtbase and workaround only in telegram-desktop. This is the current solution. Currently we are using hacks to let Telegram run on qgtk2 platform plugin, which is unstable and could break anytime.
What about detecting (in main) that qgtk2 or qgtk2style would end up getting loaded and then forcing QT_QPA_PLATFORMTHEME=gtk3 instead? That's somewhat like a localized version of removing the patch.
2. Remove libqt5-prioritise-gtk2-platformtheme.patch and don't do anything else. Telegram will be happy, but some Qt applications on GTK3 environments will not be able to correctly themed because of QTBUG-72506. I am not sure about this tho since I am a KDE user. 3. Remove libqt5-prioritise-gtk2-platformtheme.patch and patch GTK3 platform plugin instead I believe this is the right way to go, but it could break other things I am not aware of.
Effectively 2 and 3 are the same. It would likely affect all Qt applications on all GTK DEs not using Adwaita. AFAICT the qgtk3 platformtheme should be fixed upstream in any case. Cheers, Fabian
Please let me know what you guys think. Thank you very much.
Regards, Xu
-- Xu Zhao i@xuzhao.net
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Thanks Fabian. I think for now the best solution is to patch Telegram to let it priortize qgtk3 platform theme (which is currently what I am doing). It's lame that qgtk3 doesn't have stable API.... -- Xu Zhao i@xuzhao.net On Tue, 1 Sep 2020, at 3:36 PM, Fabian Vogt wrote:
Hi,
Am Sonntag, 30. August 2020, 17:50:54 CEST schrieb Xu Zhao:
Greetings everyone,
I am the maintainer of server:messaging/telegram-desktop. I am sending this email to propose removing the libqt5-prioritise-gtk2-platformtheme.patch in the libqt5-qtbase repository. The link to the patch is https://build.opensuse.org/package/view_file/KDE:Qt:5.15/libqt5-qtbase/libqt....
The patch is used for prioritising gtk2 platform plugin in a Qt app, such that the Qt app integrates better with the outside GTK world. There is also a gtk3 platform plugin, but it just not working as good as the gtk2 one and it seems Qt doesn't have plan to fix it (https://bugreports.qt.io/browse/QTBUG-72506).
Unfortunately it's not that simple.
There are two things that need to be separated here: - platformtheme plugins, like KDEPlasmaPlatformTheme, qgtk2 or qgtk3: They provide platform-specific settings (style name, button order, etc.), preferences (fonts, colors, etc.) and provide integration like file dialogs. - style plugins, like fusion, breeze or qgtk2style: They draw UI elements based on the provided color palettes and fonts, optionally some other input like stylesheets or some custom config (like qtcurve).
This means that you can use GTK2 dialogs with Fusion, GTK3 dialogs with Breeze or even KDE Frameworks dialogs with GTK2 themes.
I am proposing to obsolete this patch for the following reasons:
There are two issues: - The qgtk3 platformtheme and qgtk2style can't be used together due to symbol conflicts (this is also the issue you're hitting with telegram) - There is no generic qgtk3style using gtk3 themes as the API is/was not stable enough
This means that if the patch is dropped, Qt applications won't be able to use any GTK themes, unless they also have a native Qt5 style plugin (Adwaita does, some others have some kind of approximation, but need manual fiddling).
In the case that such a native style is used, neither qgtk2 or qgtk2style are used, so there is no conflict and everything works fine. In the other case, not using qgtk2 would be a regression in appearance.
I'm not part of the target group though as I don't use any GTK desktop, so I can't really tell from my own experience. If there's feedback that qgtk2style is somehow a net negative, the patch can be dropped.
First, this patch creates big problem in packaging and running Telegram Desktop on openSUSE GTK-based desktop environments, including GNOME, XFCE, and Cinammon. Basically, Telegram doesn't provide many features when using GTK2 platform plugin, such as system-native notifications, dark mode, and causing clipboard issues (https://github.com/telegramdesktop/tdesktop/blob/6635d03818c90f62cfddb516aca...).
Do they use GTK3 for that? They could just use Qt or implement it themselves. It seems Telegram uses GTK3 together with Qt to provide better integration experience with GTK-based DEs (https://github.com/telegramdesktop/tdesktop/blob/6635d03818c90f62cfddb516aca...).
Because only openSUSE has this Qt patch, this problem doesn't exist on any other distribution.
It does, if the gtk2 style is enabled. (If not, some key info is missing here)
For example, Arch doesn't have this patch in its build script: https://github.com/archlinux/svntogit-packages/blob/packages/qt5-base/trunk/.... Sorry I don't find build script for Debian/Ubuntu but I believe they shouldn't have this patch, either.
Second, all mainstream GTK-based desktop environments have migrated to GTK3. It doesn't make sense to keep prioritising the gtk2 platform plugin.
Third, I think the problem mentioned in QTBUG-72506 could be fixed by letting the QGtk3Theme find the correct GTK3 theme in src/plugins/platformthemes/gtk3/qgtk3theme.cpp, which should be the right way to do things.
bugreports.qt.io is currently down...
Possible solutions: 1. Don't touch libqt5-qtbase and workaround only in telegram-desktop. This is the current solution. Currently we are using hacks to let Telegram run on qgtk2 platform plugin, which is unstable and could break anytime.
What about detecting (in main) that qgtk2 or qgtk2style would end up getting loaded and then forcing QT_QPA_PLATFORMTHEME=gtk3 instead? That's somewhat like a localized version of removing the patch.
I have tried this, but seems Telegram( and Qt5) won't respect this environment variable and still loads qgtk2 plugin instead of qgtk3. I haven't figured out why.
2. Remove libqt5-prioritise-gtk2-platformtheme.patch and don't do anything else. Telegram will be happy, but some Qt applications on GTK3 environments will not be able to correctly themed because of QTBUG-72506. I am not sure about this tho since I am a KDE user. 3. Remove libqt5-prioritise-gtk2-platformtheme.patch and patch GTK3 platform plugin instead I believe this is the right way to go, but it could break other things I am not aware of.
Effectively 2 and 3 are the same. It would likely affect all Qt applications on all GTK DEs not using Adwaita.
AFAICT the qgtk3 platformtheme should be fixed upstream in any case.
Cheers, Fabian
Please let me know what you guys think. Thank you very much.
Regards, Xu
-- Xu Zhao i@xuzhao.net
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 9/2/20 5:06 AM, Fabian Vogt wrote:
Hi,
Am Sonntag, 30. August 2020, 17:50:54 CEST schrieb Xu Zhao:
Greetings everyone,
I am the maintainer of server:messaging/telegram-desktop. I am sending this email to propose removing the libqt5-prioritise-gtk2-platformtheme.patch in the libqt5-qtbase repository. The link to the patch is https://build.opensuse.org/package/view_file/KDE:Qt:5.15/libqt5-qtbase/libqt....
The patch is used for prioritising gtk2 platform plugin in a Qt app, such that the Qt app integrates better with the outside GTK world. There is also a gtk3 platform plugin, but it just not working as good as the gtk2 one and it seems Qt doesn't have plan to fix it (https://bugreports.qt.io/browse/QTBUG-72506).
Unfortunately it's not that simple.
There are two things that need to be separated here: - platformtheme plugins, like KDEPlasmaPlatformTheme, qgtk2 or qgtk3: They provide platform-specific settings (style name, button order, etc.), preferences (fonts, colors, etc.) and provide integration like file dialogs. - style plugins, like fusion, breeze or qgtk2style: They draw UI elements based on the provided color palettes and fonts, optionally some other input like stylesheets or some custom config (like qtcurve).
This means that you can use GTK2 dialogs with Fusion, GTK3 dialogs with Breeze or even KDE Frameworks dialogs with GTK2 themes.
I am proposing to obsolete this patch for the following reasons:
There are two issues: - The qgtk3 platformtheme and qgtk2style can't be used together due to symbol conflicts (this is also the issue you're hitting with telegram) - There is no generic qgtk3style using gtk3 themes as the API is/was not stable enough
This means that if the patch is dropped, Qt applications won't be able to use any GTK themes, unless they also have a native Qt5 style plugin (Adwaita does, some others have some kind of approximation, but need manual fiddling).
In the case that such a native style is used, neither qgtk2 or qgtk2style are used, so there is no conflict and everything works fine. In the other case, not using qgtk2 would be a regression in appearance.
I'm not part of the target group though as I don't use any GTK desktop, so I can't really tell from my own experience. If there's feedback that qgtk2style is somehow a net negative, the patch can be dropped.
First, this patch creates big problem in packaging and running Telegram Desktop on openSUSE GTK-based desktop environments, including GNOME, XFCE, and Cinammon. Basically, Telegram doesn't provide many features when using GTK2 platform plugin, such as system-native notifications, dark mode, and causing clipboard issues (https://github.com/telegramdesktop/tdesktop/blob/6635d03818c90f62cfddb516aca...).
Do they use GTK3 for that? They could just use Qt or implement it themselves.
Because only openSUSE has this Qt patch, this problem doesn't exist on any other distribution.
It does, if the gtk2 style is enabled. (If not, some key info is missing here)
Second, all mainstream GTK-based desktop environments have migrated to GTK3. It doesn't make sense to keep prioritising the gtk2 platform plugin.
Third, I think the problem mentioned in QTBUG-72506 could be fixed by letting the QGtk3Theme find the correct GTK3 theme in src/plugins/platformthemes/gtk3/qgtk3theme.cpp, which should be the right way to do things.
bugreports.qt.io is currently down...
Possible solutions: 1. Don't touch libqt5-qtbase and workaround only in telegram-desktop. This is the current solution. Currently we are using hacks to let Telegram run on qgtk2 platform plugin, which is unstable and could break anytime.
What about detecting (in main) that qgtk2 or qgtk2style would end up getting loaded and then forcing QT_QPA_PLATFORMTHEME=gtk3 instead? That's somewhat like a localized version of removing the patch.
2. Remove libqt5-prioritise-gtk2-platformtheme.patch and don't do anything else. Telegram will be happy, but some Qt applications on GTK3 environments will not be able to correctly themed because of QTBUG-72506. I am not sure about this tho since I am a KDE user. 3. Remove libqt5-prioritise-gtk2-platformtheme.patch and patch GTK3 platform plugin instead I believe this is the right way to go, but it could break other things I am not aware of.
Effectively 2 and 3 are the same. It would likely affect all Qt applications on all GTK DEs not using Adwaita.
AFAICT the qgtk3 platformtheme should be fixed upstream in any case.
That would be nice, I'm still not sure if the patch is really needed though, people who prefer the gtk2 version can still set the following environment variables. QT_QPA_PLATFORMTHEME=gtk2 QT_STYLE_OVERRIDE=gtk2 Enlightenment is setting these by default and it works reasonably well with the dark theme I use and the apps I use including yast, ark and a few others. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B
participants (3)
-
Fabian Vogt
-
Simon Lees
-
Xu Zhao