1
0
Fork 0

Automatic backup: 2022-09-04 15:51:53

This commit is contained in:
Alexander Schäferdiek 2022-09-04 15:51:53 +02:00
parent 81e83e1534
commit f14bdab309
2 changed files with 29 additions and 69 deletions

View file

@ -5,78 +5,48 @@ tags: [note,qt,gtk,linux,archlinux]
# Theming Qt and Gtk
Heavily based on [ArchLinux Wiki](https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications).
Based on [ArchLinux Wiki](https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications).
Unify Qt5/Qt6 and GTK2/GTK3 design.
Use recommended `96` DPI. Scaling is hell, don't try it!
Unify Qt5/Qt6 and GTK2/GTK3/GTK4 design.
Of course, this depends on your personal preference. If you pick
* GNOME the default _Adwaita (dark)_ theme is very pleasing and
* for all other scenarios, _Arc (Darker)_ looks great.
* GNOME the default _Adwaita (dark)_ theme is very pleasing (also applied to Qt and Gtk3) and
* for all other scenarios, _Arc (Darker)_ looks great, but of course, depends on your personal preferences.
## Theme
To unify look in GTK and Qt applications GTK and Qt applications need to be themed in the same way. To have the most unified look afterwards, it's recommended that you look up if your theme of choice supports GTK2, GTK3, GTK4, Qt5 and Qt6. The Qt variants with `kvantum` or an explicit Qt theme for it.
On ArchLinux most _kvantum_ themes are in the AUR and prefixed with `kvantum-theme-...`.
### Qt applications
To unify look in GTK and Qt applications, install
In any environment (your shell env and probably `envvars` of `environment.d`) source, e.g. `.zshenv`, set `export QT_QPA_PLATFORMTHEME="qt5ct"` (which is also forward compatible with `qt6ct`).
```shell
qt5ct
qt6ct
```
| Variant | Plain Adwaita | Backported Adwaita (Gtk3) + Qt5/6 | Any other theme, example Arc Darker |
|:------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Required packages | <div><span style="background-color: var(--background-primary); color: var(--text-normal); font-family: var(--font-interface);">qt5ct</span><br></div><div>qt6ct<br><div>adwaita-qt5</div><div>adwaita-qt6</div></div> | <div><span style="background-color: var(--background-primary); color: var(--text-normal); font-family: var(--font-interface);">qt5ct</span><br></div><div>qt6ct</div><div>adw-gtk3<br><div>kvantum</div></div><div>kvantum-theme-libadwaita-git</div> | <div><span style="background-color: var(--background-primary); color: var(--text-normal); font-family: var(--font-interface);">qt5ct</span><br></div><div>qt6ct<br><div>kvantum</div></div><div>kvantum-theme-arc</div><div>arc-gtk-theme</div> |
| Instructions&nbsp; in qt5ct / qt6ct | Set Adwaita as theme | Set kvantum or kvantum-dark as theme | Set kvantum or kvantum-dark as theme |
| Instructions in Kvantum | - | Select KvAdwaita or KvAdwaitaDark | Select KvArcDarker |
**Important:** In any environment (your shell env and probably `envvars` of `environment.d`) source, e.g. `.zshenv`, set `export QT_QPA_PLATFORMTHEME="qt5ct"` (which is also forward compatible with `qt6ct`).
Depending on your personal preference, you can also instruct `qt5ct` / `qt6ct` to use GTK style dialogs.
#### If your choice is Adwaita
### Gtk 2 and Gtk 3 applications
For _Adwaita_ install the following
Set your proper theme via respective utilities like `nwg-look` (also works for [[KB/Linux/Desktop/sway]]) and/or GNOME Tweaks for GTK 4.
```shell
adwaita-qt5
adwaita-qt6
```
* Start each and do the same: `qt5ct` and `qt6ct`
* select and dialogs to _Default_
* select _Default_ as Palette
* select _Adwaita (Dark)_ as theme
#### If your choice is another theme, e.g. Arc (Dark/Darker)
* Install the following packages depending on your choice
```shell
arc-gtk-theme
arc-kde
kvantum
# Arc or any other kvantum supported theme
kvantum-theme-arc
```
* Start each and do the same: `qt5ct` and `qt6ct`
* select and dialogs to _Default_
* select _Default_ as Palette
* Use `kvantummanager` and select theme `KvArc...` (or what you like to set)
### Gtk 3 applications
Set your proper theme via respective utilities like `nwg-look` and/or GNOME Tweaks for GTK 4.
### Gtk 2
Set your proper theme via respective utilities like `nwg-look`.
Install the Gtk 2 variant of your theme first, e.g. `adwaita-dark` or `arc-theme`.
If your theme doesn't support Gtk 2, you might need to look for the correct theme first!
## Font
_Noto Sans Regular (11)_ seems great. Set it everywhere.
_Noto Sans Regular (11)_ seems great. Set it everywhere:
Set them via `qt5ct`, `qt6ct` and via respective utilities like `nwg-look` and/or GNOME Tweaks for GTK.
* `qt5ct` for Qt 5
* `qt6ct` for Qt 6
* `nwg-look` and/or GNOME Tweaks for GTK
In addition, adapting `fontconfig` might be useful. See [[KB/Linux/Desktop/Fonts]].
In addition, you can adapt your `fontconfig/` folder contents. See [[KB/Linux/Desktop/Fonts]].
## Icons
@ -88,7 +58,11 @@ arc-icon-theme
adwaita-icon-theme
```
Set them via `qt5ct`, `qt6ct` and via respective utilities like `nwg-look` and/or GNOME Tweaks for GTK.
Set it everywhere:
* `qt5ct` for Qt 5
* `qt6ct` for Qt 6
* `nwg-look` and/or GNOME Tweaks for GTK
## Application specifics

View file

@ -5,21 +5,7 @@ tags: [note,linux,archlinux,gnome,wm]
# GNOME
## Theme
- Apps: Arc Darker
- Cursor: Adwaita
- Icons: Papirus
- GNOME Terminal: https://github.com/Mayccoll/Gogh
## Fonts
Please install necessary [[KB/Linux/Desktop/Fonts]] first.
- Interface Text: Noto Sans Regular 11
- Document Text: Noto Sans Regular 11
- Monospace Text: Source Code Pro 10
- (Legacy) Window Titles: Noto Sans Bold 11
- Hinting: Slight
- Antialiasing: Standard (Grayscale)
For theming, please have a look at [[KB/Linux/Desktop/Theming Qt and Gtk]]. _Adwaita_ is the default and has some advantages when using GNOME (consistent look).
## Extensions