Compare commits

..

85 Commits

Author SHA1 Message Date
Matthias Clasen
593289e40b gtk-demo: Speed up characters scrolling
Use a simple label widget that does not queue a
resize when the text is changed.
2022-05-07 11:43:50 -04:00
Matthias Clasen
ad4536e825 Merge branch 'install-node-editor' into 'main'
Install gtk4-node-editor

See merge request GNOME/gtk!4701
2022-05-07 12:09:29 +00:00
Piotr Drąg
2080f3db17 Update POTFILES.in and POTFILES.skip 2022-05-07 13:49:37 +02:00
Matthias Clasen
726a92200f Install gtk4-node-editor
It is an application worth having around.
2022-05-07 07:18:36 -04:00
Matthias Clasen
f9afee0667 Add a man page for gtk4-node-editor 2022-05-07 07:18:36 -04:00
Matthias Clasen
78d34c098e node-editor: Add things
Add a desktop file and appdata.
2022-05-07 07:18:36 -04:00
Matthias Clasen
aa4e8334ee Merge branch 'faster-listview-scrolling' into 'main'
listitemwidget: Avoid some unnecessary work

See merge request GNOME/gtk!4700
2022-05-07 03:51:45 +00:00
Matthias Clasen
5eee5e8cac Merge branch 'redo-doc-images' into 'main'
wip: Redo doc image generation

See merge request GNOME/gtk!4646
2022-05-07 03:51:10 +00:00
Matthias Clasen
376d95a549 Updated screenshots
Produced by running the screenshot command over the
ui files in the same directory.
2022-05-06 23:05:15 -04:00
Matthias Clasen
a3ac414465 Generate screenshots on the fly
This commit adds a new meson option -Dupdate_screenshots=true.
When it is enabled, and -Dgtk_doc=true is also used, then the
build will generate images to include in the API docs from
ui files in docs/reference/gtk/images.

Note: we still keep a copy of the images in git, in order to
allow building without a display connection. To update the
images in git, the generated images need to be copied back
from the builddir to the srcdir.
2022-05-06 22:59:22 -04:00
Matthias Clasen
8ee6203e2c Remove the old doc shooter infrastructure
This is no longer used.
2022-05-06 22:59:22 -04:00
Matthias Clasen
fadeda61e5 listitemwidget: Avoid more paramspec lookups
We can use the same helper function in all
places where we notify all three listitem
properties.
2022-05-06 22:28:14 -04:00
Matthias Clasen
3307b8ce88 listitemwidget: Avoid some unnecessary work
Only update widget and accessible state if the
selected property actually changed.
2022-05-06 21:36:22 -04:00
Matthias Clasen
fff32faa67 Merge branch 'screenshot-popovers' into 'main'
builder-tool: Screenshot popovers properly

See merge request GNOME/gtk!4699
2022-05-07 00:39:35 +00:00
Matthias Clasen
c0acf264a9 builder-tool: Screenshot popovers properly
Do the necessary shenanigans to get popovers to show
up in screenshots.
2022-05-06 14:43:45 -04:00
Matthias Clasen
dacca9ece0 Merge branch 'check-half-float' into 'main'
gdk: Check OES_vertex_half_float GLES extension

See merge request GNOME/gtk!4689
2022-05-06 18:02:05 +00:00
Benjamin Otte
bd9c491076 Merge branch 'list-item-factory-notify-by-pspec' into 'main'
list-item: Use notify_by_pspec instead of by name

See merge request GNOME/gtk!4697
2022-05-06 16:11:21 +00:00
Matthias Clasen
93d62acdf3 Merge branch 'builder-treestore-data' into 'main'
Add buildable data support to GtkTreeStore

See merge request GNOME/gtk!4695
2022-05-06 15:22:41 +00:00
Matthias Clasen
0da75b0bbf gsk: Check for half float support
The GL renderer currently relies on half float support
in vertex buffers, so check that we have it.

Related: #4894
2022-05-06 11:05:57 -04:00
Ivan Molodetskikh
8328bd9f96 list-item: Use notify_by_pspec instead of by name
This is a hot path when scrolling a ColumnView, and
g_param_spec_pool_lookup () was taking a measurable part in this hot
path. Instead, notify using pspecs to avoid the name lookup.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/3334
2022-05-06 18:05:03 +03:00
Luca Bacci
1a82e6a762 Merge branch 'gdk-win32-rework-scroll-input-handling' into 'main'
GdkWin32: Rework scroll input handling

See merge request GNOME/gtk!4633
2022-05-06 14:58:32 +00:00
Benjamin Otte
886bb0f522 Merge branch 'list-item-factory-no-freeze-thaw' into 'main'
listitemfactory: Track notify manually instead of freeze/thaw

See merge request GNOME/gtk!4696
2022-05-06 14:52:21 +00:00
Ivan Molodetskikh
d65e7c9d05 listitemfactory: Track notify manually instead of freeze/thaw
freeze/thaw_notify () showed up on the perf trace for rapid ColumnView
scrolling. Track the three properties manually to make it a little
faster.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/3334
2022-05-06 17:31:24 +03:00
Matthias Clasen
a96af76c8a Merge branch 'unclipped-screenshots' into 'main'
builder-tool: Include shadows in screenshots

See merge request GNOME/gtk!4692
2022-05-06 13:49:14 +00:00
Matthias Clasen
0ce49daa5f testsuite: test new treestore builder functionality
Verify that we can nest rows.
2022-05-06 09:29:44 -04:00
Matthias Clasen
08154c41f9 treestore: support nested data in builder
This allows <row> elements to be nested.
Note that the child rows must come after
the data for the row itself.
2022-05-06 09:29:44 -04:00
Matthias Clasen
f880d24f2a builder: Allow checking for multiple parents 2022-05-06 09:29:44 -04:00
Matthias Clasen
10b5698b78 testsuite: Copy liststore builer tests for trees
This adds tests for data, but not nesting yet.
2022-05-06 09:29:44 -04:00
Matthias Clasen
c2e8604805 treestore: Copy liststore buildable implementation
This add support for data, but does not allow
nesting yet.
2022-05-06 09:29:44 -04:00
Matthias Clasen
1a488722fa treestore: Cosmetics
Some renaming in the buildable code to make it more
similar to the liststore implementation.
2022-05-06 09:29:44 -04:00
Benjamin Otte
361e8ac076 Merge branch 'otte-main-patch-11831' into 'main'
Don't invalidate parent if it didn't change

See merge request GNOME/gtk!4693
2022-05-06 13:03:47 +00:00
Luca Bacci
66a0e0a59e GdkWin32: Send smooth scroll events
Bring back smooth scroll events as the issues mentioned
in [1] do not occur anymore. Also rework code style and
comments.

References:

  [1] GTK4: Scrolling hides mouse on windows
      https://gitlab.gnome.org/GNOME/gtk/-/issues/3581

  [2] Why are mouse wheel messages delivered to the focus window
      instead of the window under the mouse?
      https://devblogs.microsoft.com/oldnewthing/20160420-00/?p=93325
2022-05-06 15:01:59 +02:00
Benjamin Otte
c29bf115f2 Don't invalidate parent if it didn't change
This looks like a leftover excess invalidation from when the surrounding
code was refactored to not just be called on parent changes but also
when repositioning inside the same parent in commit
507016cafc

Ivan Molodetskikh found this problem in
https://gitlab.gnome.org/GNOME/gtk/-/issues/3334#note_1445873 which
contains a longer analysis of this problem and the performance
reductions it causes.

Related: #3334
2022-05-06 11:50:55 +00:00
Matthias Clasen
b74aec3606 Merge branch 'editable-label-fixes' into 'main'
theme: Fix editable label selection

See merge request GNOME/gtk!4690
2022-05-05 23:38:23 +00:00
Matthias Clasen
e3abd7df5c builder-tool: Include shadows in screenshots
Remove the clipping to the widget area that
GtkWidgetPaintable imposes, so we can see shadows
and other out-of-bounds rendering. This is particularly
useful for toplevel windows with client-side decorations.
2022-05-05 18:29:05 -04:00
Matthias Clasen
25069cf233 editablelabel: Make :editing writable
This does not hurt, and lets us start editing from
a ui file, which is useful for documentation screenshots.
2022-05-05 17:33:24 -04:00
Matthias Clasen
158963ff77 gdk: Check OES_vertex_half_float GLES extension
This will be checked in the GL renderer.
2022-05-05 13:21:25 -04:00
Matthias Clasen
19fa7d513d theme: Fix editable label selection
When the editable label is in editing mode,
selections should appear the same as in other
entries.
2022-05-05 12:44:40 -04:00
Matthias Clasen
a0374334d4 Merge branch 'matthiasc/for-main' into 'main'
docs: Fix a spinbutton example

See merge request GNOME/gtk!4686
2022-05-04 12:28:32 +00:00
Matthias Clasen
3bae7f540e docs: Fix a spinbutton example
We need to use editable api for editable functionality.
2022-05-04 07:42:45 -04:00
Benjamin Otte
23fc3d9ecd Merge branch 'checkbutton-label' into 'main'
Expose GtkCheckButton label child for manipulation

Closes #4698

See merge request GNOME/gtk!4489
2022-05-03 22:05:47 +00:00
Matthias Clasen
c645da00dc Merge branch 'wrap-mode-invalid-cast' into 'main'
Don't cast GtkWrapMode to the incompatible enum PangoWrapMode

Closes #4869

See merge request GNOME/gtk!4671
2022-05-03 17:46:51 +00:00
Matthias Clasen
4867ac653a Merge branch 'wip/exalm/eye-icons' into 'main'
icons: Use the proper eye icons

See merge request GNOME/gtk!4663
2022-05-03 17:37:54 +00:00
Matthias Clasen
b0ccfce1d6 Merge branch 'wip/carlosg/ignore-null-preedit' into 'main'
imcontextwayland: Ignore preedit updates from NULL to NULL

See merge request GNOME/gtk!4667
2022-05-03 17:37:36 +00:00
Matthias Clasen
3f6b5ccf4a Merge branch 'ebassi/issue-4883' into 'main'
Keep FileChooserNative alive while a portal is running

Closes #4883

See merge request GNOME/gtk!4675
2022-05-03 16:37:27 +00:00
Pablo Correa Gómez
07299dd9c7 Expose GtkCheckButton label as a child for manipulation
This allows consumers greater control over the label without the need
to expose each of the label properties as part of GtkCheckButton interface.
Specifically, motivation for this commit is to be able to wrap the label.

Closes #4698
2022-05-03 16:25:55 +02:00
Matthias Clasen
d3ffc0c3bb Merge branch 'wip/another-randr-error-trap-4' into 'main'
x11: Trap errors happening when getting output properties

See merge request GNOME/gtk!4681
2022-05-03 00:44:05 +00:00
Luca Bacci
48ef26317e Merge branch 'fix-introspection-tests-win' into 'main'
testsuite: Fix introspection test on Windows

See merge request GNOME/gtk!4664
2022-05-02 19:00:38 +00:00
Luca Bacci
981981dc46 Merge branch 'fix-list-model-checks-null-vs-empty' into 'main'
GtkFileChooserWidget: fixes for NULL vs empty GListModel

Closes #4851 and #4858

See merge request GNOME/gtk!4678
2022-05-02 18:53:27 +00:00
Jonas Ådahl
f1551a87f6 x11: Trap errors happening when getting output properties
This is to avoid getting X11 errors (thus aborting/exiting with a
failure) during rapid hotplugs, which may happen during e.g. CI testing.
2022-05-02 17:28:36 +02:00
Yuri Chornoivan
9c42b8fb2b Update Ukrainian translation 2022-05-02 09:14:32 +00:00
Yuri Chornoivan
f6aa6dc59d Update Ukrainian translation 2022-05-02 09:11:07 +00:00
Matthias Clasen
35cd02cd1e Merge branch 'fix-large-compose-file' into 'main'
composetable: Add a missing NULL check

Closes #4873

See merge request GNOME/gtk!4679
2022-05-02 08:26:38 +00:00
Matthias Clasen
2b183a9f4e Reject compose tables that are too large
The fixed-size format we use currently can only handle up
to 32768 bytes of string data. If a compose file contains
more, reject it with a warning.

Fixes: #4873
2022-05-02 16:03:45 +08:00
Matthias Clasen
5df314fa8f composetable: Add a missing NULL check
gtk_compose_table_parse can return NULL. Handle it.
2022-05-02 15:39:03 +08:00
Luca Bacci
5a1396d38e GtkFileChooserWidget: return empty GListModel in get_files () instead of NULL 2022-05-01 16:52:13 +02:00
Luca Bacci
6ce36e6a7d GtkFileChooserWidget: check for empty instead of NULL GListModel
While porting GtkFileChooserWidget from GList to GListModel we did not
change some checks for NULL to checks for empty list.

Fixes #4851, #4858
2022-05-01 16:52:13 +02:00
Emmanuele Bassi
196ec107d1 Keep FileChooserNative alive while a portal is running
Even if the FileChooserNative instance drops out on us while we're still
waiting for the portal to answer, we should keep the data and pointers
alive until the sequence of asynchronous operations is running. The code
already tries to do that, by acquiring a strong reference to the
GtkFileChooserNative instance, but it's also freeing data as soon as the
dialog is hidden, while asynchronous callbacks that will look at the
fields on that data are still in flight.

To avoid that, we defer freeing the data until the asynchronous
callbacks are invoked, and we keep a reference on the dialog while we're
emitting signals on it.

Fixes: #4883
2022-04-29 15:27:10 +01:00
Federico Mena Quintero
4ddf1b70a2 Make the wrap_mode test unix-only
The relevant accessibility code is not built on Windows.
2022-04-28 09:46:48 -05:00
Emmanuele Bassi
b3f04413b4 Merge branch 'wip/sophie-h/fix-4020' into 'main'
filechooser: Small fix for select folder mode

Closes #4020

See merge request GNOME/gtk!4650
2022-04-27 13:46:14 +00:00
Federico Mena Quintero
898a2e9fcf textbuffer: Test the serialization of the wrap-mode attribute 2022-04-26 20:22:59 -05:00
Federico Mena Quintero
ae06e40bcc Put the text buffer tests in the internal_tests suite
We'll start testing the internal gtk_text_buffer_get_run_attributes()
soon.
2022-04-26 14:01:08 -05:00
Benjamin Otte
940248598e Merge branch 'wip/otte/for-main' into 'main'
roaring: Remove extra careful code

Closes #4252 and #4517

See merge request GNOME/gtk!4669
2022-04-26 18:58:08 +00:00
Federico Mena Quintero
737854aa0d Don't cast GtkWrapMode to the incompatible enum PangoWrapMode
The enum values are not compatible, and moreover, there is an extra
GTK_WRAP_NONE that PangoWrapMode doesn't have - thus,
pango_wrap_mode_to_string() will assert.

As far as I can tell, Orca does not read the wrap-mode key in the
dictionary for text attributes, anyway.

Fixes: #4869
2022-04-26 13:43:19 -05:00
Benjamin Otte
515b1f5292 boxlayout: Do not infloop
if the loop for determining max width grows too big, print an error and
abort assuming that a satisfactory value was reached.

This will cause wrong layout and might cause widgets to overlap, but it
will not infloop.

It actually works around and doesn't really fix the primary cause of the
following bugs, but good enough to close them:

Fixes: #4252
Fixes: #4517
2022-04-26 19:56:01 +02:00
Benjamin Otte
25520964af ffmpeg: Hey, this variable is const now! 2022-04-26 19:39:20 +02:00
Benjamin Otte
ea79f2dcf4 roaring: Remove extra careful code
because gcc knows it's too careful
2022-04-26 19:38:36 +02:00
Emmanuele Bassi
1d609d2a16 Merge branch 'annotation-fix' into 'main'
gtk/popovermenu: Fix transfer annotation of new_from_model_full()

See merge request GNOME/gtk!4668
2022-04-26 13:08:00 +00:00
Florian Müllner
b82fae9177 gtk/popovermenu: Fix transfer annotation of new_from_model_full()
The function doesn't return a full reference, but a floating widget
like comparable constructor functions.
2022-04-26 14:30:21 +02:00
Carlos Garnacho
d6fe6f495a imcontextwayland: Ignore preedit updates from NULL to NULL
If we get consecutive preedit string updates that announce a NULL
string, we still do end up issuing ::preedit-changed with those.
Ignore changes from NULL to NULL, it is the other combinations which
must issue this signal.
2022-04-26 12:23:09 +02:00
Chun-wei Fan
65a7df47f2 Introspection test: Reverse os.add_dll_directory() order
It looks like os.add_dll_directory() works in a LIFO order, so we call
os.add_dll_directory() from the end of the list of directories in %PATH%
so that the directories are searched in the correct order.
2022-04-26 11:52:31 +08:00
Chun-wei Fan
3471c22f52 testsuite: Fix introspection test on Windows
...when we are using Python 3.8.x or later.  Python 3.8.x or later on Windows
require one to call os.add_dll_directory() on every directory that contains
dependent non-system DLLs of a module that are not bundled/installed with the
module.

Since we are very likely running programs that rely on dependent items in
%PATH%, make things easier for people by calling os.add_dll_directory() on
all the valid paths in %PATH% in api.py, so that the test will run
successfully on Windows with Python 3.8.x or later.
2022-04-26 11:51:26 +08:00
Zurab Kargareteli
3af4d53945 Update Georgian translation 2022-04-23 17:05:50 +00:00
Alexander Mikhaylenko
1ca2d41a98 icons: Use the proper eye icons
adwaita-icon-theme has more appropriate icons for showing/hiding text now.
use those, and in the process fix the fact GtkPasswordEntry has been using
them the other way around.
2022-04-22 16:22:05 +04:00
Rafael Fontenelle
12287c034b Update Brazilian Portuguese translation 2022-04-21 01:34:01 +00:00
Matthias Clasen
76dc7f1b1b Merge branch 'vertical-spin-selection-fix' into 'main'
theme: Fix vertical spin button selection

Closes #4788

See merge request GNOME/gtk!4659
2022-04-20 03:35:44 +00:00
Matthias Clasen
0ea3dcacb0 theme: Fix vertical spin button selection
The selection should be black-on-blue as it is
everywhere else now. This was just a leftover.

Fixes: #4788
2022-04-19 23:14:37 -04:00
Emmanuele Bassi
9761a4758a Merge branch 'ebassi/issue-4825' into 'main'
Fix crash when running GTK4 apps under Orca

Closes #4825

See merge request GNOME/gtk!4657
2022-04-19 21:04:25 +00:00
Emmanuele Bassi
17262d1572 a11y: Defer object registration after root registration
The root accessible object is registered asynchronously, as it needs to
call a method on the AT-SPI registry daemon. This means we need to defer
registering the GtkAtSpiContext on the accessibility bus and in the
cache until after the registration is complete.

Fixes: #4825
2022-04-19 16:35:27 +01:00
Emmanuele Bassi
4dcd02e853 Quench the anger of GCC
Direct access of the fields of the union trips compiler warnings with
GCC 12, such as:

  ../gtk/gtkimagedefinition.c:135:13: error: array subscript
  ‘GtkImageDefinition {aka union _GtkImageDefinition}[0]’ is partly
  outside array bounds of ‘GtkImageDefinitionEmpty[1]’ {aka
  ‘struct _GtkImageDefinitionEmpty[1]’} [-Werror=array-bounds]
2022-04-19 15:33:21 +01:00
Matthias Clasen
8e28b0765c Merge branch 'file-filter-fix' into 'main'
Fix file filter buildable support

Closes #4787

See merge request GNOME/gtk!4652
2022-04-19 03:51:16 +00:00
Matthias Clasen
c882a611c8 Fix file filter buildable support
File filters creates from ui files had some
extraneous gunk in them. Fix that. Test included.

Fixes: #4787
2022-04-18 23:03:15 -04:00
Sophie Herold
908661fee6 filechooser: Small fix for select folder mode
When changing folders, we were making the select
button insensitive when there is no folder selected.
However, the select button should be usable to
select the current folder.

Fixes #4020
2022-04-19 00:55:05 +02:00
Matthias Clasen
1cc2b96e6b Merge branch 'matthiasc/for-main' into 'main'
gtk-builder-tool: Error out if screenshooting fails

See merge request GNOME/gtk!4649
2022-04-18 15:36:45 +00:00
Pablo Correa Gómez
314a75ed0f Set use_underline property for GtkCheckButton label conditionally
Otherwise, if the user set the property to False before creating or
setting the label, the label property will be overriden
2022-03-25 14:35:16 +01:00
229 changed files with 12407 additions and 6817 deletions

View File

@@ -100,7 +100,7 @@ show_page (GtkTextView *text_view,
theme = gtk_icon_theme_get_for_display (gtk_widget_get_display (GTK_WIDGET (text_view)));
icon = gtk_icon_theme_lookup_icon (theme,
"eye-not-looking-symbolic",
"view-conceal-symbolic",
NULL,
16,
1,

View File

@@ -9,6 +9,7 @@
#include <gtk/gtk.h>
#include "script-names.h"
#include "unicode-names.h"
#include "simplelabel.h"
#define UCD_TYPE_ITEM (ucd_item_get_type ())
@@ -102,7 +103,9 @@ setup_centered_label (GtkSignalListItemFactory *factory,
GObject *listitem)
{
GtkWidget *label;
label = gtk_label_new ("");
label = simple_label_new ();
simple_label_set_min_chars (SIMPLE_LABEL (label), 3);
simple_label_set_nat_chars (SIMPLE_LABEL (label), 20);
gtk_list_item_set_child (GTK_LIST_ITEM (listitem), label);
}
@@ -111,8 +114,9 @@ setup_label (GtkSignalListItemFactory *factory,
GObject *listitem)
{
GtkWidget *label;
label = gtk_label_new ("");
gtk_label_set_xalign (GTK_LABEL (label), 0);
label = simple_label_new ();
simple_label_set_min_chars (SIMPLE_LABEL (label), 3);
simple_label_set_nat_chars (SIMPLE_LABEL (label), 20);
gtk_list_item_set_child (GTK_LIST_ITEM (listitem), label);
}
@@ -121,10 +125,9 @@ setup_ellipsizing_label (GtkSignalListItemFactory *factory,
GObject *listitem)
{
GtkWidget *label;
label = gtk_label_new ("");
gtk_label_set_xalign (GTK_LABEL (label), 0);
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
gtk_label_set_width_chars (GTK_LABEL (label), 20);
label = simple_label_new ();
simple_label_set_min_chars (SIMPLE_LABEL (label), 3);
simple_label_set_nat_chars (SIMPLE_LABEL (label), 20);
gtk_list_item_set_child (GTK_LIST_ITEM (listitem), label);
}
@@ -142,7 +145,7 @@ bind_codepoint (GtkSignalListItemFactory *factory,
codepoint = ucd_item_get_codepoint (UCD_ITEM (item));
g_snprintf (buffer, 10, "%#06x", codepoint);
gtk_label_set_label (GTK_LABEL (label), buffer);
simple_label_set_text (SIMPLE_LABEL (label), buffer);
}
static void
@@ -161,7 +164,7 @@ bind_char (GtkSignalListItemFactory *factory,
if (g_unichar_isprint (codepoint))
g_unichar_to_utf8 (codepoint, buffer);
gtk_label_set_label (GTK_LABEL (label), buffer);
simple_label_set_text (SIMPLE_LABEL (label), buffer);
}
static void
@@ -176,7 +179,7 @@ bind_name (GtkSignalListItemFactory *factory,
item = gtk_list_item_get_item (GTK_LIST_ITEM (listitem));
name = ucd_item_get_name (UCD_ITEM (item));
gtk_label_set_label (GTK_LABEL (label), name);
simple_label_set_text (SIMPLE_LABEL (label), name);
}
static void
@@ -191,7 +194,7 @@ bind_type (GtkSignalListItemFactory *factory,
item = gtk_list_item_get_item (GTK_LIST_ITEM (listitem));
codepoint = ucd_item_get_codepoint (UCD_ITEM (item));
gtk_label_set_label (GTK_LABEL (label), get_unicode_type_name (g_unichar_type (codepoint)));
simple_label_set_text (SIMPLE_LABEL (label), get_unicode_type_name (g_unichar_type (codepoint)));
}
static void
@@ -206,7 +209,7 @@ bind_break_type (GtkSignalListItemFactory *factory,
item = gtk_list_item_get_item (GTK_LIST_ITEM (listitem));
codepoint = ucd_item_get_codepoint (UCD_ITEM (item));
gtk_label_set_label (GTK_LABEL (label), get_break_type_name (g_unichar_break_type (codepoint)));
simple_label_set_text (SIMPLE_LABEL (label), get_break_type_name (g_unichar_break_type (codepoint)));
}
static void
@@ -221,7 +224,7 @@ bind_combining_class (GtkSignalListItemFactory *factory,
item = gtk_list_item_get_item (GTK_LIST_ITEM (listitem));
codepoint = ucd_item_get_codepoint (UCD_ITEM (item));
gtk_label_set_label (GTK_LABEL (label), get_combining_class_name (g_unichar_combining_class (codepoint)));
simple_label_set_text (SIMPLE_LABEL (label), get_combining_class_name (g_unichar_combining_class (codepoint)));
}
static void
@@ -238,7 +241,7 @@ bind_script (GtkSignalListItemFactory *factory,
codepoint = ucd_item_get_codepoint (UCD_ITEM (item));
script = g_unichar_get_script (codepoint);
gtk_label_set_label (GTK_LABEL (label), get_script_name (script));
simple_label_set_text (SIMPLE_LABEL (label), get_script_name (script));
}
static void

View File

@@ -130,6 +130,7 @@ extra_demo_sources = files([
'unicode-names.c',
'suggestionentry.c',
'language-names.c',
'simplelabel.c',
])
if os_unix

View File

@@ -0,0 +1,260 @@
#include "simplelabel.h"
struct _SimpleLabel
{
GtkWidget parent_instance;
PangoLayout *layout;
int min_chars;
int nat_chars;
int min_width;
int nat_width;
int height;
};
struct _SimpleLabelClass
{
GtkWidgetClass parent_class;
};
enum {
PROP_TEXT = 1,
PROP_MIN_CHARS,
PROP_NAT_CHARS,
NUM_PROPERTIES
};
static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
G_DEFINE_TYPE (SimpleLabel, simple_label, GTK_TYPE_WIDGET)
static void
simple_label_init (SimpleLabel *self)
{
self->layout = gtk_widget_create_pango_layout (GTK_WIDGET (self), "");
pango_layout_set_ellipsize (self->layout, PANGO_ELLIPSIZE_NONE);
pango_layout_set_wrap (self->layout, PANGO_WRAP_WORD);
pango_layout_set_width (self->layout, -1);
}
static void
simple_label_dispose (GObject *object)
{
SimpleLabel *self = SIMPLE_LABEL (object);
g_clear_object (&self->layout);
G_OBJECT_CLASS (simple_label_parent_class)->dispose (object);
}
static void
simple_label_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
SimpleLabel *self = SIMPLE_LABEL (object);
switch (prop_id)
{
case PROP_TEXT:
simple_label_set_text (self, g_value_get_string (value));
break;
case PROP_MIN_CHARS:
simple_label_set_min_chars (self, g_value_get_int (value));
break;
case PROP_NAT_CHARS:
simple_label_set_nat_chars (self, g_value_get_int (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
simple_label_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
SimpleLabel *self = SIMPLE_LABEL (object);
switch (prop_id)
{
case PROP_TEXT:
g_value_set_string (value, pango_layout_get_text (self->layout));
break;
case PROP_MIN_CHARS:
g_value_set_int (value, self->min_chars);
break;
case PROP_NAT_CHARS:
g_value_set_int (value, self->nat_chars);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
simple_label_measure (GtkWidget *widget,
GtkOrientation orientation,
int for_size,
int *minimum,
int *natural,
int *minimum_baseline,
int *natural_baseline)
{
SimpleLabel *self = SIMPLE_LABEL (widget);
if (orientation == GTK_ORIENTATION_VERTICAL)
{
*minimum = *natural = self->height;
}
else
{
*minimum = self->min_width;
*natural = self->nat_width;
}
}
static void
simple_label_size_allocate (GtkWidget *widget,
int width,
int height,
int baseline)
{
SimpleLabel *self = SIMPLE_LABEL (widget);
pango_layout_set_width (self->layout, width * PANGO_SCALE);
}
static void
simple_label_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot)
{
SimpleLabel *self = SIMPLE_LABEL (widget);
GtkStyleContext *context;
context = gtk_widget_get_style_context (widget);
gtk_snapshot_render_layout (snapshot, context, 0, 0, self->layout);
}
static void
simple_label_class_init (SimpleLabelClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
object_class->dispose = simple_label_dispose;
object_class->set_property = simple_label_set_property;
object_class->get_property = simple_label_get_property;
widget_class->measure = simple_label_measure;
widget_class->size_allocate = simple_label_size_allocate;
widget_class->snapshot = simple_label_snapshot;
properties[PROP_TEXT] =
g_param_spec_string ("text", "Text", "Text",
NULL,
G_PARAM_READWRITE);
properties[PROP_MIN_CHARS] =
g_param_spec_int ("min-chars", "Minimum Characters", "Minimum Characters",
0, G_MAXINT, 0,
G_PARAM_READWRITE);
properties[PROP_NAT_CHARS] =
g_param_spec_int ("nat-chars", "Natural Characters", "Natural Characters",
0, G_MAXINT, 0,
G_PARAM_READWRITE);
g_object_class_install_properties (object_class, NUM_PROPERTIES, properties);
}
GtkWidget *
simple_label_new (void)
{
return g_object_new (SIMPLE_TYPE_LABEL, NULL);
}
void
simple_label_set_text (SimpleLabel *self,
const char *text)
{
if (strcmp (text, pango_layout_get_text (self->layout)) == 0)
return;
pango_layout_set_text (self->layout, text, -1);
gtk_widget_queue_draw (GTK_WIDGET (self));
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_TEXT]);
}
static void
recalculate (SimpleLabel *self)
{
PangoContext *context;
PangoFontMetrics *metrics;
int char_width;
int digit_width;
int width;
int ascent;
int descent;
context = gtk_widget_get_pango_context (GTK_WIDGET (self));
metrics = pango_context_get_metrics (context,
pango_context_get_font_description (context),
pango_context_get_language (context));
char_width = pango_font_metrics_get_approximate_char_width (metrics);
digit_width = pango_font_metrics_get_approximate_digit_width (metrics);
ascent = pango_font_metrics_get_ascent (metrics);
descent = pango_font_metrics_get_descent (metrics);
pango_font_metrics_unref (metrics);
width = MAX (char_width, digit_width);
self->min_width = (width * self->min_chars) / PANGO_SCALE;
self->nat_width = (width * self->nat_chars) / PANGO_SCALE;
self->height = (ascent + descent) / PANGO_SCALE;
}
void
simple_label_set_min_chars (SimpleLabel *self,
int min_chars)
{
if (self->min_chars == min_chars)
return;
self->min_chars = min_chars;
recalculate (self);
gtk_widget_queue_resize (GTK_WIDGET (self));
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MIN_CHARS]);
}
void
simple_label_set_nat_chars (SimpleLabel *self,
int nat_chars)
{
if (self->nat_chars == nat_chars)
return;
self->nat_chars = nat_chars;
recalculate (self);
gtk_widget_queue_resize (GTK_WIDGET (self));
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_NAT_CHARS]);
}

View File

@@ -0,0 +1,15 @@
#pragma once
#include <gtk/gtk.h>
#define SIMPLE_TYPE_LABEL (simple_label_get_type ())
G_DECLARE_FINAL_TYPE (SimpleLabel, simple_label, SIMPLE, LABEL, GtkWidget)
GtkWidget * simple_label_new (void);
void simple_label_set_text (SimpleLabel *self,
const char *text);
void simple_label_set_min_chars (SimpleLabel *self,
int min_chars);
void simple_label_set_nat_chars (SimpleLabel *self,
int nat_chars);

View File

@@ -19,12 +19,24 @@ executable('gtk4-node-editor',
] + common_cflags,
win_subsystem: 'windows',
link_args: extra_demo_ldflags,
install: false,
install: true,
)
# icons, don't install them until we decide to install gtk4-node-editor
#icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
# icons
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
foreach size: ['scalable', 'symbolic']
install_subdir('data/' + size, install_dir: icontheme_dir)
endforeach
# desktop file
install_data('org.gtk.gtk4.NodeEditor.desktop', install_dir: gtk_applicationsdir)
# appdata
configure_file(
input: 'org.gtk.gtk4.NodeEditor.appdata.xml.in',
output: 'org.gtk.gtk4.NodeEditor.appdata.xml',
configuration: appdata_config,
install_dir: gtk_appdatadir
)
#foreach size: ['scalable', 'symbolic']
# install_subdir('data/' + size, install_dir: icontheme_dir)
#endforeach

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>org.gtk.gtk4.NodeEditor</id>
<launchable type="desktop-id">org.gtk.gtk4.NodeEditor.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LGPL-2.1-or-later</project_license>
<name>GTK Node Editor</name>
<summary>Program to edit render node files</summary>
<description>
<p>
GTK Node Editor is a simple application to show and edit
render node files.
</p>
<p>
Render node files can e.g. be created by the GTK inspector.
</p>
</description>
<screenshots>
<screenshot>
<image>https://static.gnome.org/appdata/gtk4-node-editor/gtk4-node-editor.png</image>
<caption>Node Editor</caption>
</screenshot>
</screenshots>
<kudos>
<kudo>HiDpiIcon</kudo>
<kudo>ModernToolkit</kudo>
</kudos>
<url type="homepage">https://www.gtk.org</url>
<translation type="gettext">gtk-4.0</translation>
<update_contact>matthias.clasen_at_gmail.com</update_contact>
<developer_name>Matthias Clasen and others</developer_name>
<content_rating type="oars-1.1"/>
<releases>
<release version="@BUILD_VERSION@">
<description>
<p>A new build of GTK.</p>
</description>
</release>
</releases>
</component>

View File

@@ -0,0 +1,9 @@
[Desktop Entry]
Name=Node Editor
Comment=An application that edits render nodes
Exec=gtk4-node-editor
Icon=org.gtk.gtk4.NodeEditor
Terminal=false
Type=Application
StartupNotify=true
Categories=Development;GTK;

View File

@@ -0,0 +1,27 @@
.. _gtk4-node-editor(1):
=================
gtk4-node-editor
=================
-----------------
Editor render nodes
-----------------
SYNOPSIS
--------
| **gtk4-node-editor** [OPTIONS...]
DESCRIPTION
-----------
``gtk4-node-editor`` is a utility to show and edit render node files.
Such render node files can be obtained e.g. from the GTK inspector.
OPTIONS
-------
``-h, --help``
Show the application help.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkAboutDialog">
<property name="program-name">GTK Code Demos</property>
<property name="version">4.8.0</property>
<property name="copyright">© 1997-2022 The GTK Team</property>
<property name="comments">Program to demonstrate GTK functions</property>
<property name="logo">gtk-logo.png</property>
<property name="title">About GTK Code Demos</property>
<property name="authors">Peter Mattis
Spencer Kimball
Josh MacDonald
and many more…
</property>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<child>
<object class="GtkTextView">
<property name="vexpand">1</property>
</object>
</child>
<child>
<object class="GtkActionBar">
<child>
<object class="GtkButton">
<property name="icon-name">object-select-symbolic</property>
</object>
</child>
<child>
<object class="GtkButton">
<property name="icon-name">call-start-symbolic</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkAppChooserButton">
<property name="content-type">text/plain</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Application Button</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkAppChooserDialog">
<property name="content-type">image/png</property>
<property name="default-width">200</property>
<property name="default-height">300</property>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkAssistant">
<property name="resizable">0</property>
<property name="default-width">300</property>
<property name="default-height">140</property>
<property name="title">Assistant</property>
<child>
<object class="GtkAssistantPage">
<property name="title">Assistant page</property>
<property name="complete">1</property>
<property name="child">
<object class="GtkLabel">
<property name="label">Assistant</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkAssistantPage">
<property name="page-type">confirm</property>
<property name="child">
<object class="GtkLabel">
<property name="label">You sure?</property>
</object>
</property>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="homogeneous">1</property>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkButton">
<style><class name="small-button"/></style>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkButton">
<style><class name="small-button"/></style>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">⋯</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkButton">
<style><class name="small-button"/></style>
<property name="halign">center</property>
</object>
</child>
<child>
<object class="GtkButton">
<style><class name="small-button"/></style>
<property name="halign">center</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">⋮</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="justify">center</property>
<property name="label">Horizontal and Vertical Boxes</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkButton">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">Button</property>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<child>
<object class="GtkCalendar">
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Calendar</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="margin-start">20</property>
<property name="margin-end">20</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkCenterBox">
<property name="orientation">horizontal</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">fill</property>
<child type="start">
<object class="GtkButton">
<style><class name="small-button"/></style>
<property name="valign">center</property>
</object>
</child>
<child type="center">
<object class="GtkButton">
<style><class name="small-button"/></style>
<property name="valign">center</property>
</object>
</child>
<child type="end">
<object class="GtkButton">
<style><class name="small-button"/></style>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="justify">center</property>
<property name="label">Center Box</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkCheckButton">
<property name="active">1</property>
<property name="label">Check Button</property>
</object>
</child>
<child>
<object class="GtkCheckButton">
<property name="active">0</property>
<property name="label">Check Button</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkColorButton">
<property name="rgba">#1e90ff</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Color Button</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkColorChooserDialog">
<property name="title">Color Chooser Dialog</property>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkComboBox">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="has-entry">1</property>
<child internal-child="entry">
<object class="GtkEntry">
<property name="text">Combo Box Entry</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkComboBoxText">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<items>
<item>Combo Box Text</item>
</items>
<property name="active">0</property>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkComboBox">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="model">
<object class="GtkListStore">
<columns>
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0">Combo Box</col>
</row>
</data>
</object>
</property>
<child>
<object class="GtkCellRendererText">
</object>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
<property name="active">0</property>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkDialog">
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<property name="title">Dialog</property>
<child type="action">
<object class="GtkButton" id="button_cancel">
<property name="label">Cancel</property>
</object>
</child>
<child type="action">
<object class="GtkButton" id="button_ok">
<property name="label">Accept</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Content</property>
<property name="hexpand">1</property>
<property name="halign">center</property>
</object>
</child>
<action-widgets>
<action-widget response="ok" default="true">button_ok</action-widget>
<action-widget response="cancel" default="true">button_cancel</action-widget>
</action-widgets>
</object>
</interface>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">fill</property>
<property name="valign">center</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<child>
<object class="GtkFrame">
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<child>
<object class="GtkPicture">
<property name="paintable">drawingarea-content.png</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Drawing Area</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkDropDown">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="model">
<object class="GtkStringList">
<items>
<item>Drop Down</item>
<item>Almost a combo</item>
</items>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<property name="focus-widget">editable2</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkEditableLabel">
<property name="text">Editable Label</property>
</object>
</child>
<child>
<object class="GtkSeparator">
</object>
</child>
<child>
<object class="GtkEditableLabel" id="editable2">
<property name="text">Editable Label</property>
<property name="editing">1</property>
<style>
<class name="frame"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkEmojiChooser">
<property name="autohide">0</property>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkEntry">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">fill</property>
<property name="valign">center</property>
<property name="text">Entry</property>
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkExpander">
<property name="label">Expander</property>
<property name="hexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkLabel">
<property name="label">Hidden Content</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="frame"/>
<class name="shadow"/>
<class name="background"/>
</style>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<child>
<object class="GtkFlowBox">
<property name="min-children-per-line">2</property>
<property name="max-children-per-line">2</property>
<property name="selection-mode">browse</property>
<child>
<object class="GtkLabel">
<property name="label">Child One</property>
</object>
</child>
<child>
<object class="GtkButton">
<property name="label">Child Two</property>
</object>
</child>
<child>
<object class="GtkFlowBoxChild">
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel">
<property name="label">Child Three</property>
</object>
</child>
<child>
<object class="GtkCheckButton">
<property name="active">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Flow Box</property>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkFontButton">
<property name="font-desc">Sans Serif 10</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Font Button</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkFontChooserDialog">
<property name="default-width">200</property>
<property name="default-height">300</property>
<property name="title">Font Chooser Dialog</property>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkFrame">
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">fill</property>
<property name="valign">fill</property>
<property name="label">Frame</property>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-width">150</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">fill</property>
<property name="valign">center</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<child>
<object class="GtkFrame">
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<style>
<class name="black"/>
</style>
<child>
<object class="GtkPicture">
<property name="paintable">glarea-content.png</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">GL Area</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="margin-start">20</property>
<property name="margin-end">20</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkGrid">
<property name="row-spacing">4</property>
<property name="column-spacing">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkButton">
<style><class name="small-button"/></style>
<property name="valign">center</property>
<layout>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkButton">
<style><class name="small-button"/></style>
<property name="valign">center</property>
<layout>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkButton">
<style><class name="small-button"/></style>
<property name="valign">center</property>
<layout>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkButton">
<style><class name="small-button"/></style>
<property name="valign">center</property>
<layout>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">⋯</property>
<layout>
<property name="column">2</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">⋮</property>
<layout>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="justify">center</property>
<property name="label">Grid</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="resizable">0</property>
<property name="default-width">220</property>
<property name="default-height">150</property>
<property name="title">Header Bar</property>
<child type='titlebar'>
<object class="GtkHeaderBar">
<child type='end'>
<object class="GtkButton">
<property name="icon-name">bookmark-new-symbolic</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkTextView">
<property name="cursor-visible">0</property>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkListStore" id="store">
<columns>
<column type="gchararray"/>
<column type="GdkPixbuf"/>
</columns>
<data>
<row>
<col id="0">One</col>
<col id="1">folder.png</col>
</row>
<row>
<col id="0">Two</col>
<col id="1">gnome.png</col>
</row>
</data>
</object>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkScrolledWindow">
<style>
<class name="frame"/>
</style>
<property name="hscrollbar-policy">never</property>
<property name="vscrollbar-policy">never</property>
<property name="propagate-natural-height">1</property>
<child>
<object class="GtkIconView">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="model">store</property>
<property name="text-column">0</property>
<property name="pixbuf-column">1</property>
<property name="item-orientation">horizontal</property>
<property name="row-spacing">0</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Icon View</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkImage">
<property name="icon-name">applications-graphics</property>
<property name="icon-size">large</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Image</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkInfoBar">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">fill</property>
<property name="valign">center</property>
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="show-close-button">1</property>
<property name="message-type">info</property>
<child>
<object class="GtkLabel">
<property name="label">Info Bar</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkLabel">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">Label</property>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="halign">fill</property>
<property name="valign">center</property>
<child>
<object class="GtkLevelBar">
<property name="value">0.3333</property>
<property name="hexpand">1</property>
<property name="halign">fill</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Level Bar</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkLinkButton">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">Link Button</property>
<property name="uri">http://www.gtk.org</property>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkTreeStore" id="store">
<columns>
<column type="gchararray"/>
<column type="gboolean"/>
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0">Line One</col>
<col id="1">False</col>
<col id="2">A</col>
</row>
<row>
<col id="0">Line Two</col>
<col id="1">True</col>
<col id="2">B</col>
<row>
<col id="0">Line Three</col>
<col id="1">False</col>
<col id="2">C</col>
</row>
</row>
</data>
</object>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkTreeView">
<style>
<class name="frame"/>
</style>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="model">store</property>
<child>
<object class="GtkTreeViewColumn">
<property name="title">List</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title">and</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title">Tree</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<property name="enable-tree-lines">0</property>
<property name="enable-grid-lines">0</property>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="frame"/>
<class name="shadow"/>
<class name="background"/>
</style>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<child>
<object class="GtkListBox">
<property name="selection-mode">single</property>
<child>
<object class="GtkListBoxRow">
<property name="selectable">0</property>
<child>
<object class="GtkLabel">
<property name="hexpand">1</property>
<property name="halign">center</property>
<property name="label">List Box</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">10</property>
<child>
<object class="GtkLabel">
<property name="hexpand">1</property>
<property name="label">Line One</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkCheckButton">
<property name="active">1</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">10</property>
<child>
<object class="GtkLabel">
<property name="hexpand">1</property>
<property name="label">Line Two</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkButton">
<property name="label">2</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">horizontal</property>
<property name="spacing">10</property>
<child>
<object class="GtkLabel">
<property name="label">Line Three</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkEntry">
<property name="hexpand">1</property>
<property name="halign">end</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkVideo" id="video">
<property name="visible">0</property>
<property name="file">file:///home/mclasen/Sources/gtk-master/docs/reference/gtk/images/gtk-logo.webm</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkMediaControls">
<property name="halign">center</property>
<property name="valign">center</property>
<binding name="media-stream">
<lookup type="GtkVideo" name="media-stream">video</lookup>
</binding>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Media Controls</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkMenuButton">
<property name="icon-name">emblem-system-symbolic</property>
<property name="popover"><object class="GtkPopover"></object></property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Menu Button</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 147 B

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="model">
<section>
<submenu>
<attribute name="label">Style</attribute>
<section>
<item>
<attribute name="label">Item</attribute>
</item>
</section>
</submenu>
<item>
<attribute name="label">Transition</attribute>
<attribute name="action">misc.toggle-visibility</attribute>
</item>
</section>
<section>
<item>
<attribute name="label">Inspector</attribute>
</item>
<item>
<attribute name="label">About</attribute>
<attribute name="action">text.redo</attribute>
</item>
</section>
</menu>
<object class="GtkText">
<child>
<object class="GtkPopoverMenu">
<property name="autohide">0</property>
<property name="menu-model">model</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="model">
<submenu>
<attribute name="label">File</attribute>
</submenu>
<submenu>
<attribute name="label">Edit</attribute>
</submenu>
<submenu>
<attribute name="label">View</attribute>
</submenu>
</menu>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkPopoverMenuBar">
<property name="menu-model">model</property>
<property name="halign">center</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label">Menu Bar</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@@ -0,0 +1,91 @@
# commented-out ui files need more work
ui_files = [
'aboutdialog.ui',
'action-bar.ui',
'appchooserbutton.ui',
'appchooserdialog.ui',
'assistant.ui',
'box.ui',
'button.ui',
'calendar.ui',
'centerbox.ui',
'check-button.ui',
'colorchooser.ui',
'color-button.ui',
'combo-box.ui',
'combo-box-entry.ui',
'combo-box-text.ui',
'dialog.ui',
'drawingarea.ui',
'drop-down.ui',
'editable-label.ui',
'emojichooser.ui',
'entry.ui',
'expander.ui',
'flow-box.ui',
'fontchooser.ui',
'font-button.ui',
'frame.ui',
'glarea.ui',
'grid.ui',
'headerbar.ui',
'icon-view.ui',
'image.ui',
'info-bar.ui',
'label.ui',
'levelbar.ui',
'link-button.ui',
'list-box.ui',
'list-and-tree.ui',
'media-controls.ui',
'menu.ui',
'menubar.ui',
'menu-button.ui',
'messagedialog.ui',
'multiline-text.ui',
'notebook.ui',
'overlay.ui',
'pagesetupdialog.ui',
'panes.ui',
'password-entry.ui',
'picture.ui',
'popover.ui',
'printdialog.ui',
'progressbar.ui',
'radio-button.ui',
'scales.ui',
'scrollbar.ui',
'scrolledwindow.ui',
'search-bar.ui',
'search-entry.ui',
'separator.ui',
'shortcuts-window.ui',
'sidebar.ui',
'spinbutton.ui',
'spinner.ui',
'stack.ui',
'stackswitcher.ui',
'statusbar.ui',
'switch.ui',
'toggle-button.ui',
'video.ui',
'volumebutton.ui',
'window.ui',
'windowcontrols.ui',
]
gtk_builder_tool = find_program('gtk4-builder-tool')
if get_option('update_screenshots')
foreach ui_file: ui_files
png_file = ui_file.replace('.ui', '.png')
gtk_images += custom_target('@0@ from @1@'.format(png_file, ui_file),
input: [ui_file, 'style.css'],
output: png_file,
command: [ gtk_builder_tool, 'screenshot',
'--force',
'--css', '@INPUT1@',
'@INPUT0@', '@OUTPUT@' ])
endforeach
endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkMessageDialog">
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<property name="icon-name">edit-copy</property>
<property name="text">Message Dialog</property>
<property name="secondary-text">With secondary text</property>
<child type="action">
<object class="GtkButton" id="button_ok">
<property name="label">Ok</property>
</object>
</child>
<action-widgets>
<action-widget response="ok" default="true">button_ok</action-widget>
</action-widgets>
</object>
</interface>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="resizable">0</property>
<property name="default-width">280</property>
<property name="default-height">120</property>
<style>
<class name="nobackground"/>
</style>
<child>
<object class="GtkBox">
<style>
<class name="shadow"/>
<class name="background"/>
<class name="frame"/>
</style>
<child>
<object class="GtkFrame">
<property name="margin-start">10</property>
<property name="margin-end">10</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<child>
<object class="GtkTextView">
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<property name="buffer">
<object class="GtkTextBuffer">
<property name="text">Multiline
Text
</property>
</object>
</property>
<property name="cursor-visible">0</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

Some files were not shown because too many files have changed in this diff Show More