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.
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.
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
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
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
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.
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.
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.
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>
The font features demo started calling the Harfbuzz API directly
starting from commit 9de3b24c20. Harfbuzz
is an implicit dependency of Pango on some platforms, but it's not part
of the public dependencies; this means that we cannot expect to link to
Pango and automatically get Harfbuzz symbols to link against —
especially when things like --as-needed are in play.
This change triggered build failures on non-Unix platforms, fixed by
commit 2a9967731a, as well as build
failures in Continuous, with this error message:
/usr/lib/gcc/x86_64-gnomeostree-linux/4.9.3/../../../../x86_64-gnomeostree-linux/bin/ld:
font_features.o: undefined reference to symbol 'hb_tag_to_string'
//lib/libharfbuzz.so.0: error adding symbols: DSO missing from command
line
collect2: error: ld returned 1 exit status
In order to get the font features demo to build everywhere we should
take an explicit, though optional, check on Harfbuzz, and conditionally
build the font features demo with the right compiler and linker flags.
The fonts features demo now uses fontconfig APIs via PangoFT2, which makes
the code not build on non-Linux, so only include this demo in the build
on UNIX.
Add more features to the list, allow selecting script/language
from the set that is supported by the font, indicate which
features are present in the font for the selected script/language,
and expand the default specimen to cover latin, cyrillic and
greek.
1e1064398c broke the build.
When I run make, I should make sure to run it in the right directory.
And not in the gtk/ subdirectory that will never build widget-factory...
The clipboard emit events after the button we connected it to was
already destroyed (on application close for example), so make sure we
don't try to use that dead button.
Its very easy to get extra references to the NativeDialog so that
when you release your last reference any visible dialog is not
hidden. We handle this by adding a destroy method similar to how
you destroy regular toplevels.
When I added the draw_layer vfunc it accidentally got passed a cairo_t
that was configured with to draw in the viewport coordinate space (rather
than the buffer coordinate space). This makes things unnecessary complex,
because you have to convert between the two.
The pixel cache is shared between the text and the layers, so there is
no way to use draw_layer to get a stationary overlay effect. Thus it makes
much more sense for the draw_layer vfunc to draw in the buffer space.
Just changing this would break ABI for existing code, so this is fixed
by adding new layer types and deprecating the old ones.
Also, we use the new layer types to fix gtk3-widget-factory.
https://bugzilla.gnome.org/show_bug.cgi?id=757856
This commit add some more keyboard shortcuts to gtk3-widget-factory,
and adds a help overlay documenting them. This examle uses the
automatic resource loading support in GtkApplication.
GTK cannot depend on libcanberra-gtk which depends on GTK. This causes
a circular dependency and is especially neat if installed GTK is
different enough from uninstalled GTK.
Use the common automake module from the previous commit in the
Makefile.am's, which means that the Makefile.am's in gdk/ and gtk/ can be
cleaned up as a result. As a side effect, the property sheet that is used
to "install" the build results and headers can now be generated in terms of
the listing of headers to copy during 'make dist', where we can acquire
most of the list of headers to "install", so that we can largely avoid the
situation where the property sheet files are not updated in time for this,
causing missing headers when this build of GTK+ is being used.
Also use the Visual Studio Project file generation for the following
projects:
gtk3-demo
gtk3-demo-application
gtk3-icon-browser
gdk-win32
gdk-broadway
gail-util
So that the maintenace of these project files can be simplified as well.
https://bugzilla.gnome.org/show_bug.cgi?id=681965
Add a --run option which takes the name of an example and
launches it. Also add a --autoquit option which can be used
to quit after a given number of seconds.
The application demo had a "Blue" and a "Bold" menuitem both with
the Ctrl-B accel. This is confusing, since only one of them works.
Change the accelerator for bold to Ctrl-Shift-B, so they both work.
Add all 388 tweets of the @GTKtoolkit account. This shows the
performance behavior of the listbox (not good with that many rows) and
allows us to quickly notice when things get worse (or better).
And just so I have a place where I can dump how I generated this file:
First, I got Timm Bäder to download me the json for the twitter feed
into a file gtk.json, then I ran the jq tool on it like this:
jq ".[] | if .retweeted_status then .retweeted_status.user.name + \"|\"
+ .retweeted_status.user.screen_name else .user.name + \"|\" +
.user.screen_name end + \"|\" + .text" gtk.json | cat -n | sed
"s/\\s*\([0-9]*\)\t\"\(.*\)\"/\\1|\\2/" > messages.start
jq ".[] | .created_at" gtk.json | sed "s/\"\(.*\)\"/\1/" | while read
in; do date +%s -d "$in"; done > dates
jq ".[] | \"0|\" + if .retweeted_status then .user.screen_name else \"\"
end + \"|\" + (.favorite_count | tostring) + \"|\" + (.retweet_count |
tostring)" gtk.json | sed "s/\"\(.*\)\"/\\1/" > messages.end
paste -d\| messages.start dates messages.end > messages.txt
This whole machinery of going through 3 intermediate files was only
necessary to onvert the dates from ISO format to unix timestamps,
otherwise this could have been a single line.
Since demos.h is now generated according to the platform for which GTK+ is
built, don't distribute it. Generate a Windows-specific demos.h.win32 and
distribute that instead, in which the Visual Studio build files will copy
it to demos.h, so that the build will proceed normally.
https://bugzilla.gnome.org/show_bug.cgi?id=749622
Add bold/italics/underline styling to the context menu of
the 'Lorem ipsum...' text view in page 1. The point is not
to show good UI for this kind of styling, but to demonstrate
custom actions in the context menu / touch selection.
To generate the icon cache files.
We want to avoid a dependency loop if possible; additionally, on some
Debian-based systems gtk-update-icon-cache maps to the GTK2 version of
the utility and the GTK3 version is renamed to
gtk-update-icon-cache-3.0.
To avoid a build dependency on GTK2, use the binary that we just built
in-tree.
https://bugzilla.gnome.org/show_bug.cgi?id=749593
The other Radio* widgets have this convenience method that removes the
memory management of the opaque GSList used to handle the group from the
API usable from language bindings (especially the ones not based on
introspection).
This commit adds gtk_radio_menu_item_join_group().
https://bugzilla.gnome.org/show_bug.cgi?id=671362
When removing all rows, trying to add rows would not work
and throw criticals. This is fallout from a recent change
to insert rows at the right position. Fix this by handling
the 'empty model' case separately.
https://bugzilla.gnome.org/show_bug.cgi?id=743157
Adding rows to the bottom of the list is confusing as you cannot see
them if the window is small so it is not apparent that anything has
happened. Fix this by adding the new row immediately below the current
row and set the cursor on the new row so it is ready to be edited.
https://bugzilla.gnome.org/show_bug.cgi?id=721939
We really want margins around the scrollable content, not around
the viewport. Make it so by using textview-specific properties.
This is unfortunately a little complicated for top/bottom.
"Hey I know, let's do an easter egg!"
"What kind of easter egg?"
"We can nest lots of textviews!"
"Sounds cool!"
...
"But how does one see a textview inside a textview?"
"What do you mean?"
"Well, it just looks like black text on a white background."
"You mean it's the same as if we just duplicated the text?"
"Yeah!"
"Hrm, maybe we can put a frame around it."
"Sounds good. I'll stuff the textviews in a GtkFrame."
"What? Why? Let's use a GtkEventBox and override its background"
"Why is that a good idea when we have GtkFrame?"
"Because I said so!"
"Okay."
Overriding the background color for a color swatch is wrong. The color
is not the background, it's the foreground, so it should be painted in
a draw signal handler.
GtkSidebar behaves internally much like GtkStackSwitcher, providing a vertical
sidebar like widget. It is virtually identical in appearance to the widget
currently used in GNOME Tweak Tool.
This widget is connected to a GtkStack, and builds its own contents as a
GtkListBox subclass, using the "title" child property to provide a consistent
navigatable widget.
Being a subclass of GtkListBox it benefits immediately from strong keyboard
navigation, and minimal changes are required for theming.
https://bugzilla.gnome.org/show_bug.cgi?id=735293
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
Loading a builder file with a window leaves a ghost behind, since
windows need to be explicitly destroyed. Avoid that by using
gtk_builder_add_objects_from_resource.
Add rows with buttons and checkboxes to the listbox example
on page 2, and make the switch in row 1 toggle selection mode,
to test various cases of widgets in 'selected context'.
... for displaying resources. Instead use the proven and way more
reliable method of trial and error.
It's less code and more portable for a start.
But most of all it displays PNM files as text if you fail to compile
the gdk-pixbuf loader for it.
As a noinst_PROGRAMS, the libtool generated for cross-compiling will be
used, which will mess up the linking. Create a all-local target instead.
Also ensure that building uses always a native version of the tool by
specifying a GTK_UPDATE_ICON_CACHE automake variable.
Finally "config.h" has been created to work for the target platform and
causes problem when cross-compiling. So we temporarily generate a basic
config.h which contains only the strict minimum.