Commit Graph

342 Commits

Author SHA1 Message Date
Philip Withnall
3d88899072 gtk: Fix various tiny typos in documentation comments
e.g. Invalid syntax in introspection annotations, typos in object names,
accidentally using a gtk-doc comment for an internal function.
2015-02-18 11:38:37 +00:00
Benjamin Otte
808bfe0a98 settings: Provide a default style cascade per scale
This guarantees we only create 1 extra style cascade in total for hidpi
and not one per style context.

Style cascades are now nested like this:

GtkSettings root cascade (scale == 1)
 |
 +-- GtkSettings per scale cascade (for any scale, no custom providers)
 |
 +-- GtkStyleContext custom cascade (for any scale, custom providers)

This requires a bunch of care when changing cascade-related properties
inside GtkStyleContext, so that it ends up with a properly setup
cascade, but I think I got those cases right.

The only thing we don't do yet is reverting to a GtkSettings cascade
when the last custom provider is removed from a custom cascade.
2015-02-06 11:26:31 +01:00
Matias De lellis
7ff3ef3e68 GtkSettings: Consider default settings for font hinting and antialias
Arrange things so that gtk-xdg-hinting==-1 and gtk-xfg-antialias==-1
end up as CAIRO_HINT_STYLE_DEFAULT and CAIRO_ANTIALIAS_DEFAULT in the
cairo font options.

This will not change anything on Linux desktops where xsettings will
always provide values different from -1. But on other platforms, we
can benefit from getting the platform-specific defaults in cairo.

Based on the first patch in:
https://bugzilla.gnome.org/show_bug.cgi?id=735316
2015-01-30 18:29:53 -05:00
Benjamin Otte
b49c7c3421 styleprovider: Fold get_change() vfunc into lookup() 2014-12-10 03:49:40 +01:00
Matthias Clasen
32e8c39ffd Move print preview command to gtksettings.c
Having this in the source seems more appropriate.
2014-11-30 23:43:52 -05:00
Matthias Clasen
10f3d330be Fix docs for gtk_settings_set_property_value 2014-10-22 00:32:38 -04:00
Matthias Clasen
ce915dc6f0 Deprecate gtk_settings_install_property APIs
These are not useful outside GTK+.
2014-10-19 22:33:24 -04:00
Matthias Clasen
4f5db65a06 Deprecate some GtkSettings api
The gtk_settings_set_...property functions don't really add
anything over g_object_set(), and we never documented them.
2014-10-19 21:22:02 -04:00
Matthias Clasen
c8a6b8786a Clarify GtkSettings documentation
Just recommend g_object_set to override settings. The
gtk_settings_set_..._property functions don't really add
any value.
2014-10-19 20:47:05 -04:00
Matthias Clasen
1d8a1a04f6 Add settings for titlebar actions
These match the GSettings that mutter/metacity/gnome-shell have
for this. We change the default for the middle-click action to
none, since lower is just a terrible default.

We're slightly bending the rules here, since we're adding new
settings after .0, but a) it is just barely after .0, and b) settings
are not really application API.

https://bugzilla.gnome.org/show_bug.cgi?id=729782
2014-09-25 14:54:02 -04:00
Matthias Clasen
18931cf0db GtkSettings: Add a private getter for the source
Settings have a little more metadata than plain properties. They
can come from different sources. Make this information available
so we can show it in the inspector.

https://bugzilla.gnome.org/show_bug.cgi?id=736971
2014-09-22 19:40:49 -04:00
Руслан Ижбулатов
694c8d32d5 Fix various warnings about unused things
https://bugzilla.gnome.org/show_bug.cgi?id=734735
2014-08-13 23:38:47 +00:00
Owen W. Taylor
fc6e2cc4b2 Handle resolution changes in the GDK backend code
gdk_x11_display_set_window_scale() affects the interpretation of the
Xft/DPI XSETTING - it is substituted inside GDK with the value of
Gdk/UnscaledDPI xsetting. However, this change is not propagated to
GTK+ and from GTK+ back to gdk_screen_set_resolution() until the
main loop is run.

Fix this by handling the screen resolution directly in gdk/x11.
This requires duplication of code between GDK and GTK+ since we still
have to handle DPI in GTK+ in the case that GdkSettings:gtk-xft-dpi
is set by the application.

https://bugzilla.gnome.org/show_bug.cgi?id=733076
2014-07-13 15:35:23 -04:00
Matthias Clasen
f547466029 Make Adwaita the default theme across platforms
This ensures that we have a polished out-of-the-box appearance
on all platforms.
2014-07-09 21:19:09 -04:00
Matthias Clasen
6abcda8391 Use a define for the default icon theme name
We're using this name in two places, so match what we are doing
for the default theme name, and use a macro.
2014-07-09 21:18:18 -04:00
Matthias Clasen
196b9f8eea GtkSettings: fully undeprecate blink settings
We decided in f8412eca34 that
we still need to react to these for a11y reasons, but left
the (then) harmless property deprecation in place. Now, the
deprecation causes runtime warnings for merely reading the
property, so drop it.

https://bugzilla.gnome.org/show_bug.cgi?id=732667
2014-07-03 08:35:34 -04:00
Matthias Clasen
1cd9ba187e GtkSettings: defensive defaults
Change the default value of the gtk-decoration-layout setting
to menu:minimize,maximize,close. The masses want it that way.
2014-06-27 21:29:18 -04:00
Evan Nemerson
07d825574f gtk: add missing type annotations ported from Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:33 -07:00
Matthias Clasen
2488b954f2 Don't use hicolor as the default icon-theme
The icontheme lookup code has a special-case that prefers builtin icons
if the theme name is "hicolor". This is problematic for our reftests,
which run in a barebones environment with not settings.
2014-05-26 23:17:32 -04:00
Carlos Garnacho
1403ebb097 settings: Add gtk-long-press-time setting
This setting determines the duration of a button/touch press to
be considered a long press.
2014-05-23 19:54:24 +02:00
Matthias Clasen
49cf5142ba Deprecate GdkColor
It has been replaced by GdkRGBA. Time to make it official.
http://bugzilla.gnome.org/show_bug.cgi?id=636695
2014-05-22 09:09:55 -04:00
Matthias Clasen
e5a1734ce9 docs: enum cleanup
scrolledwindow part 2
2014-05-20 09:54:01 -04:00
Matthias Clasen
ca79019586 GtkSettings: load modules from settings.ini
The initialization is really suboptimal here. This fix at least
makes it so that we don't forget to load modules.

https://bugzilla.gnome.org/show_bug.cgi?id=730306
2014-05-19 14:09:16 -04:00
Matthias Clasen
644f08a771 Remove debug spew 2014-05-07 06:51:51 -04:00
Volker Sobek
f8b6bfe744 docs: Remove '\' escape character from literals
commit 7f6a964c47 replaced entities, but
escaped the replacement text also inside literals, which resulted in the
escaping '\' to also appear in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=727322
2014-04-04 01:24:35 -04:00
Matthias Clasen
15004e5930 Allow selecting a dark variant with GTK_THEME
Dark themes need to be debugged, too.

Author:    Matthias Clasen <mclasen@redhat.com>
2014-03-06 19:30:33 -05:00
Matthias Clasen
fac8d6deea Allow applications to use gtk-menu-bar-accel in 3.12
gnome-terminal is still using this setting, so we'll let
applications override it for another cycle. It is no longer
backed by a system-wide setting, though, and it will still
go away eventually.

This partically reverts b26c74e5da
2014-03-03 18:58:36 -05:00
Matthias Clasen
ba0542dc51 Allow applications to use gtk-enable-mnemonics in 3.12
gnome-terminal is still using this setting, so we'll let
applications override it for another cycle. It is no longer
backed by a system-wide setting, though, and it will still
go away eventually.

This partically reverts 7e3a494fac
2014-03-03 18:58:26 -05:00
William Jon McCann
e3df44c6f7 Don't leak the theme name 2014-02-21 15:22:38 -05:00
Benjamin Otte
6de50aa7d9 settings: Store style cascade in settings object
This ensures that the initialization for the CSS theme happens when the
style cascade gets queried.

https://bugzilla.redhat.com/show_bug.cgi?id=1064922
https://bugzilla.mozilla.org/show_bug.cgi?id=972382
2014-02-20 02:10:07 +01:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
c779b42476 Docs: use // for comments in examples
Without sgml mode, we can't escape /* as /&ast; anymore,
so just switch to // for comments in examples.
2014-02-14 23:34:22 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
0ce016650b docs: Use markup for links 2014-02-07 09:42:12 -05:00
William Jon McCann
8ad75bdfff docs: don't use <replaceable> 2014-02-04 19:20:16 -05:00
William Jon McCann
5dd751f006 docs: don't use ulink. use markdown instead 2014-02-04 18:53:51 -05:00
William Jon McCann
a22358c0c0 docs: use ` instead of <literal> 2014-02-04 18:24:29 -05:00
William Jon McCann
50e06e11ee docs: use markdown instead of <filename> tags 2014-02-04 16:58:53 -05:00
William Jon McCann
4c8bd8e7cf docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
768bc44081 docs: use |[ ]| instead of <programlisting></programlisting>
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
974e930fb8 Use a define for the default theme name 2014-01-24 08:08:34 -05:00
William Jon McCann
5a4a99a97f docs: fix links to docs 2014-01-21 22:40:55 -05:00
William Jon McCann
ae3fbdb15a docs: don't use type syntax on things that aren't 2014-01-21 18:57:40 -05:00
Matthias Clasen
3701de14a1 Add a setting for dialog headers
This setting will let us keep traditional appearance
of dialogs on platforms where this is expected.
The new setting is called gtk-dialogs-use-header, backed
by the Gtk/DialogsUseHeader xsetting.
2014-01-17 17:52:08 -05:00
Matthias Clasen
7e1a4800fa Redo header bar decorations once more
Applications need a way to fix or adapt the decoration layout,
for situations like split header bars. Setting the layout from
the theme with a style property did not offer a good way to do
this, and the ::show-close-button property does not provide
fine-grained control.

To improve the situation, move the layout string to a property of
GtkHeaderBar which is backed by a setting. This allows platforms to
set a default button layout independent of the theme, while applications
can override the default.

The style GtkWindow style property is now deprecated and ignored.
2013-12-21 21:58:24 -05:00
Matthias Clasen
21114071ec Change the default for "show-desktop" back to TRUE
Change the GtkSettings default for "shell-shows-desktop" back to TRUE
and also change the default value of the "show-desktop" property on
GtkPlacesSidebar so that the defaultvalue test passes.

https://bugzilla.gnome.org/show_bug.cgi?id=712302
2013-11-26 14:21:01 -05:00
Matthias Clasen
df2b534042 GtkSettings: make show-desktop default to FALSE
This broke tests.
2013-11-15 07:49:50 -05:00
Ryan Lortie
a90bb7de0e Add a GtkSetting for 'shell-shows-desktop'
Add a GtkSetting for whether the desktop shell is showing the desktop
folder icons.

This is on by default because most desktop shells do show the icons on
the desktop.  We already have a patch in gnome-settings-daemon to bind
this to the org.gnome.desktop.background show-desktop-icons GSettings
key which is off by default on GNOME.

https://bugzilla.gnome.org/show_bug.cgi?id=712302
2013-11-14 15:03:04 -05:00
Alexander Larsson
4226f97d54 broadway: Support ipad on-screen keyboard
We add a custom im module for broadway that calls some broadway
specific APIs to show/hide the keyboard on focus in/out. We then forward this
to the browser, and on the ipad we focus an input field to activate
the keyboard.
2013-11-13 12:23:06 +01:00
Jasper St. Pierre
1e70ad1cd1 gtksettings: Allow setting the GTK+ theme with an envvar
To test with Raleigh much easier.
2013-11-01 16:04:02 -04:00