Add section on how to make AppImages of Qt apps look native on Gtk

オープン
#50 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
55/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
停滞
領域
documentation

調査の方向性

まず、提案されたセクションと、リンクされている linuxdeployqt および Ask Ubuntu のリファレンスを確認します。plugin のビルドコマンド、extra-plugins オプション、QT_QPA_PLATFORMTHEME 設定を含む AppImage/Qt-on-Gtk のガイダンスを追加します。完了とは、ネイティブに見える結果を実現する方法がドキュメントで明確に説明されている状態です。

索引モデルが issue の本文から書いたものです。

説明

Add section on how to make AppImages of Qt apps look native on Gtk based on

Proposal:

Making AppImages of Qt apps look native on Gtk

Here is an example of a native-looking Qt application running on a Xubuntu (Xfce-based) distribution in an AppImage:

image

To make AppImages of Qt applications look native on Gtk based systems, you need to bundle plugins/platformthemes/libqgtk2.so and plugins/styles/libqgtk2style.so. Since they do not come with Qt by default anymore, you need to compile them by hand.

Example:

apt-get update
apt-get -y install libgtk2.0-dev
git clone http://code.qt.io/qt/qtstyleplugins.git
cd qtstyleplugins
qmake
make -j$(nproc)
make install 
cd -

(...)

linuxdeployqt (...) -extra-plugins=platformthemes/libqgtk2.so,styles/libqgtk2style.so

At runtime, you need to export QT_QPA_PLATFORMTHEME=gtk2, e.g., by adding this line to a custom AppRun script. (Xubuntu exports this variable automatically).

Background information

According to https://askubuntu.com/a/910143,

The problem has occurred since Qt5.7. In this release, the GTK2 platform theme and style was removed and replaced with the GTK3 platform theme. I've recently been in discussion with the Qt developers and it appears there isn't a GTK3 style to complement the platform theme and there are currently no plans to implement this in the future.

References

主要言語
HTML
スター
50
フォーク
46
平均マージ
5時間 11分
マージ済み PR(30日)
2

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AppImage/docs.appimage.org のほかの issue

AppImage/docs.appimage.org の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。