Compare commits
513 Commits
wip/ebassi
...
more-root
Author | SHA1 | Date | |
---|---|---|---|
|
6e735f709b | ||
|
41c0ac1a68 | ||
|
4e97417efa | ||
|
beb8d362ff | ||
|
f202707210 | ||
|
f8609efa2b | ||
|
2e5ccce088 | ||
|
3487ebe4fd | ||
|
f57e66cf37 | ||
|
1818f5589d | ||
|
d291dff0ac | ||
|
b70cd64d6d | ||
|
e8b5056940 | ||
|
6711aa2a4e | ||
|
ae47ec1c3b | ||
|
14444826c1 | ||
|
46cb221220 | ||
|
dfc1673653 | ||
|
b64f852d60 | ||
|
12442bd1bf | ||
|
0ae7c30105 | ||
|
fd318a17a4 | ||
|
e2b9f3258e | ||
|
ad58dd5cf5 | ||
|
4052bb2535 | ||
|
d8482edaf5 | ||
|
baefee17c5 | ||
|
751ef5b5b9 | ||
|
5965ead5a7 | ||
|
5fc446dabf | ||
|
70100d888a | ||
|
380c4ece8d | ||
|
6df2023e9d | ||
|
f59f4d774b | ||
|
a881cbff3a | ||
|
5b10a2929e | ||
|
b0eceb65d7 | ||
|
6e19fb7b36 | ||
|
b96e835d9e | ||
|
65174c7989 | ||
|
f0795a795b | ||
|
a5a7cdd84b | ||
|
6cb8f638d1 | ||
|
50e66d5c0d | ||
|
efd92f7a9e | ||
|
407307c7e4 | ||
|
51fac44ba5 | ||
|
2bdc0748e5 | ||
|
1ef250f44a | ||
|
0d119f81c8 | ||
|
e1570e9ebc | ||
|
4a293aa762 | ||
|
f0142b9c4b | ||
|
6a4bf2b993 | ||
|
f5b44c11c8 | ||
|
c24f32619f | ||
|
49d83820a2 | ||
|
70a1233a28 | ||
|
e5857a760f | ||
|
f67ef125f3 | ||
|
837d9bf39e | ||
|
96fa1fb5c1 | ||
|
a3ae12c0b7 | ||
|
ffee2d4567 | ||
|
b1fe5d8f1f | ||
|
e7824d8f9e | ||
|
8e97dc03de | ||
|
5d208071f5 | ||
|
eea651d5f9 | ||
|
888b967d6b | ||
|
f95ed63b88 | ||
|
3eda783d0a | ||
|
27f008de44 | ||
|
7d69430ebd | ||
|
05f8319270 | ||
|
0961fe7a55 | ||
|
ddea11b7b8 | ||
|
66b6824876 | ||
|
0fe1091ba8 | ||
|
f64b0a705e | ||
|
c1ad7217b5 | ||
|
f11d0118a3 | ||
|
7f8ba95db5 | ||
|
ff4b3f1170 | ||
|
78c54b27d7 | ||
|
85fb368834 | ||
|
0e29408215 | ||
|
3df4d1440a | ||
|
572142b950 | ||
|
103637f3b9 | ||
|
a339a5d617 | ||
|
74f4aecef5 | ||
|
2e9c7d0744 | ||
|
2e94891a6f | ||
|
b9a41a903b | ||
|
ef89ef9051 | ||
|
b741d36ced | ||
|
82bde1e10a | ||
|
eb8b1095c8 | ||
|
b303c20570 | ||
|
4dd7eb40a3 | ||
|
19bf937401 | ||
|
9ca392b38d | ||
|
c739071d31 | ||
|
120ee17e09 | ||
|
02e856f62e | ||
|
01f7f255b5 | ||
|
514c3679dc | ||
|
8fbfa955de | ||
|
cfc7dc016e | ||
|
8222631d63 | ||
|
93b47c12d7 | ||
|
9a8082bab2 | ||
|
8ce6cf569f | ||
|
e223f16aa9 | ||
|
dead174d70 | ||
|
e922ec1839 | ||
|
63a23ed0da | ||
|
2ecb4003be | ||
|
a953fd762e | ||
|
dbf0654e5b | ||
|
4529f52c02 | ||
|
63a8bd06a6 | ||
|
7c6e3e31c7 | ||
|
d006ee65f5 | ||
|
65e9d71da5 | ||
|
02bb364474 | ||
|
9174616a17 | ||
|
0ef6c3afed | ||
|
a417956054 | ||
|
b299ac8dfa | ||
|
22ea832eb3 | ||
|
ac445229d0 | ||
|
3422edff6c | ||
|
102c0ce696 | ||
|
996a4246fb | ||
|
613f8ceacf | ||
|
0e11944166 | ||
|
08bd6904b9 | ||
|
37b841b59b | ||
|
7d9e63ae38 | ||
|
f1012b5623 | ||
|
a0454e4025 | ||
|
b8c981fb2b | ||
|
3a1a7c43f3 | ||
|
fa3d1940bf | ||
|
667ea2dd42 | ||
|
210c5d88a2 | ||
|
c6e6fb19e7 | ||
|
39d5f9e07b | ||
|
cbbc7dd70f | ||
|
a31da76f95 | ||
|
8bb6d00ce2 | ||
|
1930c74736 | ||
|
ea098f8d51 | ||
|
45fb1d06e3 | ||
|
d247e5707d | ||
|
36ac867ea9 | ||
|
936181f354 | ||
|
fcb58887fa | ||
|
1801bf6d83 | ||
|
b9c8dd64b3 | ||
|
32795963c0 | ||
|
7325f8e204 | ||
|
76be7a5025 | ||
|
c9d9f8b750 | ||
|
ca2c05cdb3 | ||
|
10e5856583 | ||
|
0739399766 | ||
|
bea1a02edd | ||
|
74d6d81db9 | ||
|
e5e2bd3187 | ||
|
d327d3fab2 | ||
|
fb4f5e0a78 | ||
|
aa552229c9 | ||
|
c44c44ee25 | ||
|
7ad0f7fc52 | ||
|
285aba6ece | ||
|
19ffb40b27 | ||
|
86978d2654 | ||
|
694d7c378b | ||
|
446713fb8b | ||
|
2fbdd8b849 | ||
|
ddf2a3681d | ||
|
4ca1f7e29f | ||
|
aeda099f47 | ||
|
2e5bc9fbc3 | ||
|
d65a60e0bd | ||
|
d3a2218ff4 | ||
|
e0ec5caaf8 | ||
|
2ba928e142 | ||
|
07722582ef | ||
|
1f56f5c2e9 | ||
|
cd37b872ca | ||
|
acaa257469 | ||
|
89d8ae0431 | ||
|
fb44491926 | ||
|
ae9a29f8ce | ||
|
2866a13f30 | ||
|
6ef775dbcb | ||
|
927e983ff8 | ||
|
fbe0db4007 | ||
|
8de8b8eebc | ||
|
82fdd483d2 | ||
|
8c0b70691b | ||
|
1750922631 | ||
|
2dd85b826f | ||
|
c0c6c87781 | ||
|
f4b26af255 | ||
|
2bd93303c4 | ||
|
4fb342fb03 | ||
|
ffc7a81f84 | ||
|
5f73d527ec | ||
|
93514b474f | ||
|
ce5f198c93 | ||
|
16026b6898 | ||
|
7207c82c39 | ||
|
bcafd20529 | ||
|
6c4e088620 | ||
|
4df2a4c82c | ||
|
92d6f5e8fd | ||
|
ec6458db16 | ||
|
aa71b6c405 | ||
|
2d57cb6ce3 | ||
|
756e8f3189 | ||
|
52b83ac553 | ||
|
4feb88e2a4 | ||
|
14bc61cde7 | ||
|
220ccaf363 | ||
|
46fba85ed7 | ||
|
78da8e4dc5 | ||
|
f496b4c072 | ||
|
2e1a204c49 | ||
|
cdb729441e | ||
|
e0f8b8e820 | ||
|
916508f3db | ||
|
9255a12493 | ||
|
976664c004 | ||
|
8595665524 | ||
|
7b08d13aea | ||
|
dc0750f6ef | ||
|
ccb0a0fdfe | ||
|
dcdec4bf96 | ||
|
30386bbaca | ||
|
16024fba7c | ||
|
317b9e638c | ||
|
bee51835c4 | ||
|
a872c41f79 | ||
|
ea554580c7 | ||
|
14feafe3a9 | ||
|
d1ea591f18 | ||
|
2146fd28f8 | ||
|
f79ded3aef | ||
|
9bfdcfbbcb | ||
|
131c225598 | ||
|
81f88baa2c | ||
|
e1f903cb11 | ||
|
6959e8c6a6 | ||
|
a72b91ec94 | ||
|
58eb1c905a | ||
|
37d218b160 | ||
|
2eaffe4648 | ||
|
7cb505a395 | ||
|
cf5f577834 | ||
|
7371d14718 | ||
|
3f2934bff9 | ||
|
3d05e6777a | ||
|
e522641920 | ||
|
3517eb7c54 | ||
|
b72ee00539 | ||
|
c07cd23aa9 | ||
|
8ef417dad1 | ||
|
49cbf2a16b | ||
|
915acce470 | ||
|
e0dac3ab73 | ||
|
ed6a6d30a6 | ||
|
7384cc7e70 | ||
|
3fcfd734f4 | ||
|
4dc3595e2c | ||
|
f05932811b | ||
|
c16a861f68 | ||
|
257bd4f63f | ||
|
038a9b2b84 | ||
|
b8903a4aba | ||
|
d8a5f41aab | ||
|
1632cc7929 | ||
|
a7eae67228 | ||
|
c7467b4e76 | ||
|
81055ca7d9 | ||
|
232c1750a7 | ||
|
4763406439 | ||
|
b675597075 | ||
|
ce60089f46 | ||
|
edd3f28a1d | ||
|
e31f7356e9 | ||
|
4ace873046 | ||
|
72b6644223 | ||
|
1fb3febacc | ||
|
59152b8a8d | ||
|
addcf2e526 | ||
|
ed3b9669b3 | ||
|
ad9c2a624f | ||
|
101f7c7aa4 | ||
|
190412f2e8 | ||
|
786322426a | ||
|
a3e517aa9c | ||
|
8d537379ed | ||
|
7be59fa8e3 | ||
|
7a59fd7fdf | ||
|
a5e4a38b60 | ||
|
b56c0fb596 | ||
|
5a0eea82ba | ||
|
61fbd5b541 | ||
|
22f073b57b | ||
|
1668496359 | ||
|
45361e19c3 | ||
|
d2d35e52c3 | ||
|
dbc4298b0a | ||
|
e91144f6c9 | ||
|
a75dcce707 | ||
|
28044aa2df | ||
|
4fbf10f71e | ||
|
3260a60034 | ||
|
785373ce2a | ||
|
aad44999f3 | ||
|
721e598e99 | ||
|
51268f53d8 | ||
|
9d950087ef | ||
|
1674b6e269 | ||
|
33ac41bc94 | ||
|
f60ca91d2b | ||
|
057144cfdd | ||
|
9b91041025 | ||
|
b215384064 | ||
|
e6c5b9348d | ||
|
55b99e9916 | ||
|
131e8d8905 | ||
|
e82d97f069 | ||
|
490bb4c2ea | ||
|
79664567c4 | ||
|
7abcd5ba3b | ||
|
3489ed087d | ||
|
ca1ffa0c23 | ||
|
32e61b955a | ||
|
de4703ebfa | ||
|
a8e6cd3c47 | ||
|
f6c07a0ddb | ||
|
25fd230327 | ||
|
866d0c4fb9 | ||
|
4569bc6358 | ||
|
1b6734346c | ||
|
803ae6a62f | ||
|
589cb19715 | ||
|
0f24fddaf7 | ||
|
179e85f803 | ||
|
1aeeefdccb | ||
|
dcda16a26f | ||
|
99c5a3d72c | ||
|
101f1c7b42 | ||
|
2350d0945a | ||
|
dbd360262c | ||
|
5120748981 | ||
|
d080be3e50 | ||
|
14010899b5 | ||
|
25e199e7b7 | ||
|
257df1d8b5 | ||
|
47ba423eca | ||
|
489e87baea | ||
|
43234eec42 | ||
|
3d1fd5169c | ||
|
268fcbb838 | ||
|
af63e894e6 | ||
|
2514760a8b | ||
|
4040f76529 | ||
|
3bb1423804 | ||
|
35e973d698 | ||
|
8390883028 | ||
|
f84116b8ff | ||
|
27446b4b04 | ||
|
4dca2f9604 | ||
|
5852a5ece8 | ||
|
a7fa1cf6f2 | ||
|
d9d4879623 | ||
|
a15325ef44 | ||
|
5765d47568 | ||
|
7286ede490 | ||
|
4a333f826a | ||
|
8c4dc3de4d | ||
|
0a5362a7d9 | ||
|
245cebec1d | ||
|
bde2332a1a | ||
|
20429f4764 | ||
|
1b504a3303 | ||
|
61ec2ab5c9 | ||
|
611964d915 | ||
|
16481734c1 | ||
|
d54cccfdd5 | ||
|
7f4b7c48e8 | ||
|
df1f036a95 | ||
|
f3c51cdf5f | ||
|
95404c8a51 | ||
|
b2f0c10ade | ||
|
847b3a9bae | ||
|
7fcd183317 | ||
|
9b06692442 | ||
|
8a667a5f1d | ||
|
a3801299f5 | ||
|
714d04cb86 | ||
|
f03fe74369 | ||
|
57542e0cf6 | ||
|
70db084d43 | ||
|
c5f90fc20d | ||
|
1528e7eabf | ||
|
9dee863217 | ||
|
e31a96123e | ||
|
a65f5c2e73 | ||
|
a5ba0d46c2 | ||
|
b0e67f1eed | ||
|
b3dbdcdf77 | ||
|
f87e40bccd | ||
|
19dbc831c5 | ||
|
e2693ef44f | ||
|
2de7f760e5 | ||
|
d339a43634 | ||
|
003eefe8bf | ||
|
f3f5a896de | ||
|
883d5d8584 | ||
|
c7b1df1ebd | ||
|
e9e40ddb42 | ||
|
a543ed84f6 | ||
|
3d34b91453 | ||
|
1ccba26de9 | ||
|
c47abb5f68 | ||
|
28c51175d8 | ||
|
99738e7059 | ||
|
494e9d750a | ||
|
3a13515777 | ||
|
ab6a67dbeb | ||
|
d7756dc62b | ||
|
bd71e744d2 | ||
|
09361e7665 | ||
|
4349e33d4e | ||
|
afaac98442 | ||
|
c1f79a935c | ||
|
636a9a6ea7 | ||
|
6ebbd8d375 | ||
|
773efe41a9 | ||
|
359bc7695c | ||
|
7723749e00 | ||
|
c875465477 | ||
|
7978e04963 | ||
|
bbd1532f84 | ||
|
3d40f003b2 | ||
|
a0e8cd5bac | ||
|
d86c99312c | ||
|
f3fdb83160 | ||
|
9430b0b6ee | ||
|
045b92abdd | ||
|
af56f06b7b | ||
|
5e00cdbd74 | ||
|
9baef5e101 | ||
|
c7af14dea8 | ||
|
f3f22b76dc | ||
|
a0f750f7c9 | ||
|
3543a54545 | ||
|
95c0f07295 | ||
|
8f697d6715 | ||
|
28241cecff | ||
|
8e0cbc1c3d | ||
|
7843da1f2b | ||
|
7aad0896a7 | ||
|
7c72712b0f | ||
|
a25d6b1dc7 | ||
|
c8ec0f42a0 | ||
|
2353e0e03f | ||
|
11f9ae8202 | ||
|
0e07912231 | ||
|
c49cc977fa | ||
|
3ca688a6dd | ||
|
fae6113ce3 | ||
|
5c81cc2f36 | ||
|
01e985a830 | ||
|
b2eff300b1 | ||
|
dbc8d253c3 | ||
|
0f6e15cfa2 | ||
|
ea2f66226a | ||
|
e14fe222e8 | ||
|
58d9c3d5bd | ||
|
a5fcdca935 | ||
|
215903c4f1 | ||
|
16867d8abf | ||
|
9b15c6900a | ||
|
135cf16969 | ||
|
374e93ef96 | ||
|
83f8056992 | ||
|
cf1526cca6 | ||
|
c1c764255f | ||
|
7dd54b5789 | ||
|
697aa95c7e | ||
|
a93f984b16 | ||
|
5c50e48156 | ||
|
c7af3e61e2 | ||
|
e104337704 | ||
|
8a7706f2b5 | ||
|
6a3c2a230a | ||
|
a33ff4c6ab | ||
|
7ff949ea30 | ||
|
25bca27bfe | ||
|
e269f43afc | ||
|
a52431d2b4 | ||
|
8a27302d56 | ||
|
8ce01084af | ||
|
aa14b187e0 |
@@ -27,6 +27,6 @@ ccache --show-stats
|
||||
xvfb-run -a -s "-screen 0 1024x768x24" \
|
||||
meson test \
|
||||
--print-errorlogs \
|
||||
--suite=gtk+ \
|
||||
--no-suite=gtk+:gsk \
|
||||
--no-suite=gtk+:a11y
|
||||
--suite=gtk \
|
||||
--no-suite=gtk:gsk \
|
||||
--no-suite=gtk:a11y
|
||||
|
@@ -21,7 +21,7 @@ many things that we value:
|
||||
Please, do not use the issue tracker for support questions. If you have
|
||||
questions on how to use GTK effectively, you can use:
|
||||
|
||||
- the `#gtk+` IRC channel on irc.gnome.org
|
||||
- the `#gtk` IRC channel on irc.gnome.org
|
||||
- the [gtk](https://mail.gnome.org/mailman/listinfo/gtk-list) mailing list,
|
||||
for general questions on GTK
|
||||
- the [gtk-app-devel](https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list)
|
||||
@@ -245,7 +245,7 @@ people committing to GTK to follow a few rules:
|
||||
better way to do things. If you are making changes to GTK, you should
|
||||
be subscribed to the [gtk-devel](https://mail.gnome.org/mailman/listinfo/gtk-devel-list)
|
||||
mailing list; this is a good place to ask about intended changes.
|
||||
The `#gtk+` IRC channel on irc.gnome.org is also a good place to find GTK
|
||||
The `#gtk` IRC channel on irc.gnome.org is also a good place to find GTK
|
||||
developers to discuss changes, but if you live outside of the EU/US time
|
||||
zones, an email to the gtk-devel mailing list is the most certain and
|
||||
preferred method.
|
||||
|
26
README.md
@@ -1,17 +1,17 @@
|
||||
GTK+ — The GTK toolkit
|
||||
======================
|
||||
GTK — The GTK toolkit
|
||||
=====================
|
||||
|
||||
[](https://gitlab.gnome.org/GNOME/gtk/pipelines)
|
||||
|
||||
General information
|
||||
-------------------
|
||||
|
||||
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
|
||||
Offering a complete set of widgets, GTK+ is suitable for projects ranging
|
||||
GTK is a multi-platform toolkit for creating graphical user interfaces.
|
||||
Offering a complete set of widgets, GTK is suitable for projects ranging
|
||||
from small one-off projects to complete application suites.
|
||||
|
||||
GTK+ is free software and part of the GNU Project. However, the
|
||||
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
|
||||
GTK is free software and part of the GNU Project. However, the
|
||||
licensing terms for GTK, the GNU LGPL, allow it to be used by all
|
||||
developers, including those developing proprietary software, without any
|
||||
license fees or royalties.
|
||||
|
||||
@@ -39,7 +39,7 @@ Nightly documentation can be found at
|
||||
Building and installing
|
||||
-----------------------
|
||||
|
||||
In order to build GTK+ you will need:
|
||||
In order to build GTK you will need:
|
||||
|
||||
- [a C99 compatible compiler](https://wiki.gnome.org/Projects/GLib/CompilerRequirements)
|
||||
- [Python 3](https://www.python.org/)
|
||||
@@ -79,7 +79,7 @@ If you are building the Wayland backend, you will also need:
|
||||
- Wayland-cursor
|
||||
- Wayland-EGL
|
||||
|
||||
Once you have all the necessary dependencies, you can build GTK+ by using
|
||||
Once you have all the necessary dependencies, you can build GTK by using
|
||||
Meson:
|
||||
|
||||
```sh
|
||||
@@ -94,7 +94,7 @@ You can run the test suite using:
|
||||
$ meson test
|
||||
```
|
||||
|
||||
And, finally, you can install GTK+ using:
|
||||
And, finally, you can install GTK using:
|
||||
|
||||
```
|
||||
$ sudo ninja install
|
||||
@@ -118,10 +118,10 @@ In the bug report please include:
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
- which version of GTK+ you are using
|
||||
- which version of GTK you are using
|
||||
- what operating system and version
|
||||
- for Linux, which distribution
|
||||
- if you built GTK+, the list of options used to configure the build
|
||||
- if you built GTK, the list of options used to configure the build
|
||||
|
||||
And anything else you think is relevant.
|
||||
|
||||
@@ -143,7 +143,7 @@ In the bug report please include:
|
||||
Release notes
|
||||
-------------
|
||||
|
||||
The release notes for GTK+ are part of the migration guide in the API
|
||||
The release notes for GTK are part of the migration guide in the API
|
||||
reference. See:
|
||||
|
||||
- [3.x release notes](https://developer.gnome.org/gtk3/unstable/gtk-migrating-2-to-3.html)
|
||||
@@ -152,7 +152,7 @@ reference. See:
|
||||
Licensing terms
|
||||
---------------
|
||||
|
||||
GTK+ is released under the terms of the GNU Lesser General Public License,
|
||||
GTK is released under the terms of the GNU Lesser General Public License,
|
||||
version 2.1 or, at your option, any later version, as published by the Free
|
||||
Software Foundation.
|
||||
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"command": "gtk4-demo",
|
||||
"tags": ["devel", "development", "nightly"],
|
||||
"rename-icon": "gtk4-demo",
|
||||
"desktop-file-name-prefix": "(Development) ",
|
||||
"finish-args": [
|
||||
"--device=dri",
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"command": "gtk4-widget-factory",
|
||||
"tags": ["devel", "development", "nightly"],
|
||||
"rename-icon": "gtk4-widget-factory",
|
||||
"desktop-file-name-prefix": "(Development) ",
|
||||
"finish-args": [
|
||||
"--device=dri",
|
||||
|
@@ -200,20 +200,20 @@ activate_about (GSimpleAction *action,
|
||||
};
|
||||
|
||||
gtk_show_about_dialog (GTK_WINDOW (window),
|
||||
"program-name", "GTK+ Code Demos",
|
||||
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
|
||||
"program-name", "GTK Code Demos",
|
||||
"version", g_strdup_printf ("%s,\nRunning against GTK %d.%d.%d",
|
||||
PACKAGE_VERSION,
|
||||
gtk_get_major_version (),
|
||||
gtk_get_minor_version (),
|
||||
gtk_get_micro_version ()),
|
||||
"copyright", "(C) 1997-2013 The GTK+ Team",
|
||||
"copyright", "(C) 1997-2013 The GTK Team",
|
||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK+ functions.",
|
||||
"comments", "Program to demonstrate GTK functions.",
|
||||
"authors", authors,
|
||||
"documenters", documentors,
|
||||
"logo-icon-name", "gtk4-demo",
|
||||
"title", "About GTK+ Code Demos",
|
||||
"logo-icon-name", "org.gtk.Demo",
|
||||
"title", "About GTK Code Demos",
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<interface>
|
||||
<template class="DemoApplicationWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">Application Class</property>
|
||||
@@ -25,8 +24,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem">
|
||||
</object>
|
||||
<object class="GtkSeparatorToolItem"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.10 -->
|
||||
<menu id="appmenu">
|
||||
<section>
|
||||
<item>
|
||||
|
@@ -96,12 +96,12 @@ create_page1 (GtkWidget *assistant)
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||
|
||||
label = gtk_label_new ("You must fill out this entry to continue:");
|
||||
gtk_box_pack_start (GTK_BOX (box), label);
|
||||
gtk_container_add (GTK_CONTAINER (box), label);
|
||||
|
||||
entry = gtk_entry_new ();
|
||||
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
|
||||
gtk_widget_set_valign (entry, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (box), entry);
|
||||
gtk_container_add (GTK_CONTAINER (box), entry);
|
||||
g_signal_connect (G_OBJECT (entry), "changed",
|
||||
G_CALLBACK (on_entry_changed), assistant);
|
||||
|
||||
@@ -119,7 +119,7 @@ create_page2 (GtkWidget *assistant)
|
||||
|
||||
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
|
||||
"even if you do not check this");
|
||||
gtk_box_pack_start (GTK_BOX (box), checkbutton);
|
||||
gtk_container_add (GTK_CONTAINER (box), checkbutton);
|
||||
|
||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant), box);
|
||||
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE);
|
||||
|
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkWindow" id="window">
|
||||
@@ -54,269 +53,275 @@
|
||||
<property name="vhomogeneous">0</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="row-spacing">12</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Duck</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Background</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="duck"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="gradient"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">
|
||||
Blended picture</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend0"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">page0</property>
|
||||
<property name="title" translatable="yes">Ducky</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkGrid">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="row-spacing">12</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Duck</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Background</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="duck"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="gradient"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">
|
||||
Blended picture</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend0"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="row-spacing">12</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Red</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Blue</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="red"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="blue"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">
|
||||
Blended picture</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend1"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">page1</property>
|
||||
<property name="title" translatable="yes">Blends</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkGrid">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="row-spacing">12</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Red</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Blue</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="red"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="blue"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">
|
||||
Blended picture</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend1"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="cyan"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="magenta"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="yellow"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend2"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Cyan</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Magenta</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Yellow</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Blended picture</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">page2</property>
|
||||
<property name="title" translatable="yes">CMYK</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkGrid">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="cyan"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="magenta"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="yellow"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend2"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Cyan</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Magenta</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Yellow</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Blended picture</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -326,7 +331,6 @@ Blended picture</property>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="titlebar">
|
||||
</child>
|
||||
<child type="titlebar"/>
|
||||
</object>
|
||||
</interface>
|
||||
|
482
demos/gtk-demo/bluroverlay.c
Normal file
@@ -0,0 +1,482 @@
|
||||
/*
|
||||
* bluroverlay.c
|
||||
* This file is part of gtk
|
||||
*
|
||||
* Copyright (C) 2011 - Ignacio Casal Quinteiro, Mike Krüger
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "bluroverlay.h"
|
||||
|
||||
/*
|
||||
* This is a cut-down copy of gtkoverlay.c with a custom snapshot
|
||||
* function that support a limited form of blur-under.
|
||||
*/
|
||||
typedef struct _BlurOverlayChild BlurOverlayChild;
|
||||
|
||||
struct _BlurOverlayChild
|
||||
{
|
||||
double blur;
|
||||
};
|
||||
|
||||
enum {
|
||||
GET_CHILD_POSITION,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
static GQuark child_data_quark = 0;
|
||||
|
||||
G_DEFINE_TYPE (BlurOverlay, blur_overlay, GTK_TYPE_BIN)
|
||||
|
||||
static void
|
||||
blur_overlay_set_overlay_child (GtkWidget *widget,
|
||||
BlurOverlayChild *child_data)
|
||||
{
|
||||
g_object_set_qdata_full (G_OBJECT (widget), child_data_quark, child_data, g_free);
|
||||
}
|
||||
|
||||
static BlurOverlayChild *
|
||||
blur_overlay_get_overlay_child (GtkWidget *widget)
|
||||
{
|
||||
return (BlurOverlayChild *) g_object_get_qdata (G_OBJECT (widget), child_data_quark);
|
||||
}
|
||||
|
||||
static void
|
||||
blur_overlay_measure (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
int for_size,
|
||||
int *minimum,
|
||||
int *natural,
|
||||
int *minimum_baseline,
|
||||
int *natural_baseline)
|
||||
{
|
||||
GtkWidget *child;
|
||||
|
||||
for (child = gtk_widget_get_first_child (widget);
|
||||
child != NULL;
|
||||
child = gtk_widget_get_next_sibling (child))
|
||||
{
|
||||
int child_min, child_nat, child_min_baseline, child_nat_baseline;
|
||||
|
||||
gtk_widget_measure (child,
|
||||
orientation,
|
||||
for_size,
|
||||
&child_min, &child_nat,
|
||||
&child_min_baseline, &child_nat_baseline);
|
||||
|
||||
*minimum = MAX (*minimum, child_min);
|
||||
*natural = MAX (*natural, child_nat);
|
||||
if (child_min_baseline > -1)
|
||||
*minimum_baseline = MAX (*minimum_baseline, child_min_baseline);
|
||||
if (child_nat_baseline > -1)
|
||||
*natural_baseline = MAX (*natural_baseline, child_nat_baseline);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
blur_overlay_compute_child_allocation (BlurOverlay *overlay,
|
||||
GtkWidget *widget,
|
||||
BlurOverlayChild *child,
|
||||
GtkAllocation *widget_allocation)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
gboolean result;
|
||||
|
||||
g_signal_emit (overlay, signals[GET_CHILD_POSITION],
|
||||
0, widget, &allocation, &result);
|
||||
|
||||
widget_allocation->x = allocation.x;
|
||||
widget_allocation->y = allocation.y;
|
||||
widget_allocation->width = allocation.width;
|
||||
widget_allocation->height = allocation.height;
|
||||
}
|
||||
|
||||
static GtkAlign
|
||||
effective_align (GtkAlign align,
|
||||
GtkTextDirection direction)
|
||||
{
|
||||
switch (align)
|
||||
{
|
||||
case GTK_ALIGN_START:
|
||||
return direction == GTK_TEXT_DIR_RTL ? GTK_ALIGN_END : GTK_ALIGN_START;
|
||||
case GTK_ALIGN_END:
|
||||
return direction == GTK_TEXT_DIR_RTL ? GTK_ALIGN_START : GTK_ALIGN_END;
|
||||
case GTK_ALIGN_FILL:
|
||||
case GTK_ALIGN_CENTER:
|
||||
case GTK_ALIGN_BASELINE:
|
||||
default:
|
||||
return align;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
blur_overlay_child_update_style_classes (BlurOverlay *overlay,
|
||||
GtkWidget *child,
|
||||
GtkAllocation *child_allocation)
|
||||
{
|
||||
int width, height;
|
||||
GtkAlign valign, halign;
|
||||
gboolean is_left, is_right, is_top, is_bottom;
|
||||
gboolean has_left, has_right, has_top, has_bottom;
|
||||
GtkStyleContext *context;
|
||||
|
||||
context = gtk_widget_get_style_context (child);
|
||||
has_left = gtk_style_context_has_class (context, GTK_STYLE_CLASS_LEFT);
|
||||
has_right = gtk_style_context_has_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||
has_top = gtk_style_context_has_class (context, GTK_STYLE_CLASS_TOP);
|
||||
has_bottom = gtk_style_context_has_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||
|
||||
is_left = is_right = is_top = is_bottom = FALSE;
|
||||
|
||||
width = gtk_widget_get_width (GTK_WIDGET (overlay));
|
||||
height = gtk_widget_get_height (GTK_WIDGET (overlay));
|
||||
|
||||
halign = effective_align (gtk_widget_get_halign (child),
|
||||
gtk_widget_get_direction (child));
|
||||
|
||||
if (halign == GTK_ALIGN_START)
|
||||
is_left = (child_allocation->x == 0);
|
||||
else if (halign == GTK_ALIGN_END)
|
||||
is_right = (child_allocation->x + child_allocation->width == width);
|
||||
|
||||
valign = gtk_widget_get_valign (child);
|
||||
|
||||
if (valign == GTK_ALIGN_START)
|
||||
is_top = (child_allocation->y == 0);
|
||||
else if (valign == GTK_ALIGN_END)
|
||||
is_bottom = (child_allocation->y + child_allocation->height == height);
|
||||
|
||||
if (has_left && !is_left)
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_LEFT);
|
||||
else if (!has_left && is_left)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
|
||||
|
||||
if (has_right && !is_right)
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||
else if (!has_right && is_right)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||
|
||||
if (has_top && !is_top)
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_TOP);
|
||||
else if (!has_top && is_top)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP);
|
||||
|
||||
if (has_bottom && !is_bottom)
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||
else if (!has_bottom && is_bottom)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||
}
|
||||
|
||||
static void
|
||||
blur_overlay_child_allocate (BlurOverlay *overlay,
|
||||
GtkWidget *widget,
|
||||
BlurOverlayChild *child)
|
||||
{
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
if (!gtk_widget_get_visible (widget))
|
||||
return;
|
||||
|
||||
blur_overlay_compute_child_allocation (overlay, widget, child, &child_allocation);
|
||||
|
||||
blur_overlay_child_update_style_classes (overlay, widget, &child_allocation);
|
||||
gtk_widget_size_allocate (widget, &child_allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
blur_overlay_size_allocate (GtkWidget *widget,
|
||||
int width,
|
||||
int height,
|
||||
int baseline)
|
||||
{
|
||||
BlurOverlay *overlay = BLUR_OVERLAY (widget);
|
||||
GtkWidget *child;
|
||||
GtkWidget *main_widget;
|
||||
|
||||
main_widget = gtk_bin_get_child (GTK_BIN (overlay));
|
||||
if (main_widget && gtk_widget_get_visible (main_widget))
|
||||
gtk_widget_size_allocate (main_widget,
|
||||
&(GtkAllocation) {
|
||||
0, 0,
|
||||
width, height
|
||||
}, -1);
|
||||
|
||||
for (child = gtk_widget_get_first_child (widget);
|
||||
child != NULL;
|
||||
child = gtk_widget_get_next_sibling (child))
|
||||
{
|
||||
if (child != main_widget)
|
||||
{
|
||||
BlurOverlayChild *child_data = blur_overlay_get_overlay_child (child);
|
||||
blur_overlay_child_allocate (overlay, child, child_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
blur_overlay_get_child_position (BlurOverlay *overlay,
|
||||
GtkWidget *widget,
|
||||
GtkAllocation *alloc)
|
||||
{
|
||||
GtkRequisition min, req;
|
||||
GtkAlign halign;
|
||||
GtkTextDirection direction;
|
||||
int width, height;
|
||||
|
||||
gtk_widget_get_preferred_size (widget, &min, &req);
|
||||
width = gtk_widget_get_width (GTK_WIDGET (overlay));
|
||||
height = gtk_widget_get_height (GTK_WIDGET (overlay));
|
||||
|
||||
alloc->x = 0;
|
||||
alloc->width = MAX (min.width, MIN (width, req.width));
|
||||
|
||||
direction = gtk_widget_get_direction (widget);
|
||||
|
||||
halign = gtk_widget_get_halign (widget);
|
||||
switch (effective_align (halign, direction))
|
||||
{
|
||||
case GTK_ALIGN_START:
|
||||
/* nothing to do */
|
||||
break;
|
||||
case GTK_ALIGN_FILL:
|
||||
alloc->width = MAX (alloc->width, width);
|
||||
break;
|
||||
case GTK_ALIGN_CENTER:
|
||||
alloc->x += width / 2 - alloc->width / 2;
|
||||
break;
|
||||
case GTK_ALIGN_END:
|
||||
alloc->x += width - alloc->width;
|
||||
break;
|
||||
case GTK_ALIGN_BASELINE:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
alloc->y = 0;
|
||||
alloc->height = MAX (min.height, MIN (height, req.height));
|
||||
|
||||
switch (gtk_widget_get_valign (widget))
|
||||
{
|
||||
case GTK_ALIGN_START:
|
||||
/* nothing to do */
|
||||
break;
|
||||
case GTK_ALIGN_FILL:
|
||||
alloc->height = MAX (alloc->height, height);
|
||||
break;
|
||||
case GTK_ALIGN_CENTER:
|
||||
alloc->y += height / 2 - alloc->height / 2;
|
||||
break;
|
||||
case GTK_ALIGN_END:
|
||||
alloc->y += height - alloc->height;
|
||||
break;
|
||||
case GTK_ALIGN_BASELINE:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
blur_overlay_add (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
BlurOverlay *overlay = BLUR_OVERLAY (container);
|
||||
gtk_widget_insert_after (widget, GTK_WIDGET (container), NULL);
|
||||
overlay->main_widget = widget;
|
||||
}
|
||||
|
||||
static void
|
||||
blur_overlay_remove (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
BlurOverlay *overlay = BLUR_OVERLAY (container);
|
||||
gtk_widget_unparent (widget);
|
||||
if (overlay->main_widget == widget)
|
||||
overlay->main_widget = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
blur_overlay_forall (GtkContainer *overlay,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkWidget *child;
|
||||
|
||||
child = gtk_widget_get_first_child (GTK_WIDGET (overlay));
|
||||
while (child != NULL)
|
||||
{
|
||||
GtkWidget *next = gtk_widget_get_next_sibling (child);
|
||||
|
||||
(* callback) (child, callback_data);
|
||||
|
||||
child = next;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
blur_overlay_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot)
|
||||
{
|
||||
GtkWidget *main_widget;
|
||||
GskRenderNode *main_widget_node = NULL;
|
||||
GtkWidget *child;
|
||||
GtkAllocation main_alloc;
|
||||
cairo_region_t *clip = NULL;
|
||||
int i;
|
||||
|
||||
main_widget = BLUR_OVERLAY (widget)->main_widget;
|
||||
gtk_widget_get_allocation (widget, &main_alloc);
|
||||
|
||||
for (child = gtk_widget_get_first_child (widget);
|
||||
child != NULL;
|
||||
child = gtk_widget_get_next_sibling (child))
|
||||
{
|
||||
BlurOverlayChild *child_info = blur_overlay_get_overlay_child (child);
|
||||
double blur = 0;
|
||||
if (child_info)
|
||||
blur = child_info->blur;
|
||||
|
||||
if (blur > 0)
|
||||
{
|
||||
GtkAllocation alloc;
|
||||
graphene_rect_t bounds;
|
||||
|
||||
if (main_widget_node == NULL)
|
||||
{
|
||||
GtkSnapshot *child_snapshot;
|
||||
|
||||
child_snapshot = gtk_snapshot_new ();
|
||||
gtk_widget_snapshot_child (widget, main_widget, child_snapshot);
|
||||
main_widget_node = gtk_snapshot_free_to_node (child_snapshot);
|
||||
}
|
||||
|
||||
gtk_widget_get_allocation (child, &alloc);
|
||||
graphene_rect_init (&bounds, alloc.x, alloc.y, alloc.width, alloc.height);
|
||||
gtk_snapshot_push_blur (snapshot, blur);
|
||||
gtk_snapshot_push_clip (snapshot, &bounds);
|
||||
gtk_snapshot_append_node (snapshot, main_widget_node);
|
||||
gtk_snapshot_pop (snapshot);
|
||||
gtk_snapshot_pop (snapshot);
|
||||
|
||||
if (clip == NULL)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
rect.x = rect.y = 0;
|
||||
rect.width = main_alloc.width;
|
||||
rect.height = main_alloc.height;
|
||||
clip = cairo_region_create_rectangle (&rect);
|
||||
}
|
||||
cairo_region_subtract_rectangle (clip, (cairo_rectangle_int_t *)&alloc);
|
||||
}
|
||||
}
|
||||
|
||||
if (clip == NULL)
|
||||
{
|
||||
for (child = gtk_widget_get_first_child (widget);
|
||||
child != NULL;
|
||||
child = gtk_widget_get_next_sibling (child))
|
||||
{
|
||||
gtk_widget_snapshot_child (widget, child, snapshot);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < cairo_region_num_rectangles (clip); i++)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
graphene_rect_t bounds;
|
||||
|
||||
cairo_region_get_rectangle (clip, i, &rect);
|
||||
graphene_rect_init (&bounds, rect.x, rect.y, rect.width, rect.height);
|
||||
gtk_snapshot_push_clip (snapshot, &bounds);
|
||||
gtk_snapshot_append_node (snapshot, main_widget_node);
|
||||
gtk_snapshot_pop (snapshot);
|
||||
}
|
||||
|
||||
cairo_region_destroy (clip);
|
||||
|
||||
for (child = gtk_widget_get_first_child (widget);
|
||||
child != NULL;
|
||||
child = gtk_widget_get_next_sibling (child))
|
||||
{
|
||||
if (child != main_widget)
|
||||
gtk_widget_snapshot_child (widget, child, snapshot);
|
||||
}
|
||||
|
||||
gsk_render_node_unref (main_widget_node);
|
||||
}
|
||||
|
||||
static void
|
||||
blur_overlay_class_init (BlurOverlayClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
|
||||
|
||||
widget_class->measure = blur_overlay_measure;
|
||||
widget_class->size_allocate = blur_overlay_size_allocate;
|
||||
widget_class->snapshot = blur_overlay_snapshot;
|
||||
|
||||
container_class->add = blur_overlay_add;
|
||||
container_class->remove = blur_overlay_remove;
|
||||
container_class->forall = blur_overlay_forall;
|
||||
|
||||
klass->get_child_position = blur_overlay_get_child_position;
|
||||
|
||||
signals[GET_CHILD_POSITION] =
|
||||
g_signal_new ("get-child-position",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (BlurOverlayClass, get_child_position),
|
||||
g_signal_accumulator_true_handled, NULL,
|
||||
NULL,
|
||||
G_TYPE_BOOLEAN, 2,
|
||||
GTK_TYPE_WIDGET,
|
||||
GDK_TYPE_RECTANGLE | G_SIGNAL_TYPE_STATIC_SCOPE);
|
||||
|
||||
child_data_quark = g_quark_from_static_string ("gtk-overlay-child-data");
|
||||
|
||||
gtk_widget_class_set_css_name (widget_class, "overlay");
|
||||
}
|
||||
|
||||
static void
|
||||
blur_overlay_init (BlurOverlay *overlay)
|
||||
{
|
||||
gtk_widget_set_has_surface (GTK_WIDGET (overlay), FALSE);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
blur_overlay_new (void)
|
||||
{
|
||||
return g_object_new (BLUR_TYPE_OVERLAY, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
blur_overlay_add_overlay (BlurOverlay *overlay,
|
||||
GtkWidget *widget,
|
||||
double blur)
|
||||
{
|
||||
BlurOverlayChild *child = g_new0 (BlurOverlayChild, 1);
|
||||
|
||||
gtk_widget_insert_before (widget, GTK_WIDGET (overlay), NULL);
|
||||
|
||||
child->blur = blur;
|
||||
|
||||
blur_overlay_set_overlay_child (widget, child);
|
||||
}
|
65
demos/gtk-demo/bluroverlay.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* bluroverlay.h
|
||||
* This file is part of gtk
|
||||
*
|
||||
* Copyright (C) 2011 - Ignacio Casal Quinteiro, Mike Krüger
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __BLUR_OVERLAY_H__
|
||||
#define __BLUR_OVERLAY_H__
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define BLUR_TYPE_OVERLAY (blur_overlay_get_type ())
|
||||
#define BLUR_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BLUR_TYPE_OVERLAY, BlurOverlay))
|
||||
#define BLUR_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BLUR_TYPE_OVERLAY, BlurOverlayClass))
|
||||
#define BLUR_IS_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BLUR_TYPE_OVERLAY))
|
||||
#define BLUR_IS_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BLUR_TYPE_OVERLAY))
|
||||
#define BLUR_OVERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BLUR_TYPE_OVERLAY, BlurOverlayClass))
|
||||
|
||||
typedef struct _BlurOverlay BlurOverlay;
|
||||
typedef struct _BlurOverlayClass BlurOverlayClass;
|
||||
|
||||
struct _BlurOverlay
|
||||
{
|
||||
GtkBin parent_instance;
|
||||
|
||||
GtkWidget *main_widget;
|
||||
};
|
||||
|
||||
struct _BlurOverlayClass
|
||||
{
|
||||
GtkBinClass parent_class;
|
||||
|
||||
gboolean (*get_child_position) (BlurOverlay *overlay,
|
||||
GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
};
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType blur_overlay_get_type (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkWidget *blur_overlay_new (void);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void blur_overlay_add_overlay (BlurOverlay *overlay,
|
||||
GtkWidget *widget,
|
||||
double blur);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __BLUR_OVERLAY_H__ */
|
@@ -1,127 +0,0 @@
|
||||
/* Button Boxes
|
||||
*
|
||||
* The Button Box widgets are used to arrange buttons with padding.
|
||||
*/
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *
|
||||
create_bbox (gint horizontal,
|
||||
char *title,
|
||||
gint spacing,
|
||||
gint layout)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *button;
|
||||
|
||||
frame = gtk_frame_new (title);
|
||||
|
||||
if (horizontal)
|
||||
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
else
|
||||
bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
g_object_set (bbox, "margin", 5, NULL);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), bbox);
|
||||
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
|
||||
gtk_box_set_spacing (GTK_BOX (bbox), spacing);
|
||||
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
|
||||
button = gtk_button_new_with_label (_("Cancel"));
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
|
||||
button = gtk_button_new_with_label (_("Help"));
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_button_box (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *main_vbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *frame_horz;
|
||||
GtkWidget *frame_vert;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Button Boxes");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (main_vbox, "margin", 10, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
|
||||
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
|
||||
gtk_widget_set_margin_top (frame_horz, 10);
|
||||
gtk_widget_set_margin_bottom (frame_horz, 10);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
g_object_set (vbox, "margin", 10, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Center", 40, GTK_BUTTONBOX_CENTER));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Expand", 0, GTK_BUTTONBOX_EXPAND));
|
||||
|
||||
frame_vert = gtk_frame_new ("Vertical Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
g_object_set (hbox, "margin", 10, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Spread", 10, GTK_BUTTONBOX_SPREAD));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Edge", 10, GTK_BUTTONBOX_EDGE));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Start", 10, GTK_BUTTONBOX_START));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "End", 10, GTK_BUTTONBOX_END));
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Center", 10, GTK_BUTTONBOX_CENTER));
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Expand", 0, GTK_BUTTONBOX_EXPAND));
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
@@ -7,7 +7,7 @@
|
||||
* computers, as long as there is a network connection to the
|
||||
* computer where the application is running.
|
||||
*
|
||||
* Only some of the windowing systems where GTK+ runs have the
|
||||
* Only some of the windowing systems where GTK runs have the
|
||||
* concept of multiple displays. (The X Window System is the
|
||||
* main example.) Other windowing systems can only handle one
|
||||
* keyboard and mouse, and combine all monitors into
|
||||
@@ -315,7 +315,7 @@ create_frame (ChangeDisplayInfo *info,
|
||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollwin),
|
||||
GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), scrollwin);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), scrollwin);
|
||||
|
||||
*tree_view = gtk_tree_view_new ();
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (*tree_view), FALSE);
|
||||
@@ -325,7 +325,7 @@ create_frame (ChangeDisplayInfo *info,
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
|
||||
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), *button_vbox);
|
||||
|
||||
if (!info->size_group)
|
||||
info->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
@@ -365,11 +365,11 @@ create_display_frame (ChangeDisplayInfo *info)
|
||||
|
||||
button = left_align_button_new ("_Open...");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (open_display_cb), info);
|
||||
gtk_box_pack_start (GTK_BOX (button_vbox), button);
|
||||
gtk_container_add (GTK_CONTAINER (button_vbox), button);
|
||||
|
||||
button = left_align_button_new ("_Close");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (close_display_cb), info);
|
||||
gtk_box_pack_start (GTK_BOX (button_vbox), button);
|
||||
gtk_container_add (GTK_CONTAINER (button_vbox), button);
|
||||
|
||||
info->display_model = (GtkTreeModel *)gtk_list_store_new (DISPLAY_NUM_COLUMNS,
|
||||
G_TYPE_STRING,
|
||||
@@ -542,10 +542,10 @@ do_changedisplay (GtkWidget *do_widget)
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 8, NULL);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox);
|
||||
gtk_container_add (GTK_CONTAINER (content_area), vbox);
|
||||
|
||||
frame = create_display_frame (info);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
initialize_displays (info);
|
||||
|
||||
|
@@ -259,45 +259,45 @@ do_clipboard (GtkWidget *do_widget)
|
||||
|
||||
label = gtk_label_new ("\"Copy\" will copy the text\nin the entry to the clipboard");
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
g_object_set (hbox, "margin", 8, NULL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
|
||||
/* Create the first entry */
|
||||
entry = gtk_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), entry);
|
||||
|
||||
/* Create the button */
|
||||
button = gtk_button_new_with_mnemonic (_("_Copy"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (copy_button_clicked), entry);
|
||||
|
||||
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
g_object_set (hbox, "margin", 8, NULL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
|
||||
/* Create the second entry */
|
||||
entry = gtk_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), entry);
|
||||
|
||||
/* Create the button */
|
||||
button = gtk_button_new_with_mnemonic (_("_Paste"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (paste_button_clicked), entry);
|
||||
|
||||
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
g_object_set (hbox, "margin", 8, NULL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
|
||||
/* Create the first image */
|
||||
image = gtk_image_new_from_icon_name ("dialog-warning");
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/* Color Chooser
|
||||
*
|
||||
* A GtkColorChooser lets the user choose a color. There are several
|
||||
* implementations of the GtkColorChooser interface in GTK+. The
|
||||
* implementations of the GtkColorChooser interface in GTK. The
|
||||
* GtkColorChooserDialog is a prebuilt dialog containing a
|
||||
* GtkColorChooserWidget.
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ do_colorsel (GtkWidget *do_widget)
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 200);
|
||||
@@ -101,7 +101,7 @@ do_colorsel (GtkWidget *do_widget)
|
||||
gtk_widget_set_halign (button, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), button);
|
||||
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (change_color_callback), NULL);
|
||||
|
@@ -326,7 +326,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
* insensitive rows
|
||||
*/
|
||||
frame = gtk_frame_new ("Items with icons");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
@@ -367,7 +367,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
/* A combobox demonstrating trees.
|
||||
*/
|
||||
frame = gtk_frame_new ("Where are we ?");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
@@ -395,7 +395,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
|
||||
/* A GtkComboBoxEntry with validation */
|
||||
frame = gtk_frame_new ("Editable");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
@@ -413,7 +413,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
|
||||
/* A combobox with string IDs */
|
||||
frame = gtk_frame_new ("String IDs");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.94 -->
|
||||
<object class="GdkCursor" id="default_cursor">
|
||||
<property name="name">default</property>
|
||||
</object>
|
||||
|
Before Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 874 B |
Before Width: | Height: | Size: 437 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 465 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 854 B |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 41 KiB |
1
demos/gtk-demo/data/scalable/apps/org.gtk.Demo.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128" version="1.0"><defs><linearGradient id="f"><stop offset="0" stop-color="#ff7800"/><stop offset="1" stop-color="#ed333b"/></linearGradient><linearGradient id="e"><stop offset="0" stop-color="#f5c211"/><stop offset="1" stop-color="#33d17a" stop-opacity=".899"/></linearGradient><linearGradient id="d"><stop offset="0" stop-color="#c0bfbc"/><stop offset=".036" stop-color="#fafaf9"/><stop offset=".088" stop-color="#c0bfbc"/><stop offset=".399" stop-color="#d5d5d3"/><stop offset=".491" stop-color="#eaeae9"/><stop offset=".569" stop-color="#a7a5a1"/><stop offset=".966" stop-color="#a9a7a3"/><stop offset="1" stop-color="#fff"/></linearGradient><linearGradient id="a"><stop offset="0" stop-color="#d5d3cf"/><stop offset="1" stop-color="#f6f5f4"/></linearGradient><linearGradient id="b"><stop offset="0" stop-color="#d5d3cf"/><stop offset="1" stop-color="#949390"/></linearGradient><linearGradient id="c"><stop offset="0" stop-color="#9a9996"/><stop offset="1" stop-color="#77767b"/></linearGradient><linearGradient xlink:href="#d" id="g" x1="-142.049" y1="236.001" x2="-9.951" y2="236.001" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#e" id="h" cx="90.974" cy="263.479" fx="90.974" fy="263.479" r="22.703" gradientTransform="matrix(1.90297 -.05506 .0501 1.73133 -89.25 -176.863)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#f" id="i" cx="61.718" cy="270.719" fx="61.718" fy="270.719" r="22.703" gradientTransform="matrix(2.49049 0 0 2.92132 -91.99 -503.52)" gradientUnits="userSpaceOnUse"/></defs><path transform="translate(123.265 -118.118) scale(.7798)" d="M-75.74 161.438a10.997 10.997 0 0 0-5.758 1.468l-55.053 31.785a10.997 10.997 0 0 0-5.498 9.524v63.57a10.997 10.997 0 0 0 5.498 9.524l55.053 31.785a10.997 10.997 0 0 0 10.996 0l55.053-31.785a10.997 10.997 0 0 0 5.498-9.524v-63.57a10.997 10.997 0 0 0-5.498-9.524l-55.053-31.785a10.997 10.997 0 0 0-5.238-1.469z" style="marker:none" fill="url(#g)"/><path style="marker:none" d="M64.203 3.77a8.575 8.575 0 0 0-4.49 1.146l-42.93 24.786a8.575 8.575 0 0 0-4.288 7.427V86.7a8.575 8.575 0 0 0 4.287 7.426l42.93 24.786a8.575 8.575 0 0 0 8.575 0l42.93-24.786a8.575 8.575 0 0 0 4.288-7.426V37.129a8.575 8.575 0 0 0-4.287-7.427L68.288 4.916a8.575 8.575 0 0 0-4.085-1.145z" fill="#fff"/><path style="marker:none" d="M109.869 33.297L64 59.779 18.131 33.297 64 6.814z" fill="#98c1f1"/><path style="marker:none" d="M66.263 287.505l45.35-25.884.056-52.762-45.406 26.215z" fill="url(#h)" transform="translate(0 -172)"/><path d="M61.718 287.34l-45.35-25.885-.056-52.761 45.406 26.215z" style="marker:none" fill="url(#i)" transform="translate(0 -172)"/></svg>
|
After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 101 KiB |
@@ -1,29 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='gtk3-demo-symbolic.svg' height='16.000015' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.5 r10040' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
|
||||
<metadata id='metadata90'>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about=''>
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer9' inkscape:cx='-12.5126' inkscape:cy='-0.73412416' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#555753' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='true' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1375' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='0' inkscape:window-y='27' inkscape:zoom='5.6568542'>
|
||||
<inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='-182.99998px' originy='-251.99998px' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
|
||||
</sodipodi:namedview>
|
||||
<title id='title9167'>Gnome Symbolic Icon Theme</title>
|
||||
<defs id='defs7386'>
|
||||
<linearGradient id='linearGradient7212' osb:paint='solid'>
|
||||
<stop id='stop7214' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g inkscape:groupmode='layer' id='layer9' inkscape:label='apps' style='display:inline' transform='translate(-424.00018,35)'>
|
||||
|
||||
<rect height='8.0000048' id='rect7866' style='opacity:0.3;color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' transform='matrix(0.83205029,0.5547002,0,1,0,0)' width='7.2111053' x='510.78668' y='-314.33347'/>
|
||||
<rect height='8.0000086' id='rect7868' style='opacity:0.5;color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' transform='matrix(-0.86824295,0.49613928,0,1,0,0)' width='8.0622425' x='-505.61908' y='219.8575'/>
|
||||
<path inkscape:connector-curvature='0' d='m 431.53145,-28 -5.875,-3.65625 6.8125,-3.34375 6.03125,3 z' id='path7870' sodipodi:nodetypes='ccccc' style='color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new'/>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 3.3 KiB |
114
demos/gtk-demo/data/symbolic/apps/org.gtk.Demo-symbolic.svg
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="org.gtk.Demo-symbolic.svg"
|
||||
height="16.03125"
|
||||
id="svg7384"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
version="1.1"
|
||||
width="16">
|
||||
<metadata
|
||||
id="metadata90">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
inkscape:bbox-paths="true"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
inkscape:current-layer="layer9"
|
||||
inkscape:cx="0.53203442"
|
||||
inkscape:cy="9.1822592"
|
||||
gridtolerance="10"
|
||||
inkscape:guide-bbox="true"
|
||||
guidetolerance="10"
|
||||
id="namedview88"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:object-paths="false"
|
||||
objecttolerance="10"
|
||||
pagecolor="#555753"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
showborder="true"
|
||||
showgrid="false"
|
||||
showguides="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:snap-nodes="true"
|
||||
inkscape:snap-others="false"
|
||||
inkscape:snap-to-guides="true"
|
||||
inkscape:window-height="1375"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:zoom="1">
|
||||
<inkscape:grid
|
||||
empspacing="2"
|
||||
enabled="true"
|
||||
id="grid4866"
|
||||
originx="-203"
|
||||
originy="-251.96875"
|
||||
snapvisiblegridlinesonly="true"
|
||||
spacingx="1"
|
||||
spacingy="1"
|
||||
type="xygrid"
|
||||
visible="true" />
|
||||
</sodipodi:namedview>
|
||||
<title
|
||||
id="title9167">Gnome Symbolic Icon Theme</title>
|
||||
<defs
|
||||
id="defs7386">
|
||||
<linearGradient
|
||||
id="linearGradient7212"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
id="stop7214"
|
||||
offset="0"
|
||||
style="stop-color:#000000;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer9"
|
||||
inkscape:label="apps"
|
||||
style="display:inline"
|
||||
transform="translate(-444.0002,35)">
|
||||
<path
|
||||
style="display:inline;opacity:0.3;vector-effect:none;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new"
|
||||
d="m 457.97232,-31.569556 -5.96212,3.44224 -5.96215,-3.44224 v 0 l 5.96215,-3.44226 z"
|
||||
id="path870-6"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path886-9"
|
||||
d="m 450.98519,-19.648086 -5.99273,-3.42041 -0.007,-6.97219 v 0 l 6.00018,3.4642 z"
|
||||
style="display:inline;opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" />
|
||||
<path
|
||||
style="display:inline;opacity:0.60100002;vector-effect:none;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new"
|
||||
d="m 452.98577,-19.648086 5.99273,-3.42041 0.007,-6.97219 v 0 l -6.00018,3.4642 z"
|
||||
id="path931"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
@@ -143,7 +143,6 @@
|
||||
<file>application_demo.c</file>
|
||||
<file>assistant.c</file>
|
||||
<file>builder.c</file>
|
||||
<file>button_box.c</file>
|
||||
<file>changedisplay.c</file>
|
||||
<file>clipboard.c</file>
|
||||
<file>colorsel.c</file>
|
||||
@@ -248,6 +247,7 @@
|
||||
</gresource>
|
||||
<gresource prefix="/transparent">
|
||||
<file>portland-rose.jpg</file>
|
||||
<file>bluroverlay.c</file>
|
||||
</gresource>
|
||||
<gresource prefix="/markup">
|
||||
<file>markup.txt</file>
|
||||
@@ -261,4 +261,23 @@
|
||||
<gresource prefix="/dnd">
|
||||
<file>dnd.css</file>
|
||||
</gresource>
|
||||
<gresource prefix="/org/gtk/Demo">
|
||||
<file>icons/16x16/actions/application-exit.png</file>
|
||||
<file>icons/16x16/actions/document-new.png</file>
|
||||
<file>icons/16x16/actions/document-open.png</file>
|
||||
<file>icons/16x16/actions/document-save.png</file>
|
||||
<file>icons/16x16/actions/edit-copy.png</file>
|
||||
<file>icons/16x16/actions/edit-cut.png</file>
|
||||
<file>icons/16x16/actions/edit-paste.png</file>
|
||||
<file>icons/16x16/actions/process-stop.png</file>
|
||||
<file>icons/16x16/actions/go-home.png</file>
|
||||
<file>icons/16x16/actions/go-up.png</file>
|
||||
<file>icons/16x16/actions/mail-send-receive-symbolic.symbolic.png</file>
|
||||
<file>icons/16x16/actions/view-fullscreen-symbolic.symbolic.png</file>
|
||||
<file>icons/16x16/actions/document-edit-symbolic.symbolic.png</file>
|
||||
<file>icons/16x16/emotes/face-cool.png</file>
|
||||
<file>icons/16x16/emotes/face-laugh-symbolic.symbolic.png</file>
|
||||
<file>icons/16x16/status/battery-caution-charging-symbolic.symbolic.png</file>
|
||||
<file>icons/16x16/categories/applications-other.png</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
@@ -1,5 +1,3 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!--*- mode: xml -*-->
|
||||
<interface>
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
<columns>
|
||||
@@ -76,8 +74,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem">
|
||||
</object>
|
||||
<object class="GtkSeparatorMenuItem"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="quit_item">
|
||||
@@ -174,8 +171,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem">
|
||||
</object>
|
||||
<object class="GtkSeparatorToolItem"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
@@ -199,9 +195,6 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
@@ -255,16 +248,9 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStatusbar" id="statusbar1">
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
<object class="GtkStatusbar" id="statusbar1"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@@ -56,16 +56,16 @@ interactive_dialog_clicked (GtkButton *button,
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), hbox);
|
||||
gtk_container_add (GTK_CONTAINER (content_area), hbox);
|
||||
|
||||
image = gtk_image_new_from_icon_name ("dialog-question");
|
||||
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), image);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 4);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), table);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), table);
|
||||
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
||||
gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
|
||||
local_entry1 = gtk_entry_new ();
|
||||
@@ -123,29 +123,29 @@ do_dialog (GtkWidget *do_widget)
|
||||
|
||||
/* Standard message dialog */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
button = gtk_button_new_with_mnemonic ("_Message Dialog");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (message_dialog_clicked), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
|
||||
gtk_container_add (GTK_CONTAINER (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
|
||||
|
||||
/* Interactive dialog*/
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
button = gtk_button_new_with_mnemonic ("_Interactive Dialog");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (interactive_dialog_clicked), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox2);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), vbox2);
|
||||
gtk_container_add (GTK_CONTAINER (vbox2), button);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 4);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), table);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), table);
|
||||
|
||||
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
||||
gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
|
||||
|
@@ -352,7 +352,7 @@ do_dnd (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
fixed = gtk_fixed_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), fixed);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), fixed);
|
||||
gtk_widget_set_hexpand (fixed, TRUE);
|
||||
gtk_widget_set_vexpand (fixed, TRUE);
|
||||
|
||||
|
@@ -208,12 +208,12 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Checkerboard pattern</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_vexpand (frame, TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 100);
|
||||
@@ -228,12 +228,12 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Scribble area</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_widget_set_vexpand (frame, TRUE);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 100);
|
||||
|
@@ -356,7 +356,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_container_add (GTK_CONTAINER (vbox),
|
||||
gtk_label_new ("Shopping list (you can edit the cells!)"));
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
@@ -365,7 +365,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), sw);
|
||||
|
||||
/* create models */
|
||||
items_model = create_items_model ();
|
||||
@@ -387,17 +387,17 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
/* some buttons */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
|
||||
button = gtk_button_new_with_label ("Add item");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (add_item), treeview);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||
|
||||
button = gtk_button_new_with_label ("Remove item");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (remove_item), treeview);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 320, 200);
|
||||
}
|
||||
|
@@ -34,19 +34,19 @@ do_entry_buffer (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"Entries share a buffer. Typing in one is reflected in the other.");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
/* Create a buffer */
|
||||
buffer = gtk_entry_buffer_new (NULL, 0);
|
||||
|
||||
/* Create our first entry */
|
||||
entry = gtk_entry_new_with_buffer (buffer);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), entry);
|
||||
|
||||
/* Create the second entry */
|
||||
entry = gtk_entry_new_with_buffer (buffer);
|
||||
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), entry);
|
||||
|
||||
g_object_unref (buffer);
|
||||
}
|
||||
|
@@ -60,11 +60,11 @@ do_entry_completion (GtkWidget *do_widget)
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label), "Completion demo, try writing <b>total</b> or <b>gnome</b> for example.");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
/* Create our entry */
|
||||
entry = gtk_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), entry);
|
||||
|
||||
/* Create the completion object */
|
||||
completion = gtk_entry_completion_new ();
|
||||
|
@@ -73,7 +73,7 @@ do_expander (GtkWidget *do_widget)
|
||||
"resize the window. Do it already !", -1);
|
||||
gtk_container_add (GTK_CONTAINER (sw), tv);
|
||||
gtk_container_add (GTK_CONTAINER (expander), sw);
|
||||
gtk_box_pack_end (GTK_BOX (area), expander);
|
||||
gtk_container_add (GTK_CONTAINER (area), expander);
|
||||
g_signal_connect (expander, "notify::expanded",
|
||||
G_CALLBACK (expander_cb), window);
|
||||
|
||||
|
@@ -1,12 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.18.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.16"/>
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
<columns>
|
||||
<!-- column-name width -->
|
||||
<column type="gint"/>
|
||||
<!-- column-name height -->
|
||||
<column type="gint"/>
|
||||
</columns>
|
||||
<data>
|
||||
@@ -43,7 +39,7 @@
|
||||
<property name="label" translatable="yes">Original</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
<accessibility>
|
||||
<relation type="label-for" target="treeview1"/>
|
||||
@@ -149,7 +145,7 @@
|
||||
<property name="label" translatable="yes">Computed Columns</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
<accessibility>
|
||||
<relation type="label-for" target="treeview2"/>
|
||||
@@ -165,7 +161,7 @@
|
||||
<property name="label" translatable="yes">Filtered</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
<accessibility>
|
||||
<relation type="label-for" target="treeview3"/>
|
||||
|
@@ -264,7 +264,10 @@ do_fishbowl (GtkWidget *do_widget)
|
||||
NULL);
|
||||
gtk_builder_connect_signals (builder, NULL);
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
bowl = GTK_WIDGET (gtk_builder_get_object (builder, "bowl"));
|
||||
selected_widget_type = -1;
|
||||
set_widget_type (GTK_FISHBOWL (bowl), 0);
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
@@ -279,6 +282,5 @@ do_fishbowl (GtkWidget *do_widget)
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
|
||||
return window;
|
||||
}
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.6 -->
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="title" translatable="yes">Fishbowl</property>
|
||||
<child type="titlebar">
|
||||
@@ -69,8 +67,8 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="changes_prevent">
|
||||
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean">True</property>
|
||||
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean">False</property>
|
||||
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean">1</property>
|
||||
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean">0</property>
|
||||
<property name="icon-name">changes-prevent</property>
|
||||
<property name="relief">none</property>
|
||||
</object>
|
||||
@@ -84,7 +82,7 @@
|
||||
<object class="GtkFishbowl" id="bowl">
|
||||
<property name="visible">True</property>
|
||||
<property name="animating">True</property>
|
||||
<property name="benchmark" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean">True</property>
|
||||
<property name="benchmark" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@@ -1,5 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.18.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<object class="GtkWindow" id="window">
|
||||
@@ -53,7 +51,7 @@
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Font Features</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
@@ -84,7 +82,7 @@
|
||||
<property name="label" translatable="yes">Font Variations</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
@@ -115,31 +113,35 @@
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<child>
|
||||
<object class="GtkLabel" id="label">
|
||||
<property name="wrap">1</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="selectable">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">label</property>
|
||||
</packing>
|
||||
<property name="child">
|
||||
<object class="GtkLabel" id="label">
|
||||
<property name="wrap">1</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="selectable">1</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="entry">
|
||||
<property name="text">Grumpy wizards make toxic brew for the evil Queen and Jack. A quick movement of the enemy will jeopardize six gunboats. The job of waxing linoleum frequently peeves chintzy kids. My girl wove six dozen plaid jackets before she quit. Twelve ziggurats quickly jumped a finch box.
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">entry</property>
|
||||
<property name="child">
|
||||
<object class="GtkEntry" id="entry">
|
||||
<property name="text">Grumpy wizards make toxic brew for the evil Queen and Jack. A quick movement of the enemy will jeopardize six gunboats. The job of waxing linoleum frequently peeves chintzy kids. My girl wove six dozen plaid jackets before she quit. Twelve ziggurats quickly jumped a finch box.
|
||||
|
||||
Разъяренный чтец эгоистично бьёт пятью жердями шустрого фехтовальщика. Наш банк вчера же выплатил Ф.Я. Эйхгольду комиссию за ценные вещи. Эх, чужак, общий съём цен шляп (юфть) – вдрызг! В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!
|
||||
|
||||
Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός</property>
|
||||
<signal name="activate" handler="stop_edit"/>
|
||||
<property name="valign">start</property>
|
||||
<property name="width-chars">50</property>
|
||||
<signal name="activate" handler="stop_edit"/>
|
||||
<property name="valign">start</property>
|
||||
<property name="width-chars">50</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">entry</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/* Foreign drawing
|
||||
*
|
||||
* Many applications can't use GTK+ widgets, for a variety of reasons,
|
||||
* Many applications can't use GTK widgets, for a variety of reasons,
|
||||
* but still want their user interface to appear integrated with the
|
||||
* rest of the desktop, and follow GTK+ themes. This demo shows how to
|
||||
* rest of the desktop, and follow GTK themes. This demo shows how to
|
||||
* use GtkStyleContext and the gtk_render_ APIs to achieve this.
|
||||
*
|
||||
* Note that this is a very simple, non-interactive example.
|
||||
|
BIN
demos/gtk-demo/icons/16x16/actions/application-exit.png
Normal file
After Width: | Height: | Size: 659 B |
After Width: | Height: | Size: 223 B |
BIN
demos/gtk-demo/icons/16x16/actions/document-new.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
demos/gtk-demo/icons/16x16/actions/document-open.png
Normal file
After Width: | Height: | Size: 420 B |
BIN
demos/gtk-demo/icons/16x16/actions/document-save.png
Normal file
After Width: | Height: | Size: 459 B |
BIN
demos/gtk-demo/icons/16x16/actions/edit-copy.png
Normal file
After Width: | Height: | Size: 401 B |
BIN
demos/gtk-demo/icons/16x16/actions/edit-cut.png
Normal file
After Width: | Height: | Size: 781 B |
BIN
demos/gtk-demo/icons/16x16/actions/edit-paste.png
Normal file
After Width: | Height: | Size: 582 B |
BIN
demos/gtk-demo/icons/16x16/actions/go-home.png
Normal file
After Width: | Height: | Size: 582 B |
BIN
demos/gtk-demo/icons/16x16/actions/go-up.png
Normal file
After Width: | Height: | Size: 336 B |
After Width: | Height: | Size: 185 B |
BIN
demos/gtk-demo/icons/16x16/actions/process-stop.png
Normal file
After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 208 B |
BIN
demos/gtk-demo/icons/16x16/categories/applications-other.png
Normal file
After Width: | Height: | Size: 682 B |
BIN
demos/gtk-demo/icons/16x16/emotes/face-cool.png
Normal file
After Width: | Height: | Size: 845 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 239 B |
@@ -266,7 +266,7 @@ do_iconview (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
tool_bar = gtk_toolbar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), tool_bar);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), tool_bar);
|
||||
|
||||
up_button = gtk_tool_button_new (NULL, NULL);
|
||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (up_button), _("_Up"));
|
||||
@@ -292,7 +292,7 @@ do_iconview (GtkWidget *do_widget)
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), sw);
|
||||
|
||||
/* Create the store and fill it with the contents of '/' */
|
||||
parent = g_strdup ("/");
|
||||
|
@@ -262,7 +262,7 @@ start_progressive_loading (GtkWidget *picture)
|
||||
* pauses in the reading process.
|
||||
*/
|
||||
load_timeout = g_timeout_add (150, progressive_timeout, picture);
|
||||
g_source_set_name_by_id (load_timeout, "[gtk+] progressive_timeout");
|
||||
g_source_set_name_by_id (load_timeout, "[gtk] progressive_timeout");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -354,13 +354,13 @@ do_images (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Image loaded from a file</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
image = gtk_image_new_from_icon_name ("gtk3-demo");
|
||||
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
||||
@@ -373,13 +373,13 @@ do_images (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Animation loaded from a file</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
picture = gtk_picture_new_for_resource ("/images/floppybuddy.gif");
|
||||
|
||||
@@ -390,13 +390,13 @@ do_images (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Symbolic themed icon</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
gicon = g_themed_icon_new_with_default_fallbacks ("battery-caution-charging-symbolic");
|
||||
image = gtk_image_new_from_gicon (gicon);
|
||||
@@ -412,13 +412,13 @@ do_images (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Progressive image loading</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
/* Create an empty image for now; the progressive loader
|
||||
* will create the pixbuf and fill it in.
|
||||
@@ -435,13 +435,13 @@ do_images (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Displaying video</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
video = gtk_video_new_for_resource ("/images/gtk-logo.webm");
|
||||
gtk_media_stream_set_loop (gtk_video_get_media_stream (GTK_VIDEO (video)), TRUE);
|
||||
@@ -454,7 +454,7 @@ do_images (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>GtkWidgetPaintable</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
paintable = gtk_widget_paintable_new (do_widget);
|
||||
picture = gtk_picture_new_for_paintable (paintable);
|
||||
@@ -464,7 +464,7 @@ do_images (GtkWidget *do_widget)
|
||||
|
||||
/* Sensitivity control */
|
||||
button = gtk_toggle_button_new_with_mnemonic ("_Insensitive");
|
||||
gtk_box_pack_start (GTK_BOX (base_vbox), button);
|
||||
gtk_container_add (GTK_CONTAINER (base_vbox), button);
|
||||
|
||||
g_signal_connect (button, "toggled",
|
||||
G_CALLBACK (toggle_sensitivity_callback),
|
||||
|
@@ -65,24 +65,24 @@ do_infobar (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), bar);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_INFO);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_INFO");
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("Message");
|
||||
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||
gtk_container_add (GTK_CONTAINER (actions), button);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), bar);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_WARNING);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_WARNING");
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("Warning");
|
||||
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||
@@ -91,24 +91,24 @@ do_infobar (GtkWidget *do_widget)
|
||||
bar = gtk_info_bar_new_with_buttons (_("_OK"), GTK_RESPONSE_OK, NULL);
|
||||
gtk_info_bar_set_show_close_button (GTK_INFO_BAR (bar), TRUE);
|
||||
g_signal_connect (bar, "response", G_CALLBACK (on_bar_response), window);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), bar);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_QUESTION);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_QUESTION");
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("Question");
|
||||
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||
gtk_container_add (GTK_CONTAINER (actions), button);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), bar);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_ERROR);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_ERROR");
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("Error");
|
||||
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||
@@ -116,12 +116,12 @@ do_infobar (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (actions), button);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), bar);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_OTHER);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_OTHER");
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("Other");
|
||||
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||
@@ -130,7 +130,7 @@ do_infobar (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Info bars");
|
||||
gtk_widget_set_margin_top (frame, 8);
|
||||
gtk_widget_set_margin_bottom (frame, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox2, "margin", 8, NULL);
|
||||
@@ -138,9 +138,9 @@ do_infobar (GtkWidget *do_widget)
|
||||
|
||||
/* Standard message dialog */
|
||||
label = gtk_label_new ("An example of different info bars");
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox2), label);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), actions);
|
||||
gtk_container_add (GTK_CONTAINER (vbox2), actions);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -268,7 +268,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
@@ -276,7 +276,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), sw);
|
||||
|
||||
/* create tree model */
|
||||
model = create_model ();
|
||||
|
@@ -361,12 +361,12 @@ do_listbox (GtkWidget *do_widget)
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
label = gtk_label_new ("Messages from Gtk+ and friends");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
label = gtk_label_new ("Messages from GTK and friends");
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), scrolled);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), scrolled);
|
||||
listbox = gtk_list_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (scrolled), listbox);
|
||||
|
||||
|
@@ -1,7 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="gtk40">
|
||||
<!-- interface-requires gtk+ 3.10 -->
|
||||
<!-- interface-requires gtkdemo 3.10 -->
|
||||
<object class="GtkMenu" id="menu1">
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem1">
|
||||
@@ -53,7 +50,7 @@
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label" translatable="0">Username</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
@@ -67,9 +64,6 @@
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="short_time_label">
|
||||
@@ -79,10 +73,6 @@
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -118,9 +108,6 @@
|
||||
<object class="GtkLabel" id="label4">
|
||||
<property name="label" translatable="yes">Resent by</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLinkButton" id="resent_by_button">
|
||||
@@ -130,9 +117,6 @@
|
||||
<property name="relief">none</property>
|
||||
<property name="uri">http://www.gtk.org</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -172,9 +156,6 @@
|
||||
<property name="relief">none</property>
|
||||
<signal name="clicked" handler="reshare_clicked" swapped="yes"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="favorite-buttton">
|
||||
@@ -184,9 +165,6 @@
|
||||
<property name="relief">none</property>
|
||||
<signal name="clicked" handler="favorite_clicked" swapped="yes"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="more-button">
|
||||
@@ -200,14 +178,8 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -250,14 +222,8 @@ FAVORITES</property>
|
||||
</child>
|
||||
<child type="label_item"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box6">
|
||||
@@ -279,14 +245,8 @@ FAVORITES</property>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@@ -42,24 +42,24 @@ activate_about (GSimpleAction *action,
|
||||
{
|
||||
GtkApplication *app = user_data;
|
||||
const gchar *authors[] = {
|
||||
"The GTK+ Team",
|
||||
"The GTK Team",
|
||||
NULL
|
||||
};
|
||||
|
||||
gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
|
||||
"program-name", "GTK+ Demo",
|
||||
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
|
||||
"program-name", "GTK Demo",
|
||||
"version", g_strdup_printf ("%s,\nRunning against GTK %d.%d.%d",
|
||||
PACKAGE_VERSION,
|
||||
gtk_get_major_version (),
|
||||
gtk_get_minor_version (),
|
||||
gtk_get_micro_version ()),
|
||||
"copyright", "(C) 1997-2013 The GTK+ Team",
|
||||
"copyright", "(C) 1997-2013 The GTK Team",
|
||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK+ widgets",
|
||||
"comments", "Program to demonstrate GTK widgets",
|
||||
"authors", authors,
|
||||
"logo-icon-name", "gtk3-demo",
|
||||
"title", "About GTK+ Demo",
|
||||
"logo-icon-name", "org.gtk.Demo",
|
||||
"title", "About GTK Demo",
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -667,10 +667,9 @@ add_data_tab (const gchar *demoname)
|
||||
label = gtk_label_new (resources[i]);
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
|
||||
gtk_container_child_set (GTK_CONTAINER (notebook),
|
||||
widget,
|
||||
"tab-expand", TRUE,
|
||||
NULL);
|
||||
g_object_set (gtk_notebook_get_page (GTK_NOTEBOOK (notebook), widget),
|
||||
"tab-expand", TRUE,
|
||||
NULL);
|
||||
|
||||
g_free (resource_name);
|
||||
}
|
||||
|
@@ -1,25 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.10 -->
|
||||
<object class="GtkTreeStore" id="treestore">
|
||||
<columns>
|
||||
<!-- column-name NAME -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name TITLE -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name FILENAME -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name FUNC -->
|
||||
<column type="gpointer"/>
|
||||
<!-- column-name STYLE -->
|
||||
<column type="gint"/>
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="window">
|
||||
<style><class name="devel"/></style>
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="default-width">800</property>
|
||||
<property name="default-height">600</property>
|
||||
<property name="title">GTK+ Demo</property>
|
||||
<property name="title">GTK Demo</property>
|
||||
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="headerbar">
|
||||
@@ -91,70 +86,63 @@
|
||||
<property name="show-border">0</property>
|
||||
<property name="expand">1</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="can-focus">1</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="info-textview">
|
||||
<object class="GtkNotebookPage">
|
||||
<property name="tab-expand">1</property>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="left-margin">20</property>
|
||||
<property name="right-margin">20</property>
|
||||
<property name="top-margin">20</property>
|
||||
<property name="bottom-margin">20</property>
|
||||
<property name="pixels-above-lines">2</property>
|
||||
<property name="pixels-below-lines">2</property>
|
||||
<property name="editable">0</property>
|
||||
<property name="wrap-mode">word</property>
|
||||
<property name="cursor-visible">0</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="info-textview">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="left-margin">20</property>
|
||||
<property name="right-margin">20</property>
|
||||
<property name="top-margin">20</property>
|
||||
<property name="bottom-margin">20</property>
|
||||
<property name="pixels-above-lines">2</property>
|
||||
<property name="pixels-below-lines">2</property>
|
||||
<property name="editable">0</property>
|
||||
<property name="wrap-mode">word</property>
|
||||
<property name="cursor-visible">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
<property name="tab">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">_Info</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab-expand">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">_Info</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab-expand">1</property>
|
||||
<property name="tab-fill">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="source-scrolledwindow">
|
||||
<property name="can-focus">1</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="source-textview">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="left-margin">20</property>
|
||||
<property name="right-margin">20</property>
|
||||
<property name="top-margin">20</property>
|
||||
<property name="bottom-margin">20</property>
|
||||
<property name="editable">0</property>
|
||||
<property name="cursor-visible">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<object class="GtkNotebookPage">
|
||||
<property name="position">1</property>
|
||||
<property name="tab-expand">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Source</property>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow" id="source-scrolledwindow">
|
||||
<property name="can-focus">1</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="source-textview">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="left-margin">20</property>
|
||||
<property name="right-margin">20</property>
|
||||
<property name="top-margin">20</property>
|
||||
<property name="bottom-margin">20</property>
|
||||
<property name="editable">0</property>
|
||||
<property name="cursor-visible">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
<property name="tab">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Source</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
<property name="tab-fill">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@@ -115,7 +115,7 @@ do_menus (GtkWidget *do_widget)
|
||||
|
||||
menubar = gtk_menu_bar_new ();
|
||||
gtk_widget_set_hexpand (menubar, TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (box1), menubar);
|
||||
gtk_container_add (GTK_CONTAINER (box1), menubar);
|
||||
gtk_widget_show (menubar);
|
||||
|
||||
menu = create_menu (2);
|
||||
@@ -136,19 +136,19 @@ do_menus (GtkWidget *do_widget)
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2);
|
||||
gtk_container_add (GTK_CONTAINER (box1), box2);
|
||||
gtk_widget_show (box2);
|
||||
|
||||
button = gtk_button_new_with_label ("Flip");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (change_orientation), menubar);
|
||||
gtk_box_pack_start (GTK_BOX (box2), button);
|
||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label ("Close");
|
||||
g_signal_connect_swapped (button, "clicked",
|
||||
G_CALLBACK(gtk_widget_destroy), window);
|
||||
gtk_box_pack_start (GTK_BOX (box2), button);
|
||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||
gtk_widget_set_can_default (button, TRUE);
|
||||
gtk_widget_grab_default (button);
|
||||
gtk_widget_show (button);
|
||||
|
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<interface>
|
||||
<menu id="appmenu">
|
||||
<section>
|
||||
|
@@ -4,7 +4,6 @@ demos = files([
|
||||
'application_demo.c',
|
||||
'assistant.c',
|
||||
'builder.c',
|
||||
'button_box.c',
|
||||
'changedisplay.c',
|
||||
'clipboard.c',
|
||||
'colorsel.c',
|
||||
@@ -76,7 +75,7 @@ demos = files([
|
||||
|
||||
gtkdemo_deps = [ libgtk_dep, ]
|
||||
|
||||
extra_demo_sources = files(['main.c', 'gtkfishbowl.c', 'fontplane.c', 'gtkgears.c', 'puzzlepiece.c'])
|
||||
extra_demo_sources = files(['main.c', 'gtkfishbowl.c', 'fontplane.c', 'gtkgears.c', 'puzzlepiece.c', 'bluroverlay.c'])
|
||||
|
||||
if harfbuzz_dep.found() and pangoft_dep.found()
|
||||
demos += files('font_features.c')
|
||||
@@ -100,7 +99,7 @@ gtkdemo_resources = gnome.compile_resources('gtkdemo_resources',
|
||||
source_dir: '.')
|
||||
|
||||
executable('gtk4-demo',
|
||||
demos, demos_h, extra_demo_sources, gtkdemo_resources,
|
||||
demos, demos_h, extra_demo_sources, gtkdemo_resources,
|
||||
c_args: gtkdemo_args,
|
||||
dependencies: gtkdemo_deps,
|
||||
include_directories: confinc,
|
||||
@@ -120,12 +119,10 @@ executable('gtk4-demo-application',
|
||||
# icons
|
||||
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||
|
||||
foreach icon_size: [ '16x16', '22x22', '24x24', '32x32', '48x48', '256x256', ]
|
||||
gtk_demo_icons_dir = join_paths(icontheme_dir, '@0@/apps'.format(icon_size))
|
||||
install_data('data/@0@/gtk4-demo.png'.format(icon_size),
|
||||
install_dir: gtk_demo_icons_dir)
|
||||
install_data('data/@0@/gtk4-demo-symbolic.symbolic.png'.format(icon_size),
|
||||
install_dir: gtk_demo_icons_dir)
|
||||
foreach size: ['scalable', 'symbolic']
|
||||
install_subdir('data/' + size,
|
||||
install_dir: icontheme_dir
|
||||
)
|
||||
endforeach
|
||||
|
||||
# desktop file
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.6 -->
|
||||
<object class="GtkWindow" id="window1">
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
@@ -56,7 +54,7 @@
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="action-name">win.color</property>
|
||||
<property name="action-target">'red'</property>
|
||||
<property name="action-target">'red'</property>
|
||||
<property name="text">Red</property>
|
||||
<property name="inverted">1</property>
|
||||
</object>
|
||||
@@ -64,7 +62,7 @@
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="action-name">win.color</property>
|
||||
<property name="action-target">'green'</property>
|
||||
<property name="action-target">'green'</property>
|
||||
<property name="text">Green</property>
|
||||
<property name="inverted">1</property>
|
||||
</object>
|
||||
@@ -72,7 +70,7 @@
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="action-name">win.color</property>
|
||||
<property name="action-target">'blue'</property>
|
||||
<property name="action-target">'blue'</property>
|
||||
<property name="text">Blue</property>
|
||||
<property name="inverted">1</property>
|
||||
</object>
|
||||
@@ -99,8 +97,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
</object>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
|
@@ -3,12 +3,12 @@
|
||||
<id>org.gtk.Demo.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>LGPL-2.0+</project_license>
|
||||
<name>GTK+ Demo</name>
|
||||
<summary>Program to demonstrate GTK+ functions</summary>
|
||||
<name>GTK Demo</name>
|
||||
<summary>Program to demonstrate GTK functions</summary>
|
||||
<description>
|
||||
<p>
|
||||
GTK+ Demo is a collection of examples that demonstrate the major
|
||||
features of the GTK+ toolkit.
|
||||
GTK Demo is a collection of examples that demonstrate the major
|
||||
features of the GTK toolkit.
|
||||
</p>
|
||||
</description>
|
||||
<screenshots>
|
||||
@@ -30,4 +30,4 @@
|
||||
<translation type="gettext">gtk-4.0</translation>
|
||||
<update_contact>matthias.clasen_at_gmail.com</update_contact>
|
||||
<developer_name>Matthias Clasen and others</developer_name>
|
||||
</component>
|
||||
</component>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=GTK+ Demo
|
||||
Comment=GTK+ code examples and demonstrations
|
||||
Name=GTK Demo
|
||||
Comment=GTK code examples and demonstrations
|
||||
Exec=gtk4-demo
|
||||
Icon=gtk4-demo
|
||||
Icon=org.gtk.Demo
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
|
@@ -57,7 +57,7 @@ do_overlay (GtkWidget *do_widget)
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), vbox);
|
||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (overlay), vbox, TRUE);
|
||||
gtk_widget_set_can_pick (vbox, FALSE);
|
||||
gtk_widget_set_halign (vbox, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER);
|
||||
|
||||
@@ -65,7 +65,7 @@ do_overlay (GtkWidget *do_widget)
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
||||
gtk_widget_set_margin_top (label, 8);
|
||||
gtk_widget_set_margin_bottom (label, 50);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), vbox);
|
||||
@@ -74,7 +74,7 @@ do_overlay (GtkWidget *do_widget)
|
||||
gtk_entry_set_placeholder_text (GTK_ENTRY (entry), "Your Lucky Number");
|
||||
gtk_widget_set_margin_top (entry, 50);
|
||||
gtk_widget_set_margin_bottom (entry, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), entry);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), overlay);
|
||||
|
||||
|
@@ -64,15 +64,15 @@ do_overlay2 (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
image = gtk_image_new_from_resource ("/overlay2/decor1.png");
|
||||
image = gtk_picture_new_for_resource ("/overlay2/decor1.png");
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), image);
|
||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (overlay), image, TRUE);
|
||||
gtk_widget_set_can_pick (image, FALSE);
|
||||
gtk_widget_set_halign (image, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (image, GTK_ALIGN_START);
|
||||
|
||||
image = gtk_image_new_from_resource ("/overlay2/decor2.png");
|
||||
image = gtk_picture_new_for_resource ("/overlay2/decor2.png");
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), image);
|
||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (overlay), image, TRUE);
|
||||
gtk_widget_set_can_pick (image, FALSE);
|
||||
gtk_widget_set_halign (image, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (image, GTK_ALIGN_END);
|
||||
|
||||
|
@@ -148,7 +148,7 @@ do_panes (GtkWidget *do_widget)
|
||||
|
||||
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||
g_object_set (vpaned, "margin", 5, NULL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), vpaned);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), vpaned);
|
||||
|
||||
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
|
||||
@@ -173,13 +173,13 @@ do_panes (GtkWidget *do_widget)
|
||||
|
||||
/* Now create toggle buttons to control sizing */
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_container_add (GTK_CONTAINER (vbox),
|
||||
create_pane_options (GTK_PANED (hpaned),
|
||||
"Horizontal",
|
||||
"Left",
|
||||
"Right"));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_container_add (GTK_CONTAINER (vbox),
|
||||
create_pane_options (GTK_PANED (vpaned),
|
||||
"Vertical",
|
||||
"Top",
|
||||
|
@@ -1,10 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.0 on Wed Nov 13 16:45:55 2013 -->
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.10 -->
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
<columns>
|
||||
<!-- column-name Name -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
@@ -81,9 +77,6 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@@ -47,9 +47,11 @@ gtk_puzzle_piece_snapshot (GdkPaintable *paintable,
|
||||
gtk_snapshot_push_clip (snapshot,
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
|
||||
gtk_snapshot_offset (snapshot,
|
||||
- width * self->x,
|
||||
- height * self->y);
|
||||
gtk_snapshot_translate (snapshot,
|
||||
&GRAPHENE_POINT_INIT (
|
||||
- width * self->x,
|
||||
- height * self->y
|
||||
));
|
||||
gdk_paintable_snapshot (self->puzzle,
|
||||
snapshot,
|
||||
width * self->width,
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.6 -->
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="default-width">300</property>
|
||||
<property name="default-height">300</property>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#define HEART "♥"
|
||||
const char text[] = "I ♥ GTK+";
|
||||
const char text[] = "I ♥ GTK";
|
||||
|
||||
static void
|
||||
fancy_shape_renderer (cairo_t *cr,
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.6 -->
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
<property name="upper">4</property>
|
||||
<property name="value">2</property>
|
||||
@@ -76,11 +74,11 @@
|
||||
<property name="adjustment">adjustment2</property>
|
||||
<property name="hexpand">1</property>
|
||||
<marks>
|
||||
<mark value="0" position="bottom"></mark>
|
||||
<mark value="1" position="bottom"></mark>
|
||||
<mark value="2" position="bottom"></mark>
|
||||
<mark value="3" position="bottom"></mark>
|
||||
<mark value="4" position="bottom"></mark>
|
||||
<mark value="0" position="bottom"/>
|
||||
<mark value="1" position="bottom"/>
|
||||
<mark value="2" position="bottom"/>
|
||||
<mark value="3" position="bottom"/>
|
||||
<mark value="4" position="bottom"/>
|
||||
</marks>
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label_marks"/>
|
||||
@@ -116,11 +114,11 @@
|
||||
<relation type="labelled-by" target="label_discrete"/>
|
||||
</accessibility>
|
||||
<marks>
|
||||
<mark value="0" position="bottom"></mark>
|
||||
<mark value="1" position="bottom"></mark>
|
||||
<mark value="2" position="bottom"></mark>
|
||||
<mark value="3" position="bottom"></mark>
|
||||
<mark value="4" position="bottom"></mark>
|
||||
<mark value="0" position="bottom"/>
|
||||
<mark value="1" position="bottom"/>
|
||||
<mark value="2" position="bottom"/>
|
||||
<mark value="3" position="bottom"/>
|
||||
<mark value="4" position="bottom"/>
|
||||
</marks>
|
||||
</object>
|
||||
<packing>
|
||||
|
@@ -240,20 +240,20 @@ do_search_entry (GtkWidget *do_widget)
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label), "Search entry demo");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
|
||||
/* Create our entry */
|
||||
entry = gtk_search_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), entry);
|
||||
|
||||
/* Create the find and cancel buttons */
|
||||
notebook = gtk_notebook_new ();
|
||||
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
|
||||
gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), notebook);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), notebook);
|
||||
|
||||
find_button = gtk_button_new_with_label ("Find");
|
||||
g_signal_connect (find_button, "clicked",
|
||||
|
@@ -13,7 +13,7 @@ search_changed_cb (GtkSearchEntry *entry,
|
||||
GtkLabel *result_label)
|
||||
{
|
||||
const char *text;
|
||||
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||
text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||
g_message ("search changed: %s", text);
|
||||
gtk_label_set_text (result_label, text ? text : "");
|
||||
}
|
||||
@@ -22,7 +22,7 @@ static void
|
||||
changed_cb (GtkEditable *editable)
|
||||
{
|
||||
const char *text;
|
||||
text = gtk_entry_get_text (GTK_ENTRY (editable));
|
||||
text = gtk_editable_get_text (GTK_EDITABLE (editable));
|
||||
g_message ("changed: %s", text);
|
||||
}
|
||||
|
||||
@@ -83,38 +83,38 @@ do_search_entry2 (GtkWidget *do_widget)
|
||||
entry = gtk_search_entry_new ();
|
||||
container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_widget_set_halign (container, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (container), entry);
|
||||
gtk_container_add (GTK_CONTAINER (container), entry);
|
||||
searchbar = gtk_search_bar_new ();
|
||||
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (searchbar), GTK_ENTRY (entry));
|
||||
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (searchbar), GTK_EDITABLE (entry));
|
||||
gtk_search_bar_set_show_close_button (GTK_SEARCH_BAR (searchbar), FALSE);
|
||||
gtk_container_add (GTK_CONTAINER (searchbar), container);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), searchbar);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), searchbar);
|
||||
|
||||
/* Hook the search bar to key presses */
|
||||
gtk_search_bar_set_key_capture_widget (GTK_SEARCH_BAR (searchbar), window);
|
||||
|
||||
/* Help */
|
||||
label = gtk_label_new ("Start Typing to search");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
/* Toggle button */
|
||||
button = gtk_toggle_button_new_with_label ("Search");
|
||||
g_object_bind_property (button, "active",
|
||||
searchbar, "search-mode-enabled",
|
||||
G_BINDING_BIDIRECTIONAL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), button);
|
||||
|
||||
/* Result */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
|
||||
label = gtk_label_new ("Result:");
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_widget_set_margin_start (label, 6);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), label);
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), label);
|
||||
|
||||
g_signal_connect (entry, "search-changed",
|
||||
G_CALLBACK (search_changed_cb), label);
|
||||
@@ -122,15 +122,15 @@ do_search_entry2 (GtkWidget *do_widget)
|
||||
G_CALLBACK (changed_cb), label);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
|
||||
label = gtk_label_new ("Signal:");
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_widget_set_margin_start (label, 6);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), label);
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), label);
|
||||
|
||||
g_signal_connect (entry, "search-changed",
|
||||
G_CALLBACK (search_changed), label);
|
||||
|
@@ -1,13 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-boxes">
|
||||
<property name="modal">1</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="section-name">shortcuts</property>
|
||||
<property name="max-height">12</property>
|
||||
<!-- Overview shortcuts -->
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes">Overview</property>
|
||||
@@ -44,12 +41,10 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<!-- Wizard and Properties shortcuts -->
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes">Box Creation and Properties</property>
|
||||
<property name="view">wizard</property>
|
||||
<!-- LTR -->
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">ltr</property>
|
||||
@@ -64,7 +59,6 @@
|
||||
<property name="title" translatable="yes">Switch to the previous page</property>
|
||||
</object>
|
||||
</child>
|
||||
<!-- RTL -->
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">rtl</property>
|
||||
@@ -81,7 +75,6 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<!-- Display shortcuts -->
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes">Box Display</property>
|
||||
@@ -92,7 +85,6 @@
|
||||
<property name="title" translatable="yes">Grab/Ungrab keyboard</property>
|
||||
</object>
|
||||
</child>
|
||||
<!-- LTR -->
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">ltr</property>
|
||||
@@ -100,7 +92,6 @@
|
||||
<property name="title" translatable="yes">Back to overview</property>
|
||||
</object>
|
||||
</child>
|
||||
<!-- RTL -->
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">rtl</property>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-builder">
|
||||
<property name="modal">1</property>
|
||||
<child>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-clocks">
|
||||
<property name="modal">1</property>
|
||||
<child>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-gedit">
|
||||
<property name="modal">1</property>
|
||||
<child>
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Shortcuts</property>
|
||||
<child>
|
||||
|
@@ -19,7 +19,7 @@ do_sidebar (GtkWidget *do_widget)
|
||||
GtkWidget *widget;
|
||||
GtkWidget *header;
|
||||
const gchar* pages[] = {
|
||||
"Welcome to GTK+",
|
||||
"Welcome to GTK",
|
||||
"GtkStackSidebar Widget",
|
||||
"Automatic navigation",
|
||||
"Consistent appearance",
|
||||
@@ -49,7 +49,7 @@ do_sidebar (GtkWidget *do_widget)
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
sidebar = gtk_stack_sidebar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (box), sidebar);
|
||||
gtk_container_add (GTK_CONTAINER (box), sidebar);
|
||||
|
||||
stack = gtk_stack_new ();
|
||||
gtk_stack_set_transition_type (GTK_STACK (stack), GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN);
|
||||
@@ -57,15 +57,15 @@ do_sidebar (GtkWidget *do_widget)
|
||||
|
||||
/* Separator between sidebar and stack */
|
||||
widget = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
|
||||
gtk_box_pack_start (GTK_BOX(box), widget);
|
||||
gtk_container_add (GTK_CONTAINER(box), widget);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (box), stack);
|
||||
gtk_container_add (GTK_CONTAINER (box), stack);
|
||||
|
||||
for (i=0; (c = *(pages+i)) != NULL; i++ )
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
widget = gtk_image_new_from_icon_name ("help-about");
|
||||
widget = gtk_image_new_from_icon_name ("org.gtk.Demo");
|
||||
gtk_image_set_pixel_size (GTK_IMAGE (widget), 256);
|
||||
}
|
||||
else
|
||||
@@ -73,7 +73,7 @@ do_sidebar (GtkWidget *do_widget)
|
||||
widget = gtk_label_new (c);
|
||||
}
|
||||
gtk_stack_add_named (GTK_STACK (stack), widget, c);
|
||||
gtk_container_child_set (GTK_CONTAINER (stack), widget, "title", c, NULL);
|
||||
g_object_set (gtk_stack_get_page (GTK_STACK (stack), widget), "title", c, NULL);
|
||||
}
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
@@ -116,7 +116,7 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
|
||||
/* Create one frame holding color options */
|
||||
frame = gtk_frame_new ("Color Options");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
g_object_set (table, "margin", 5, NULL);
|
||||
@@ -129,7 +129,7 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
|
||||
/* And another frame holding line style options */
|
||||
frame = gtk_frame_new ("Line Options");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
g_object_set (table, "margin", 5, NULL);
|
||||
@@ -142,7 +142,7 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
|
||||
/* And a check button to turn grouping on and off */
|
||||
check_button = gtk_check_button_new_with_mnemonic ("_Enable grouping");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), check_button);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), check_button);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button), TRUE);
|
||||
g_signal_connect (check_button, "toggled",
|
||||
|
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkAdjustment" id="basic_adjustment">
|
||||
<property name="lower">-10000</property>
|
||||
|
@@ -53,7 +53,7 @@ do_spinner (GtkWidget *do_widget)
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox);
|
||||
gtk_container_add (GTK_CONTAINER (content_area), vbox);
|
||||
|
||||
/* Sensitive */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
|