Commit Graph

1168 Commits

Author SHA1 Message Date
Timm Bäder
58c252d5e6 infobar demo: Adapt to GtkInfoBar changes
Bind GtkToggleButton:active to GtkInfoBar:revealed instead of :visible.
2017-01-12 09:18:52 +01:00
Chun-wei Fan
ea58ebe76d Visual Studio builds: Move project files to win32/
It was suggested that the project files to be moved to win32/, so that we can
have one less layer of directories we need to go down into to reach the project files.
2017-01-09 15:38:48 +08:00
Timm Bäder
1e6fce97a5 gtkfishbowl: Remove gtk_container_snapshot_child call 2017-01-07 18:08:53 +01:00
Benjamin Otte
4fdf880b6e gtk-demo: Make icon counter work from ui file
Gets rid of update always being 1 frame late.
2017-01-07 02:09:40 +01:00
Benjamin Otte
cd8e41e491 gtk-demo: Add GtkFishbowl
Avoids usage of GtkFixed where child properties eat up all the CPU time.
And that's kinda not what I want to benchmark.
2017-01-07 02:09:40 +01:00
Daniel Boles
49c452e4f9 demos/icon-browser: increase default window size
...to get more than 1 row of icons to browse!

https://bugzilla.gnome.org/show_bug.cgi?id=776560

I've bumped the size a bit further, to 1024x768
2017-01-04 13:59:04 -05:00
Benjamin Otte
2f5737cc1c gtk-demo: queue_draw() when the color changes 2017-01-03 23:35:22 +01:00
Matthias Clasen
2cb975ea77 Make gtk4-icon-browser work
It was using no-longer-existing widgets and properties.
2016-12-16 12:18:33 -05:00
Timm Bäder
d45e5ef3dc widget-factory: Use GtkButton:icon-name to construct icon buttons 2016-12-04 12:00:45 +01:00
Emmanuele Bassi
c8b92cb0d2 demos: Remove undefined function call
The gtk_container_set_border_width() function has been removed from
the GTK+ 4.x API.
2016-11-29 23:29:10 +00:00
Matthias Clasen
ee1ae7f9ed gtk-demo: Add a demo for tabs
One of the least-appreciated features in pango.
It deserves a demo.
2016-11-29 16:40:24 -05:00
Matthias Clasen
7625beec50 fishbowl: Fix up initial text
Avoid the text changing from "0 fish" to "0 icons" right
after opening the fishbowl demo.
2016-11-20 06:15:19 -05:00
Benjamin Otte
1912d992d8 gtk-demo: Allow locking of icon count in fishbowl demo
I'm not sure I'm proud of the hack to get the changing icon into the UI
file without having to write code. But it works.
2016-11-20 05:29:03 +01:00
Benjamin Otte
979b56e86f gtk-demo: Update drawing area usage to new APIs
A few demos are broken because they do input on drawing areas.
2016-11-18 06:40:53 +01:00
Matthias Clasen
77aa562415 gtk-demo: Set local-only to FALSE for the file chooser
No good reason for that.
2016-11-17 08:51:16 -05:00
Caolán McNamara
ce36ac93f4 spin entry should be a child of spin context
https://bugzilla.gnome.org/show_bug.cgi?id=774609
2016-11-17 05:55:20 -05:00
Matthias Clasen
23354ff6e7 widget-factory: Better progressbar testing
Hook the two top progressbars up to the scale with marks.
Your turn, Lapo.
2016-11-14 08:21:31 -05:00
Benjamin Otte
2e284451ff gtk-demo: Add fishbowl demo 2016-11-05 03:35:46 +01:00
Chun-wei Fan
21b061b0dd demos/application: Call the right program
We need to update the call to gtk4-application-demo, plus include the
correct icon file for this.
2016-11-02 12:23:41 +08:00
Timm Bäder
5071206d60 widget: Remove app-paintable 2016-10-31 19:28:28 +01:00
Matthias Clasen
50a75b37a9 More gtk-demo spacing fixes 2016-10-26 20:37:23 -04:00
Matthias Clasen
76aeb706ef gtk-demo: Start to fix up the spacing
Replace some cases of lost border-width with margins.
2016-10-26 15:03:04 -04:00
Matthias Clasen
b2284ef48f Fix widget-factory appearance, a bit
Use margins instead of border-width, for now.
2016-10-26 14:42:11 -04:00
Alexander Larsson
723b588b5d Make gdk.la and gsk.la a noninst helper library
This merged gtk, gdk and gsk into one library, making it possible to
have internal private APIs between gtk them, as well as producing more
efficient code.

https://bugzilla.gnome.org/show_bug.cgi?id=773100
2016-10-26 16:34:15 +02:00
Chun-wei Fan
306fd15c34 demos: Fix 'make install'
We need to change gtk-update-icon-cache to gtk4-update-icon-cache, as that tool
has been renamed.
2016-10-26 18:30:09 +08:00
Chun-wei Fan
2ba64e0b62 MSVC builds: Support MSVC 2013 and later
We now need C99 features from the compiler which are only supported by
Visual Studio 2013 and later, so drop the MSVC 2008~2012 projects, and make
the baseline supported Visual Studio version be 2013.  Update the build files
as a result.
2016-10-26 16:46:38 +08:00
Alexander Larsson
70935f0952 Drop support for offscreen GdkWindows
These complicate a lot of GdkWindow internals to implement features
that not a lot of apps use, and will be better achieved using gsk.
So, we just drop it all.
2016-10-25 09:54:37 +02:00
Rico Tzschichholz
2273f5d28e iconset: Remove stray references 2016-10-23 11:12:13 +02:00
Timm Bäder
9992a616ef widget: Use ::measure vfunc to measure size
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
2016-10-22 19:05:47 +02:00
Timm Bäder
3e3eb0187a gtk4-demo: Fix builder demo 2016-10-20 20:12:05 +02:00
Lapo Calamandrei
bec95e55e4 widget-factory: use circular style class on the circular button...
...in place of the circular-button one, killing the custom style
shipped, realying on the theme style.
2016-10-19 16:07:02 +02:00
Chun-wei Fan
8b8f378050 Visual Studio builds: Update from [gdk|gtk]-3 to [gdk|gtk]-4
This updates all the projects files to be be named appropriately as we move from GTK-3.x to 4.x,
and updates the autotools files so that things are distributed and generated properly.

Also remove deprecated/gtkstatusicon-quartz.c from gtk/Makefile.am, as that was causing 'make dist'
to fail as that file has been removed.

This fixes 'make dist' with the updated existing project files in proper order.

Note that this does not include the new GSK, which will be added later, so the project files do
not yet build the whole stack on Visual Studio at this point.
2016-10-19 18:39:36 +08:00
Timm Bäder
8cafd3c5a7 menuitem: Stop implementing GtkActivatable 2016-10-18 00:29:18 +02:00
Timm Bäder
d844abe066 Remove GtkTable 2016-10-18 00:29:18 +02:00
Timm Bäder
7e16396cc5 button: Stop implementing GtkActivatable 2016-10-18 00:29:18 +02:00
Benjamin Otte
dbeeaf7de6 cssprovider: Remove GError out argument from load functions
People should use the GtkCssProvider::parsing-error signal instead.
2016-10-17 16:52:05 +02:00
Benjamin Otte
4df6ddad54 API: container: Remove gtk_container_set_border_width() 2016-10-16 18:18:58 +02:00
Benjamin Otte
1518fe0a8f API: stylecontext: Remove state argument from getters
The argument must always be the current state.
2016-10-16 18:18:58 +02:00
Timm Bäder
5b00a31c30 widget-factory: Stop using custom icon sizes 2016-10-16 18:17:21 +02:00
Timm Bäder
f45dadadd0 box: Remove 'padding' child property 2016-10-16 18:17:21 +02:00
Benjamin Otte
662001b60a API: Remove ability to set visuals on windows
And with it, gtk_widget_get_visual() and gtk_widget_set_visual() are
gone.

We now always use the RGBA visual (if available) and otherwise fall back
to the system visual.
2016-10-16 18:17:21 +02:00
Matthias Clasen
a703ba8406 Avoid 0/FALSE confusion
Since this is supposedly exemplary code, lets get it right.

https://bugzilla.gnome.org/show_bug.cgi?id=772683
2016-10-14 11:15:27 -04:00
Matthias Clasen
565b35ac00 Add new gestures to gtk4-demo
Show the new single-finger swipe gestures in the builder
shortcuts example.
2016-10-13 15:02:36 -04:00
Matthias Clasen
ce74c3a5a5 Re-add missing files 2016-10-07 11:17:49 -04:00
Matthias Clasen
b337b405a3 Make the demos build 2016-10-07 10:34:50 -04:00
Matthias Clasen
74f3d7f6d3 Switch gettext domain from gtk30 to gtk40 2016-10-07 10:34:50 -04:00
Matthias Clasen
d7b446ec06 Add a --version option to gtk3-widget-factory
This was missing, for no good reason.
2016-09-11 11:25:50 -04:00
Matthias Clasen
ac95470c01 Add a --version option to gtk3-demo
This was missing, for no good reason.
2016-09-11 11:25:50 -04:00
Tristan Van Berkom
6be8979c64 Revert "widget factory: Adapt to new scrolled window behavior"
This reverts commit 37e913d76b.

This is no longer needed since the natural size propagation of
scrolled window children is now an optional behavior. Reverting
this also makes the widget factory scrolled window sizes behave
the same as with the gtk+ 3.20 branch.
2016-09-06 20:51:20 +09:00
Matthias Clasen
26f575014d gtk3-demo: Avoid underallocating columns
Setting a fixed width on the columns causes the headers to be
be underallocated. It is not necessary either.
2016-09-04 21:45:31 -04:00
Matthias Clasen
f7c87fb3b7 widget-factory: Fix smooth autoscrolling of scales
There is annoying interference between formatting the value
(for which we set the number of digits to show) and the small
frame-to-frame value changes that we do for autoscrolling.

To work around this, turn off the digits-based rounding entirely
and format the value ourselves with ::format-value.
2016-08-24 12:53:28 -04:00
Matthias Clasen
ceb18a989e gtk-demo: Make the scale demo fully functional
The adjustments need to have step-increment and page-increment
set up, or keynav and autoscrolling will not work.
2016-08-24 11:11:57 -04:00
Carlos Garnacho
5d99b7d538 demos: Use stateful actions for rings/strips in "Touch and Drawing Tablets" demo
https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
ae29157a63 demos: Add pad support to "event axes" demo
And rename it to "Touch and Drawing Tablets", since it's no longer about
"axes" really.

As for pad support in the demo, just keep it "simple", make the
controller handle all pad devices, and make all the actions have the
same callback.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Timm Bäder
bdb77b6cc2 widget-factory: Don't initially show popover
It'll  be set as the popover of a GtkMenuButton later anyway which will
hide it again.
2016-08-10 16:37:17 +02:00
Bastien Nocera
64739f46fc demos: Fix build failure
gtk+/demos/gtk-demo/css_blendmodes.c: In function ‘update_css_for_blend_mode’:
gtk+/demos/gtk-demo/css_blendmodes.c:49:26: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
                          blend_mode);
                          ^~~~~~~~~~

https://bugzilla.gnome.org/show_bug.cgi?id=769236
2016-07-29 11:02:50 -04:00
William Hua
8701e34f74 port to new gtk_menu_popup_at_* () functions
https://bugzilla.gnome.org/show_bug.cgi?id=756579
2016-07-19 09:38:54 -04:00
Matthias Clasen
93f20315d1 gtk3-demo: Simplify the blendmodes example a bit
Just put all of the template into the resource.
2016-07-04 09:59:25 -04:00
Matthias Clasen
507e58df4e gtk3-demo: Make blendmodes example non-resizable
It doesn't need to.
2016-07-03 18:29:21 -04:00
Georges Basile Stavracas Neto
1d93cc2b0b demo: add a demo for blend modes
After introducing the CSS blend mode enum values and including
the background-blend-mode CSS property, it is very important to
actually provide an example of the new feature.

This patch adds a new demo to gtk3-demo which shows how the
background-blend-mode CSS property works.

https://bugzilla.gnome.org/show_bug.cgi?id=768305
2016-07-03 17:24:47 -04:00
Carlos Garnacho
3b98a2d935 demos: Simplify popovers demo
Don't do much unconventional stuff here. This is a demo, not a test.

https://bugzilla.gnome.org/show_bug.cgi?id=767851
2016-06-21 17:56:21 +02:00
Matthias Clasen
e01f35ef5f gtk3-demo: Make the filter model example more interesting
Allow editing values in the first treeview, to see the derived
models update in real time.
2016-06-19 23:54:07 -04:00
Matthias Clasen
815cc23c4c gtk-demo: Use max-content-height in the popover example
This is what the property was invented for.
2016-06-19 23:07:17 -04:00
Matthias Clasen
c2534af15e gtk3-demo: Fix the modelbutton example
The color menu buttons didn't have the necessary target property
to be successfully activated.
2016-06-19 22:56:20 -04:00
Matthias Clasen
2fd984987d gtk-demo: Fix up some warnings
The search entry example was a bit sloppy in cleaning up its
sources, causing warnings.
2016-06-19 22:47:57 -04:00
Matthias Clasen
37e913d76b widget factory: Adapt to new scrolled window behavior
Set a max-content-width on some of the scrolled windows to
keep things looking mostly the same, now that GtkScrolledWindow
passes along the natural size of its child.
2016-06-19 22:16:11 -04:00
Matthias Clasen
5892bd72fa widget-factory: Use max-content-size in a popover
This gives a nice example of these properties in action,
in the "Open" popover on page 3.
2016-06-06 14:35:46 -04:00
Matthias Clasen
d36f866b27 gtk3-demo: Fix some css warnings
Update the font: syntax to follow css.
2016-05-30 16:19:19 -04:00
Matthias Clasen
4b8dfd8825 gtk-demo: Update no-drop cursor image
Adwaita is using a different cursor for this now.
2016-05-17 13:40:52 -04:00
Matthias Clasen
3078f182b0 gtk3-demo: Add context-menu cursor
The Adwaita cursor theme covers this one now.
2016-05-17 13:39:18 -04:00
Matthias Clasen
f8bc35b9a6 Fix scale length
The vertical scales should really be of the same length, so
add an empty value to be drawn by the other scale.
2016-05-10 15:41:03 -04:00
Timm Bäder
7b81b56f7b widget-factory: Let one of the scales draw a value
https://bugzilla.gnome.org/show_bug.cgi?id=766120
2016-05-10 21:24:50 +02:00
Matthias Clasen
ac5b48e40c gtk-demo: Fix revealer demo
This only used by luck before. We are changing a property from the
::notify handler for that property. Now that GtkRevealer is notifying
the property when it stops animations on unmap, we end up in a life
lock situation where we never make it out of the notify queue.

Fix this by not restarting the animation if the widget is unmapped.
2016-05-07 16:22:13 -04:00
Matthias Clasen
c1d1042892 gtk3-demo: Add a close button to the markup window 2016-05-06 20:50:38 -04:00
Matthias Clasen
de3dabc865 gtk-demo: Don't duplicate text in markup example
I forgot to clear the buffer before inserting the new markup. Oops.
2016-05-06 20:47:49 -04:00
Emmanuele Bassi
872b5115ea demo: Add GLES support to the GtkGLArea demo
We need new shaders, and we need to select the correct shader when
building the program we use to render the triangle.
2016-04-25 14:35:02 +01:00
Carlos Garnacho
f1cbd9ca13 demos: Show slider/rotation axes in "Event axes" demo 2016-04-08 17:34:29 +02:00
Carlos Garnacho
48239ad720 gtk3-demo: Add tool information to "Event axes" demo
Print tool type and serial, if found.
2016-04-06 16:12:13 +02:00
Carlos Garnacho
8e917093df demos: Enable multidevice behavior on event-axes demo
On wayland we get separate master/slaves for each tablet, we will
need to receive crossing events for each master pointer if there's
more than one around.
2016-04-06 15:43:29 +02:00
Carlos Garnacho
b465ede53b demos: Set crossing events mask explicitly on event-axes demo. 2016-04-06 15:43:29 +02:00
Carlos Garnacho
89b7f859a4 gtk3-demo: Show multiple master devices on the "Event axes" demo 2016-04-06 15:43:29 +02:00
Stephen Chandler Paul
505dac94be gtk-demo: Add support for distance in event_axes
Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
2016-04-06 15:43:29 +02:00
Stephen Chandler Paul
6c2a078bf2 gtk-demo: Use GdkAxisUse instead of axis labels
Axis labels are very X specific, and are not really possible to port to other
backends such as Wayland. As such, it makes more sense to use GdkAxisUse and
GdkAxisUseFlag in order to determine the axis capabilities of a device and draw
their axes.

Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com>
2016-04-06 15:43:29 +02:00
Matthias Clasen
fab9c17b89 gtk3-demo: Show more button styles
Add examples for suggested-action and destructive-action
buttons in the style classes example.
2016-03-25 22:45:55 -04:00
Matthias Clasen
258ba6c8a4 gtk3-demo: Rename "CSS Theming" group
Call it just "Themeing" to avoid the repetition of CSS.
2016-03-25 22:45:55 -04:00
Matthias Clasen
73fe852be0 gtk-demo: Improve markup demo
Add squiggly underlines and background, and make the markup editable.

https://bugzilla.gnome.org/show_bug.cgi?id=763741
2016-03-21 13:32:40 -04:00
Carlos Garcia Campos
5107c4a75f gtk-demo: Rework foreigndrawing to use sizes from the theme
Instead of hardcoding the size of the widgets. This makes the output
closer to real widgets and fixes the blurry icons. I've also added a
scale.

https://bugzilla.gnome.org/show_bug.cgi?id=763758
2016-03-21 11:45:48 -04:00
Benjamin Otte
07a69b7247 gtk-demo: Fix copy/paste error
http://www.viva64.com/en/b/0383/
2016-03-20 05:32:35 +01:00
Carlos Garnacho
6fd05dfe53 gtk-demo: Handle GDK_TOUCH_CANCEL in event-axes demo
It is a thing in wayland, which means we leave traces from older
touches when the compositor takes over touch sequences in order
to handle a gesture.
2016-03-14 15:30:27 +01:00
Matthias Clasen
b7fd0147f7 gtk-demo: Fix a typo 2016-03-08 08:55:59 -05:00
Matthias Clasen
4357c22a89 gtk-demo: Update foreigndrawing example some more
The scrollbar changes need to take the theme's negative margins
into account.
2016-03-08 08:55:59 -05:00
Matthias Clasen
fdd3c912a0 gtk-demo: Try to fix foreigndrawing scrollbars
The node hierarchy and sizing has changed with the gadgetization
of range widgets.
2016-03-08 08:14:36 -05:00
Matthias Clasen
6d1cdaff7e gtk-demo: Use <accelerator>
Add an example of <accelerator> use in the builder example.
2016-03-05 23:44:03 -05:00
Matthias Clasen
7f9223b0c8 gtk-demo: Fix up the inline-toolbar example
The inline toolbar in the style classes demo should use
the icons toolbar-style to ensure that the buttons are square.
2016-03-04 20:50:21 -05:00
Matthias Clasen
435c8c9f0d gtk-demo: Strip newlines from g_warning and g_error
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Matthias Clasen
0f3a211d35 gtk-demo: Simplify ui files a bit
Strip unneeded IDs.
2016-02-28 00:00:03 -05:00
Matthias Clasen
492fec6294 gtk-demo: Put hte app menu in a separate file
No need to cram it in the same file as the main window.
2016-02-27 23:43:06 -05:00
Matthias Clasen
9d5ad67c91 gtk-demo: Add some padding in sidebar
Add some padding on the right, to avoid the scrollbar and make
the sidebar appear balanced.
2016-02-27 23:35:33 -05:00
Matthias Clasen
87554eb57a widget-factory: Make the sliding opt-in
The sliding is a little disorienting, so turn it off by default
and add a checkbutton for it in the gear menu.
2016-02-27 23:12:15 -05:00
Matthias Clasen
a7a934a60c gtk3-demo: Update css
Clean up any deprecation warnings from the css examples in
gtk3-demo.
2016-02-27 22:39:09 -05:00