Commit Graph

372 Commits

Author SHA1 Message Date
Matthias Clasen
80185b0f2a widget-factory: Enable page transitions by default
No need to make this an easter egg.
2020-04-27 14:33:07 -04:00
Matthias Clasen
a3368ab7e9 widget-factory: Revamp transition effects
Use a quick crossfade for the main pages, and use
the rotation for the small stack on page 2, where
it looks less out of place.
2020-04-26 22:30:34 -04:00
Matthias Clasen
af2903d263 widget-factory: Improve the textview on page 3
Remove an extra frame, make the buttons linked, and
add tooltips.
2020-04-26 21:13:16 -04:00
Matthias Clasen
9ca2a09427 widget-factory: Move the password entry
Move the password entry to the other entries. That
fits the overall organization better, and makes all
the typographical styles fit.
2020-04-26 20:54:09 -04:00
Matthias Clasen
50b930fb1c widget-factory: Make the list on page 2 grow to the bottom
Add a few more items to the list to make it fill up the space.
2020-04-26 20:35:51 -04:00
Matthias Clasen
3ed285ab71 widget-factory: Show typographical style classes
This nicely fills the gap on page 1.
2020-04-26 20:25:11 -04:00
Matthias Clasen
1bdaa99347 widget-factory: Include pango version in about dialog
This is useful information.
2020-04-26 20:01:31 -04:00
Matthias Clasen
ad22c463b8 widget-factory: Add a password entry
Thats a new widget that was missing.
2020-04-26 19:34:36 -04:00
Matthias Clasen
9f579edfdb widget-factory: Put a video widget in
The designers wanted the frame column gone for a long
time, since inset/outset/groove etc are not the coolest
features anymore.

Keep one frame, and put a GtkVideo in it.

This opens up some real estate on page 1. Suggestions
welcome for how to fill it.
2020-04-26 14:08:40 -04:00
Matthias Clasen
f6af2d63b0 widget-factory: Implement the print action
Implement enough here to show a print dialog.
2020-04-26 14:08:35 -04:00
Matthias Clasen
8de774dde1 widget-factory: Make print a window action
We want to pass the parent window when opening
a print dialog, so this is naturally a window
action.
2020-04-26 10:45:40 -04:00
Matthias Clasen
8410e6f129 widget-factory: Some cosmetics
Hook the Print button on page 3 up to the app.print
action. This doesn't do anything now, but we might
use it to show a print dialog.
2020-04-26 10:02:11 -04:00
Matthias Clasen
ecf8e6f692 widget-factory: Improve the layout on page 3
Make the entries in the third column expand,
to align things.
2020-04-26 10:00:14 -04:00
Matthias Clasen
6f7bd37aeb widget-factory: Update copyright year 2020-04-26 00:45:06 -04:00
Matthias Clasen
02fa948914 widget-factory: Improve the theme selector
Implement the "Current style" choice using
gtk_settings_reset_property, so we go back to
following the settings changes.
2020-04-24 21:12:20 -04:00
Matthias Clasen
250036259a widget-factory: Make color swatches non-focusable 2020-04-18 03:29:13 -04:00
Matthias Clasen
416d82c81e widget-factory: Add a menu section title
If you can't see it, you can't theme it.
2020-04-17 13:29:56 -04:00
Matthias Clasen
12d5fdd457 menubutton: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
df1816a29c button: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
285aa226e5 scrolledwindow: Drop shadow-type
We were only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
3469a63453 widget-factory: Use a model for the complex menu
We had the model already in the ui file, but weren't
using it.
2020-04-17 09:07:17 -04:00
Matthias Clasen
4a20a3fdb2 widget-factory: Catch errors
This speeds up the debugging when doing quick experimental
changes to widget-factory.ui.
2020-04-17 08:55:56 -04:00
Matthias Clasen
b072ad9993 widget-factory: Add menu style class in popovers
We have a hand-rolled popover menu on page 3 that looks
really bad right now. Adding the menu style class makes
it all better.
2020-04-15 11:36:09 -04:00
Matthias Clasen
394ea32e93 Use gtk_widget_add/remove_css_class more
Replace most uses of gtk_style_context_add/remove_class
by the new APIs. The only remaining uses of the old API
are in save/restore situations.
2020-04-10 12:09:57 -04:00
Matthias Clasen
822c2aba36 scalebutton: Don't derive from GtkButton
Make GtkScaleButton a widget that has a toggle button
as a child, just like all the other button widgets now.
The immediate benefit of this arrangement is to avoid
the "double focus" problem when we pop up the popup.

Update accessible, demos and tests to match.
2020-04-09 20:43:45 -04:00
Matthias Clasen
0b17658a82 Replace most uses of <Primary> with <Control>
The only place where we are still using <Primary> is
in tests, to ensure we keep parsing it. Otherwise,
<Control> is now the preferred syntax.
2020-04-06 17:05:52 -04:00
Matthias Clasen
f2d6a7b36a demos: Remove can-focus from ui files 2020-04-04 00:28:34 -04:00
Jakub Steiner
e9082fd9f3 widget-factory: avoid the T word
- style variant sound more appropriate
2020-03-30 14:28:47 +02:00
Matthias Clasen
5d07a66d1d widget-factory: Fix the radio button example
We only want one of the sensitive buttons to be active,
so don't tell them all to be active.
2020-03-27 16:06:03 -04:00
Matthias Clasen
8ab2e31b58 widget-factory: Add theme switch
Add a submenu to test the builtin themes. This is mainly
for the benefit of the artists working on those themes.
2020-03-26 13:51:59 -04:00
Timm Bäder
3c28f6d891 demos/widget-factory: Add common_cflags to build
And fix the generated warnings
2020-03-06 18:56:40 +01:00
Matthias Clasen
b5bacb3be6 Drop the margin property
Replace it with margin-start, -end, -top, -bottom throughout.
2020-02-25 20:59:04 -05:00
Matthias Clasen
a9c05193a7 Drop the expand property
The hexpand and vexpand properties are sufficient.
2020-02-25 18:29:15 -05:00
Matthias Clasen
9d80db29de Merge branch 'spinning-spinner' into 'master'
Rename GtkSpinner::active to ::spinning

See merge request GNOME/gtk!1475
2020-02-25 04:04:46 +00:00
Matthias Clasen
e73a40733f Rename GtkSpinner::active to ::spinning
And add a setter and getter. The old name was
confusing with the widget state of the same
name. 'Active' is just too overloaded.
2020-02-24 22:37:02 -05:00
Matthias Clasen
a43d13aa74 popover: Drop ::relative-to
It is enough to just set the parent (and make the parent
call gtk_native_check_resize in size_allocate).

This commit removes the relative_to argument to the
constructors of GtkPopover and GtkPopoverMenu, and
updates all callers.
2020-02-24 20:46:41 -05:00
Benjamin Otte
1363cacb3a widget-factory: Get rid of toolbars 2020-02-07 14:08:08 +01:00
Chun-wei Fan
69ed4c90e5 demos/widget-factory/widget-factory.c: Include stdlib.h
Include it for exit().
2020-02-03 17:18:36 +08:00
Matthias Clasen
a6f300cefd widget-factory: Add a way to quit automatically
This can be used to measure startup cost in tests.
2020-01-21 17:31:48 -05:00
Matthias Clasen
62e9ea412a widget-factory: Remove the menubar 2019-12-29 18:44:26 -05:00
Matthias Clasen
24c66f831f widgetfactory: Undo more builder-tool damage
The two volume buttons are supposed to be
vertically arranged.
2019-12-24 09:59:23 -05:00
Matthias Clasen
4470e5bc93 gtk-demo: Some touchups
Make the theming style classes demo look a bit less odd.
2019-12-12 18:46:53 -05:00
Benjamin Otte
f8a7f30a0d builder: Add GtkBuilderScope
GtkBuilderScope is an interface that provides the scope that a builder
instance operates in.
It creates closures and resolves types. Language bindings are meant to
use this interface to customize the behavior of builder files, in
particular when instantiating templates.

A default implementation for C is provided via GtkBuilderCScope (to keep
with the awkward naming that glib uses for closures). It is derivable on
purpose so that languages or extensions that extend C can use it.

The reftest code in fact does derive GtkBuilderCScope for its own scope
implementation that implements looking up symbols in modules.

gtk-widget-factory was updated to use the new GtkBuilderCScope to add
its custom callback symbols.
So it does it different from gtk-demo, which uses the normal way of
exporting symbols for dlsym() and thereby makes the 2 demos test the 2
ways GtkBuilder uses for looking up symbols.
2019-12-12 19:39:23 +01:00
Matthias Clasen
41bb40feee widget factory: Fix more grid layout fallout 2019-12-09 21:29:03 -05:00
Matthias Clasen
da063a8aa5 Fix up widget-factory ui 2019-11-29 08:34:09 -05:00
Matthias Clasen
be74be0e3b widget-factory: Fix a popover menu
This one is manually constructed, and things have
changed enough for that to break. Fix it up.
2019-11-27 17:41:44 -05:00
Benjamin Otte
b025ee428c builder: Connect signals automatically
gtk_builder_connect_signals() is no longer necessary, because all the
setup that made it necessary to have this extra step is now done
automatically via the closure functions.
2019-11-22 17:42:31 +01:00
Benjamin Otte
27d05102ab builder: Remove user_data argument from gtk_builder_connect_signals()
This is pretty unused and gets in the way of the next steps.

A potential side effect is that for templates the widget was passed as
the user data argument. If that turns out to be important, we have to
special case that situation.
2019-11-22 07:46:18 +01:00
Timm Bäder
542b95e7e8 widget-factory: Remove double border around textview
Replace the scrolledwindow border with two separator on top/bottom.
2019-10-09 16:57:22 +02:00
Timm Bäder
bcd8941769 widget-factory: Skip xml files in background selection dialog
The default contains a xml file for an animated background, so don't try
loading it as a pixbuf.
2019-10-09 16:57:22 +02:00