Commit Graph

22007 Commits

Author SHA1 Message Date
Lapo Calamandrei
298974b9da Adwaita: colorswatch on selected elements style fix 2014-10-21 16:34:42 +02:00
Lapo Calamandrei
01e6811776 Adwaita: axes borders of notebooks inside frame
This is what the old adwaita did, not having a better solution for
removing double borders, better to have this back even if it can
be problematic in certain cases.
2014-10-21 15:37:39 +02:00
Lapo Calamandrei
51bfa10eed Adwaita: properly fix places sidebar
Forgot to treat treeview background... Some code refactoring in
the process.
2014-10-21 15:37:39 +02:00
Lapo Calamandrei
01b4720ec8 Adwaita: wide paned separator style
...paned separator decoration fixed in the process.
2014-10-21 13:25:17 +02:00
Bastien Nocera
d0f4e73999 gtkwidget: Fix typo in comment 2014-10-21 10:10:50 +02:00
Benjamin Otte
8abc6e06b2 css: Add "-gtk-icon-source: builtin"
... and make it the default. This takes over the meaning from "none" for
this property in that it draws the fallback builtin image.
"none" now literally means no image will be drawn.
2014-10-21 05:53:19 +02:00
Benjamin Otte
7eb3b6c71f stylecontext: fix icon-source extents computation
for the builtin image or invalid matrix case. We used to return invalid
memory in those cases. And that was not good.
2014-10-21 05:53:19 +02:00
Benjamin Otte
57d24f173a render: We use CHECKED now, not ACTIVE
Update docs and custom rendering of checkmarks and radio buttons
2014-10-21 05:53:19 +02:00
Matthias Clasen
4ed98878c6 GtkScrolledWindow: Add documentation
Document the new overlay scrolling APIs, and add some more
documentation for the other touch support: kinetic scrolling
and overshoot.
2014-10-20 23:07:45 -04:00
Matthias Clasen
47ce01116b Add some overlay scrollbar theming to Adwaita 2014-10-20 23:07:45 -04:00
Matthias Clasen
4455266c5b GtkScrolledWindow: Add overlay scrollbars
This commit adds a mode to GtkScrolledWindow in which it puts
narrow, auto-hiding scrollbars over the content, instead of
allocating room for the scrollbars outside of the content. We
use traditional scrollbars if we find a mouse or if overlay
scrolling has explicitly turned off.

For test purposes, GTK_TEST_TOUCHSCREEN can be used to get
overlay scrolling even in the presence of a mouse. The
environment variable GTK_OVERLAY_SCROLLING can also be used
to force overlay scrolling on or off.
2014-10-20 23:07:45 -04:00
Matthias Clasen
1fad6b049b GtkRange: Add a style class during dragging
This will be used to identify a scrollbar is being dragged - we
don't actually need the style class; another way to keep track
of the dragging status would be ok too.
2014-10-20 23:07:45 -04:00
Benjamin Otte
a3995d8c86 stylecontext: Handle querying the wrong state better
When a getter function (like get_color()) is called and the passed in
state doesn't match the current state returned via get_state(), we used
to do a trick: We called save()/set_state() on the context before
getting the values.

Unfortunately, since 3a337156d1 this
has the unfortunate side effect that it also creates a child element.
This breaks various old codebases (spinbutton has been fixed in
998feeb2bc, Webkit is fixed in
https://bugs.webkit.org/show_bug.cgi?id=137803 ) unfortunately.

So instead, look up the values manually ensuring that no child element
is created but the correct state is used.
2014-10-21 03:03:28 +02:00
Benjamin Otte
caf709bb81 stylecontext: Return a ref in lookup_values_for_state
This will be necessary when we stop caching values for lookups with the
"wrong" state.
2014-10-21 03:03:28 +02:00
Benjamin Otte
cc2f2dd9b8 computedvalues: Add to_string() and print() functions
The functions are unused. But they are very convenient to use from a
debugger, if you know what I mean...
2014-10-21 03:03:28 +02:00
Benjamin Otte
4cc4e18d56 stylecontext: Don't copy CSS values on context_save()
Keeping them is a bad idea now where the widget paths are actually
changed by a save(). And almost all of the time, state or style classes
will be changed anyway.

Looking them up again is just a hash table lookup anyway.
2014-10-21 03:03:28 +02:00
Benjamin Otte
57cafc277b stylecontext: Use node declaration in hash
Don't use the StyleInfo anymore.
2014-10-21 03:03:28 +02:00
Benjamin Otte
5c2c659122 stylecontext: Split out functionality into custom object
GtkCssNodeDeclaration is a new struct with copy-on-write semantics.

It encapsulated the properties used to define a node in the CSS tree.

The idea is to use it in various places for caching, in particular as
key in hash tables.
2014-10-21 03:03:28 +02:00
Carlos Garnacho
ca9d15df92 scrolledwindow: Add ::edge-overshot signal
This signal is emitted whenever user scrolling hits the overshoot
edge in the given direction. May be useful to add "reload" or "load
more" behaviors in apps.

https://bugzilla.gnome.org/show_bug.cgi?id=738534
2014-10-20 18:52:43 +02:00
Lapo Calamandrei
c84f544fc3 Adwaita: GtkPlacesSidebar treeview text color fix
With my latest changes we have a darker text color for views and
entries (which I assume are content), the places sidebar is totally
chrome though so it needs the chrome text color back.
2014-10-20 15:25:30 +02:00
Matthias Clasen
cf0c9eb158 GtkPaned: Add a "wide-handle" property
This can be used by applications to indicate that a paned is expected
to be actively used by the users for configuring the UI, and needs
a prominent handle.

https://bugzilla.gnome.org/show_bug.cgi?id=738860
2014-10-20 08:50:53 -04:00
Matthias Clasen
d7b64c63e0 Improve tooltip-text/markup docs
Clarify priorities between the two,
https://bugzilla.gnome.org/show_bug.cgi?id=681185
2014-10-19 23:28:34 -04:00
Matthias Clasen
a8f4269157 GtkAboutDialog: Don't shout
Don't use all-caps in the UI - it looks scary.

https://bugzilla.gnome.org/show_bug.cgi?id=671138
2014-10-19 23:16:06 -04:00
Matthias Clasen
e3ef5d6fd2 GtkTooltip: Move nonexported API to a private header
This is our standard practice nowadays.
2014-10-19 22:51:21 -04:00
Matthias Clasen
3f5d462305 GtkToggleButton: Move nonexported API to a private header
This is our standard practice nowadays.
2014-10-19 22:42:49 -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
8889565735 GtkSpinButton: Simplify code
No need to explicitly specify a parser function, it will be
correctly guessed from the property type.
2014-10-19 22:07:19 -04:00
Matthias Clasen
f5d9644591 GtkMenuItem: Simplify code
No need to explicitly specify a parser function, it will be
correctly guessed from the property type.
2014-10-19 22:06:37 -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
d3aa9df876 Forgotten file 2014-10-19 20:03:42 -04:00
Matthias Clasen
f678e48a08 GtkFileChooser: Make preview update more understandable
Implement Federico's suggestion:
In single-selection mode, just use the selected row,
In multi-selection mode, use the cursor row as long as it is
in the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=154709
2014-10-19 17:54:28 -04:00
Thomas Lange
a6ae8f6d96 aboutdialog: Mark strings as translatable
https://bugzilla.gnome.org/show_bug.cgi?id=730893
2014-10-18 22:56:28 +02:00
Sébastien Wilmet
2e68e4fc09 docs: documentation for GtkTextBufferClass
It'll most probably be more useful in the near future.
2014-10-18 19:28:40 +02:00
Matthias Clasen
f7ede4edca Fix a few typos 2014-10-18 12:53:30 -04:00
Matthias Clasen
c5c21bb1cf GtkWindow: Add a getter for the custom titlebar
This is needed for the glade integration of CSD windows.
2014-10-18 12:51:30 -04:00
Lapo Calamandrei
213274c128 Adwaita: darken a tiny bit more bright variant background color 2014-10-18 18:02:20 +02:00
Lapo Calamandrei
062f450709 Adwaita: add back text color.
See https://bugzilla.gnome.org/show_bug.cgi?id=726316 for details.
2014-10-18 17:27:15 +02:00
Lapo Calamandrei
9ea894a56d Adwaita: comment exported colors 2014-10-18 16:29:19 +02:00
Carlos Garnacho
cfaec2d2f5 gtkgesturesingle: Unset button/sequence if parent handle_event failed
There are legit reasons for GtkGesture::handle_event to return FALSE,
GtkGestureSingle objects should be unsetting the current button/sequence
if that happens, in order to avoid inconsistent states.

https://bugzilla.gnome.org/show_bug.cgi?id=738591
2014-10-17 21:16:56 +02:00
Lapo Calamandrei
e46d23d819 Adwaita: darkened a tiny bit bright variant background
Trying to differentiate a bit more the focused window from the
backdrop ones.
2014-10-17 20:36:25 +02:00
Lapo Calamandrei
9dab00310d Adwaita: use $backdrop_fg_color where it should
.background:backdrop was not using that one so some labels didn't
look right in backdrop.
2014-10-17 20:11:25 +02:00
Lapo Calamandrei
c044220f62 Adwaita: dimmed backdrop foreground color
To make focused window more evident.
2014-10-17 20:11:25 +02:00
Matthias Clasen
8821d488c5 GtkWindow: Avoid an early exit
When gtk_window_set_titlebar (win, NULL) is called, we were taking
an early exit and forgot to re-map the window. This does not normally
happen in practice, but glade is about to get a 'csd' switch which
lets one toggle back and forth between titlebar and no titlebar.
2014-10-17 13:59:39 -04:00
Matthias Clasen
1a1c30adfa GtkEntry: plug a small memleak
GtkEntry was leaking a pango attribute list, if one was set.
2014-10-16 21:48:11 -04:00
Lapo Calamandrei
ed25153f2d Adwaita: fix stack-switcher button outline offset
See https://bugzilla.gnome.org/show_bug.cgi?id=738636
2014-10-16 20:05:12 +02:00
Benjamin Otte
998feeb2bc spinbutton: Set the correct state on the button contexts
With the recent save-is-child changes, using
  gtk_style_context_get_padding (context, different_state)
will now open a subelement.

This is not what we want, so we check the state whenever we get the
button contexts.
2014-10-16 17:18:34 +02:00
Lapo Calamandrei
d644b2260f Adwaita: ease-out-quad in place of ease-out
Generally changed the transition timing function to ease-out-quad
which is described by cubic-bezier(0.25, 0.46, 0.45, 0.94), feels
better to me.
2014-10-16 14:36:23 +02:00
Lapo Calamandrei
111f72e891 Adwaita: list row hover color
Now it's based of fg color, so the list row gets darker on the
bright variant and brighter on the dark variant, similarly to what
we do for spinbutton buttons.
2014-10-16 14:23:24 +02:00
Lapo Calamandrei
52e91f1f74 Adwaita: tweak list row transition
Thanks to Carlos Soriano expertise.
2014-10-16 14:15:15 +02:00