From d41dc608868e5ad411226a6cbb08c7a2e8670306 Mon Sep 17 00:00:00 2001 From: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com> Date: Tue, 29 Oct 2024 17:38:45 +0100 Subject: [PATCH] book: Add link to Chinese translation (#1894) * book: Add link to Chinese translation * Fix link * Fix GNOME link? --- book/src/introduction.md | 4 ++++ book/src/libadwaita.md | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/book/src/introduction.md b/book/src/introduction.md index e961de8f6a8c..d7bf2c3f9410 100644 --- a/book/src/introduction.md +++ b/book/src/introduction.md @@ -44,6 +44,10 @@ If you are interested in contained and useful examples, we refer you to the corr Every valid code snippet in the book is part of a listing. Like the examples, the listings be found in the [repository](https://github.com/gtk-rs/gtk4-rs/tree/main/book/listings) of `gtk4-rs`. +## Translations + +This book has been translated to Chinese by 陈竞阁 and is served under the following [website](https://mario-hero.github.io/gtk-book-zh_cn/). + ## License The book itself is licensed under the [Creative Commons Attribution 4.0 International license](https://creativecommons.org/licenses/by/4.0/). diff --git a/book/src/libadwaita.md b/book/src/libadwaita.md index 826c0b7a4f8d..8bc1c25afec0 100644 --- a/book/src/libadwaita.md +++ b/book/src/libadwaita.md @@ -1,14 +1,14 @@ # Libadwaita If you target a certain platform with your GUI, you will want to follow the platform's [Human Interface Guidelines](https://en.wikipedia.org/wiki/Human_interface_guidelines) (HIG). -With a GTK application, chances are the platform is either [elementary OS](https://elementary.io) or [GNOME](https://www.gnome.org/). +With a GTK application, chances are the platform is either [elementary OS](https://elementary.io) or [GNOME](https://www.gnome.org). In this chapter we will discuss how to follow GNOME's [HIG](https://developer.gnome.org/hig/) with [libadwaita](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/). Libadwaita is a library augmenting GTK 4 which: - provides widgets to better follow GNOME's HIG - provides widgets to let applications [change their layout ](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/adaptive-layouts.html) based on the available space - integrates the Adwaita [stylesheet](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/styles-and-appearance.html) -- allows runtime recoloring with [named colors](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/named-colors.html) +- allows runtime recoloring with [CSS variables](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/css-variables.html#ui-colors) - adds [API](https://world.pages.gitlab.gnome.org/Rust/libadwaita-rs/stable/latest/docs/libadwaita/struct.StyleManager.html) to support the cross-desktop dark style preference In order to use the Rust bindings, add the [libadwaita crate](https://crates.io/crates/libadwaita) as dependency by executing: