mirror of
https://github.com/ToshioCP/Gtk4-tutorial.git
synced 2024-11-16 19:50:35 +01:00
Modify section 13 and 14.
This commit is contained in:
parent
5b1e820aab
commit
91341e7a8d
2 changed files with 8 additions and 8 deletions
8
sec13.md
8
sec13.md
|
@ -131,7 +131,7 @@ You can get the context by `gtk_widget_get_style_context`.
|
|||
|
||||
GtkCssProvider is an object which parses CSS in order to style widgets.
|
||||
|
||||
To apply your CSS to wodgets, you need to add GtkStyleProvider (the interface of GtkCSSProvider) to GtkStyleContext.
|
||||
To apply your CSS to widgets, you need to add GtkStyleProvider (the interface of GtkCSSProvider) to GtkStyleContext.
|
||||
However, instead, you can add it to GdkDisplay of the window (usually top level window).
|
||||
|
||||
Look at the source file of `startup` handler again.
|
||||
|
@ -248,8 +248,8 @@ These codes have become really simple thanks to tfenotebook.c and tfetextview.c.
|
|||
`open_clicked`, `new_clicked` and `save_clicked` just call corresponding notebook page functions.
|
||||
`close_clicked` is a bit complicated.
|
||||
|
||||
- 22-25: If there's only one page, closing the last page is considered that it also close the top level window and quit the application.
|
||||
Therefore, it gets the top level window and call `gtk_window_destroy`.
|
||||
- 22-25: If there's only one page, we need to close the top level window and quit the application.
|
||||
First, get the top level window and call `gtk_window_destroy`.
|
||||
- 26-28: Otherwise, it removes the current page.
|
||||
|
||||
## meson.build
|
||||
|
@ -265,6 +265,6 @@ Therefore, it gets the top level window and call `gtk_window_destroy`.
|
|||
9
|
||||
10 executable('tfe', sourcefiles, resources, dependencies: gtkdep)
|
||||
|
||||
This file is just modified the source file names.
|
||||
In this file, just the source file names are modified.
|
||||
|
||||
Up: [Readme.md](Readme.md), Prev: [Section 12](sec12.md), Next: [Section 14](sec14.md)
|
||||
|
|
|
@ -85,7 +85,7 @@ You can get the context by `gtk_widget_get_style_context`.
|
|||
|
||||
GtkCssProvider is an object which parses CSS in order to style widgets.
|
||||
|
||||
To apply your CSS to wodgets, you need to add GtkStyleProvider (the interface of GtkCSSProvider) to GtkStyleContext.
|
||||
To apply your CSS to widgets, you need to add GtkStyleProvider (the interface of GtkCSSProvider) to GtkStyleContext.
|
||||
However, instead, you can add it to GdkDisplay of the window (usually top level window).
|
||||
|
||||
Look at the source file of `startup` handler again.
|
||||
|
@ -141,13 +141,13 @@ These codes have become really simple thanks to tfenotebook.c and tfetextview.c.
|
|||
`open_clicked`, `new_clicked` and `save_clicked` just call corresponding notebook page functions.
|
||||
`close_clicked` is a bit complicated.
|
||||
|
||||
- 22-25: If there's only one page, closing the last page is considered that it also close the top level window and quit the application.
|
||||
Therefore, it gets the top level window and call `gtk_window_destroy`.
|
||||
- 22-25: If there's only one page, we need to close the top level window and quit the application.
|
||||
First, get the top level window and call `gtk_window_destroy`.
|
||||
- 26-28: Otherwise, it removes the current page.
|
||||
|
||||
## meson.build
|
||||
|
||||
@@@ tfe5/meson.build
|
||||
|
||||
This file is just modified the source file names.
|
||||
In this file, just the source file names are modified.
|
||||
|
||||
|
|
Loading…
Reference in a new issue