Commit Graph

21610 Commits

Author SHA1 Message Date
Lapo Calamandrei
6b0e4ba789 Adwaita: no edge hilight for popover checks/radios 2014-08-27 18:29:32 +02:00
Benjamin Otte
de061a83a4 modifierstyle: Remove the changed signal
It's been unused since last commit
2014-08-27 17:57:10 +02:00
Benjamin Otte
01d644b7ee widget: Don't connect to GtkModifierStyle::changed
Changes to the modifier style will be picked up by the
GtkStyleProviderPrivate::changed signal. And that signal will actually
invalidate properly.
2014-08-27 17:57:10 +02:00
Carlos Garnacho
e6199af60d treeview: Reset multipress controller after 2nd click
The pre-gestures code used to compare the current button press with the
previous one on !activate_on_single_click, and unset the previous event
data so ::row-activated would be emitted every 2 clicks.

So do the same with the multipress gesture and reset it after every 2nd
click to have ::row-activated emitted multiple times while manic clicking.

https://bugzilla.gnome.org/show_bug.cgi?id=735353
2014-08-27 17:12:52 +02:00
Ikey Doherty
6e1ef76480 Cleanup invalid comments (duplication of words)
https://bugzilla.gnome.org/show_bug.cgi?id=735301

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2014-08-26 19:55:38 -04:00
Carlos Garnacho
ea830aee5d button: Track gesture point to maintain priv->in_button
This makes the active state work invariably with both mouse/touch, and
regardless of X11 pointer emulation being friendly and sending crossing
events for the emulated pointer events in the latter.

This makes GtkButtons' active state look correct when pressing on
touchscreens on wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=731380
2014-08-26 23:21:24 +02:00
Carlos Garnacho
d04d29f26c entrycompletion: Mark popup window as subsurface on wayland
This will make the completion window use GDK_WINDOW_SUBSURFACE and be
shown relative to the parent window without involving compositor grabs.

https://bugzilla.gnome.org/show_bug.cgi?id=695504
2014-08-26 23:06:02 +02:00
Carlos Garnacho
c38651cac4 gtkwindow: Add private API to mark as subsurface
This is a rather hackish way to let GTK+ widgets declare popup windows
as subsurfaces, so they may work on wayland without the need of xdg_popup,
and without many changes yet on the GTK+ side.

https://bugzilla.gnome.org/show_bug.cgi?id=695504
2014-08-26 23:06:01 +02:00
Lapo Calamandrei
6574d99adf Adwaita: menu checks and radios making sense 2014-08-26 20:32:36 +02:00
Lapo Calamandrei
a02b8e06a4 Adwaita: set a background for GtkTextView
Needed for gedit line numbers, overridden by .view {} normally
2014-08-26 19:54:41 +02:00
Lapo Calamandrei
a65acc7e8d Adwaita: minor fixes to GtkLabel 2014-08-26 19:24:44 +02:00
Lapo Calamandrei
e9a3d42473 Adwaita: take rtl into consideration for GtkAssistant 2014-08-26 18:02:28 +02:00
Lapo Calamandrei
a677205dca Adwaita: GtkAssistant tweakings 2014-08-26 17:51:45 +02:00
Lapo Calamandrei
c942389adb Adwaita: treeview checks/radios minor fix
Superfluous icon shadow in checked hover state removed.
2014-08-26 16:56:22 +02:00
Lapo Calamandrei
9585de7832 Adwaita: in app notification fixes 2014-08-26 16:54:19 +02:00
Carlos Garnacho
bb3a8edb9f scalebutton: Handle smooth scroll events
This has the double effect to make scale button truly smooth, and make
scrolling work on wayland, since all scrolling is "smooth" there.

https://bugzilla.gnome.org/show_bug.cgi?id=720269
2014-08-26 14:54:08 +02:00
Jakub Steiner
dd464513a3 Revert "Adwaita: notebook background"
Not a good solution to the problem at hand (gedit line numbering)

This reverts commit fde03c1f81.
2014-08-26 14:08:47 +02:00
Jakub Steiner
fde03c1f81 Adwaita: notebook background 2014-08-26 12:32:05 +02:00
Paolo Borelli
290a19e93d TextView: clear the background using the default bg color
Try to tidy up how the background is set on the textview:
 *) the .view class should be applied only to the text window, not
    to the margins
 *) when setting the background on the margins we must use .left etc
 *) use context_set_bg instead of manually setting the color

https://bugzilla.gnome.org/show_bug.cgi?id=735368
2014-08-26 09:55:53 +02:00
Matthias Clasen
d5876e99f5 GtkTreeView: Avoid a crash with empty trees
The gesture code was assuming that the rb tree exists, which
will not be the case if the treeview is empty.

https://bugzilla.gnome.org/show_bug.cgi?id=735300
2014-08-26 00:06:23 -04:00
Jakub Steiner
318555ca26 Adwaita: define styling for location-bar toolbars
- same inset style as searchbars
2014-08-25 19:20:49 +02:00
Jakub Steiner
3bad6d1367 Adwaita: legible labels in headerbars in selection mode 2014-08-25 15:24:44 +02:00
Jakub Steiner
514a3c62d7 Adwaita: selection-mode checked togglebuttons
- exposed in gnome-contacts for example.
2014-08-25 15:18:58 +02:00
Jakub Steiner
61d0ea054f Adwaita: selected text in GtkLabel
https://bugzilla.gnome.org/show_bug.cgi?id=735310
2014-08-25 15:08:45 +02:00
Sébastien Wilmet
6525a11b8d inspector: fix a crash in the CSS editor
gtk_css_section_get_end_position() can return a position one byte beyond
the end of the last line.

gtk_text_buffer_get_iter_at_line_index() accepts only valid
line_number/byte_index pairs. Another solution is to make the
GtkTextBuffer function less strict, by returning a boolean if the exact
position was found.

The CSS parser should also be fixed to always return valid positions.
But it's better to have a safety net in the CSS editor, just in case (a
warning could be print).

https://bugzilla.gnome.org/show_bug.cgi?id=735337
2014-08-25 14:25:09 +02:00
Garrett Regier
907dae414a Ref the popover before activating the item
Otherwise the item could cause the popover to be destroyed,
for example a Quit item, and cause a warning to be printed.
2014-08-23 07:51:59 -07:00
Matthias Clasen
08066b1009 GtkAboutDialog: Drop visibility-notify-event handler
The signal is deprecated, and the handler is only helping
for a really tiny corner case anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=734961
2014-08-23 01:28:14 -04:00
Jakub Steiner
96dae4b86e Adwaita: use osd style for in-app notifications 2014-08-22 18:19:21 +02:00
Lapo Calamandrei
d0eb69a56c Adwaita: added a workaround to make sass behave 2014-08-22 17:27:07 +02:00
Matthias Clasen
00543f1781 GtkColorChooser: Make color plane react to mouse again
Fallout from changing the defaults for gesture properties.
2014-08-22 11:21:52 -04:00
Lapo Calamandrei
6ece90301e Adwaita: dark active buttons for osd 2014-08-22 16:55:23 +02:00
Lapo Calamandrei
2ad15d1713 Adwaita: @define-color "compatible" with sass 3.4.0 2014-08-22 14:55:04 +02:00
Carlos Garnacho
5bc437d2bc textview: Unset bubble timeout ID right after requesting the clipboard
The timeout ID used to be unset after we got the targets from the
clipboard, but there's still a moment between the clipboard request and
the GDK_SELECTION_NOTIFY event that the ID points to an already gone
timeout.
2014-08-22 13:24:56 +02:00
Lapo Calamandrei
d9ea7cda80 Adwaita: kill a bogus background-color 2014-08-22 13:07:44 +02:00
Lapo Calamandrei
565d65c907 Adwaita: first round at osd revamp
...buttons, gtkscale and toolbars, more to follow...
2014-08-22 12:55:30 +02:00
Matthias Clasen
683a7f1429 GtkFileChooserWidget: Use ratio in formatted times
This matches what we do in other places now.
2014-08-22 02:04:31 -04:00
Matthias Clasen
23fdc45b95 Avoid picking up long description as translator comment
Rearrange a few lines to help xgettext avoid picking up the
long description of GtkFileChooserButton as translator comment.
2014-08-22 02:04:31 -04:00
Matthias Clasen
22db3e57cb Avoid picking up long description as translator comment
Rearrange a few lines to help xgettext avoid picking up the
long description of GtkAboutDialog as translator comment.
2014-08-22 02:04:31 -04:00
Matthias Clasen
792ffb26bc Remove an extraneous translatable string 2014-08-22 02:04:26 -04:00
Matthias Clasen
8061165789 Adwaita: Insensitive labels
There is an insensitive label in widget-factory which was
not getting any different from the sensitive label next
to it. With this patch, it does, again.
2014-08-22 00:42:52 -04:00
Matthias Clasen
975f29f17f Adwaita: Add assistant sidebar theming
This is just enough to draw the sidebar background and
markt he current page as active.
2014-08-21 23:09:14 -04:00
Matthias Clasen
c3755d995f GtkAssistant: Don't use a draw cb for the sidebar
We can do this with css nowadays.
2014-08-21 23:09:14 -04:00
Rico Tzschichholz
a3a6ce1b42 gtk: Fix return-annotation of gtk_get_default_language to "transfer none" 2014-08-21 23:10:32 +02:00
Matthias Clasen
209d2a83c4 GtkPageSetup: Improve formatting of size
Use U+00D7 MULTIPLICATION SIGN and U+200A HAIR SPACE instead of plain
old 'x' and ' ', following https://wiki.gnome.org/Design/OS/Typography.

Sadly, many fonts don't have space variations, so Pango/harfbuzz fall
back to using the regular space glyph anyway.
2014-08-21 17:07:00 -04:00
Matthias Clasen
23fcc5e373 GtkBuilder: Support parsing int64/uin64 values
This was missing; the code to parse these numbers was there,
but the switch didn't have cases for these types.

https://bugzilla.gnome.org/show_bug.cgi?id=602443
2014-08-21 14:22:13 -04:00
Sébastien Wilmet
706c8e9c8d Simplify _gtk_text_buffer_get_line_log_attrs()
NULL was returned in case of an empty last line. Every users needed to
special-case this. Now it will return the expected result: char_len of 0
with one PangoLogAttr.

In compute_log_attrs(), 'paragraph' will be the empty string "" with
'char_len' == 0.
pango_get_log_attrs() works fine with an empty string, it will return
one correct PangoLogAttr (because there is one text position for the
empty string).

It fixes the unit tests for gtk_text_iter_is_cursor_position().

https://bugzilla.gnome.org/show_bug.cgi?id=156164
2014-08-21 18:43:34 +02:00
Matthias Clasen
7645d201d4 GtkPopover: Fix rtl positioning
There was some confusion between unflipped and flipped positions.
Both final_position and current_position are meant to be unflipped,
and get_effective_position() needs to be applied to them to get
a flipped position. _gtk_window_set_popover_position() also expects
an unflipped position.

https://bugzilla.gnome.org/show_bug.cgi?id=735014
2014-08-21 11:59:44 -04:00
Lapo Calamandrei
09286cf968 Adwaita: try to be nicer on performances with entry shadows 2014-08-21 15:39:12 +02:00
Jakub Steiner
5344f99cdb Adwaita: no edge highlight for backdrop check/radios 2014-08-21 15:03:32 +02:00
Jakub Steiner
d72fa9aaa8 Adwaita: remove edge highlight form the assets
- using icon-shadow now, allows to treat special cases
  without introducing assets
2014-08-21 14:32:41 +02:00
Lapo Calamandrei
9a0b9f6378 Adwaita: some separators simplification
Accidentally fixing the backdrop separators in sidebars turning
black
2014-08-21 12:24:01 +02:00
Lapo Calamandrei
cdf5ecada9 Adwaita: inline toolbar buttons fixes
Properly styled single buttons in inline toolbars and fixed
a superflous border chiming in in backdrop.
2014-08-21 11:55:25 +02:00
Simon McVittie
d329544e70 Use AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE, _XOPEN_SOURCE etc.
Similar to Bug #684123 in GLib.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=641638
Bug-Debian: https://bugs.debian.org/756476
Reviewed-by: Matthias Clasen
2014-08-21 09:54:12 +01:00
Benjamin Otte
2737c67cce css: Round shadow extents properly
Otherwise drawing will be clipped.

Testcase included
2014-08-21 00:54:07 +02:00
Benjamin Otte
67456304d4 roundedbox: Only grow border-radius if there is one
This is relevant for shadow spread and goes in line with the web.

Testcase included.
2014-08-21 00:54:07 +02:00
Benjamin Otte
1126a34353 label: Respect box-shadow when computing clip
Testclase included.

Also reorder headers to be alphabetic.
2014-08-21 00:54:07 +02:00
Benjamin Otte
b5a8b7ef3b widget: Make _gtk_set_simple_clip() take an optional content clip 2014-08-21 00:54:07 +02:00
Benjamin Otte
e643ddfd16 stylecontext: Remove GTK_CSS_CHANGE_FORCE_INVALIDATE
This was introduced as a hackish way in 3.6 to make font updates
propagate properly. But since then, font handling has been changed and
this flag is no longer necessary.
2014-08-21 00:54:07 +02:00
Benjamin Otte
665ad8c6f9 stylecontext: Use right invalidation func
gtk_style_context_invalidate_internal() will respect only the current
saved state of the style context, which is wrong when updating the scale.
In that case, the whole style context needs updating.
2014-08-21 00:54:07 +02:00
Sébastien Wilmet
f39d211021 GtkTextView: various code clean-ups
- only one blank line is enough to separate code sections.
- the 'signals' variable was in the middle of function prototypes.
- compare pointers to NULL in some conditions ("if(blah) should be used
  only if blah is a boolean variable). It makes the code clearer.
- various other things.
2014-08-20 19:19:10 +02:00
Rico Tzschichholz
0c1cbfed53 gtk: Fix transfer annotations gtk_binding_set_new and *_by_class
Those instances are exclusively handled internally and can not be freed.
2014-08-20 16:23:06 +02:00
Jakub Steiner
045380601a Adwaita: selection mode checks
- add missing hover asset
- have enough contrast for the outline
- :active state isn't supported in libgd/apps yet
2014-08-20 09:29:17 +02:00
Jakub Steiner
35f6738509 Adwaita: keep selectmode checks square
- keep the existing 40x40px nominal size
2014-08-20 09:17:42 +02:00
Rico Tzschichholz
4665b95687 gtk: Fix out-param annotation of gtk_theming_engine_get_style_property 2014-08-20 08:55:53 +02:00
Rico Tzschichholz
e317117f03 gtk: Fix return annotation of gtk_selection_data_get_text 2014-08-20 08:54:12 +02:00
Jakub Steiner
bdaf5c8f8b Adwaita: allow window drag on menubars and toolbars
- reported as regression
2014-08-19 19:07:40 +02:00
Jakub Steiner
f9724d1d34 Adwaita: selection mode checkboxes 2014-08-19 19:07:40 +02:00
Paolo Borelli
db3a01b589 GtkApplication: fix annotation of get_menu_by_id
https://bugzilla.gnome.org/show_bug.cgi?id=735034
2014-08-19 18:28:19 +02:00
Jakub Steiner
763f5d51ed Adwaita: don't increase toolbar padding.
https://bugzilla.gnome.org/show_bug.cgi?id=735012
2014-08-19 17:24:52 +02:00
Rico Tzschichholz
0ef0b9872e gtk: Fix broken docs of GtkTranslateFunc 2014-08-18 14:38:04 +02:00
Jakub Steiner
aec4829d74 Adwaita: have an unchecked state for radio/checks in menus
more background in https://bugzilla.gnome.org/show_bug.cgi?id=734290
2014-08-18 14:20:15 +02:00
Matthias Clasen
c9da8bf2b3 Revert "docs: Fix broken gtk-doc formatting"
This reverts commit a7562dd38f.

I prefer to not confuse gtk-doc with doc comments for private
functions.
2014-08-18 08:18:02 -04:00
Rico Tzschichholz
a7562dd38f docs: Fix broken gtk-doc formatting
Fixes broken introspection of GtkTranslateFunc
2014-08-18 13:27:05 +02:00
Jakub Steiner
9c4af41a59 Adwaita: update the last cases for :checked
- treeviews can now have the same default checkboxes and radios
- only menus are special (but needed :active -> :checked)

https://bugzilla.gnome.org/show_bug.cgi?id=733967
https://bugzilla.gnome.org/show_bug.cgi?id=734290
2014-08-18 10:52:52 +02:00
Benjamin Otte
b520d3b7fb button: Remove unnecessary queue_redraw() calls
Setting a state automatically triggers redraws via the CSS machinery.
2014-08-17 06:47:17 +02:00
Benjamin Otte
442353fa9d checkbutton: Fix redraw issues
This is a hack to get around the optimizations done by the CSS engine.

The CSS engine will notice that no CSS properties changed on the
widget itself when going from one state to another and not queue
a redraw.
And the reason for no properties changing will be that only the
checkmark itself changes, but that is hidden behind a
gtk_style_context_save()/_restore() pair, so it won't be caught.
2014-08-17 06:25:29 +02:00
Matthias Clasen
d83e684b1f Silence compiler warnings 2014-08-16 21:40:40 -04:00
Matthias Clasen
d206d694fd GtkWidget: fix up docs minimally 2014-08-16 21:40:39 -04:00
Matthias Clasen
87ad4ec2c2 GtkListBox: fix up docs 2014-08-16 21:40:39 -04:00
Matthias Clasen
7bec0939a8 Clean up and unify docs and formatting 2014-08-16 21:40:39 -04:00
Benjamin Otte
d36bba293d checkbutton: Don't redundantly update states
States are set properly by GtkButton, there is no need to set them
manually.
2014-08-17 03:19:59 +02:00
Benjamin Otte
c1a063e1a4 checkbutton: Draw background unconditionally
We want to draw backgrounds always, not just on prelight. Themes can
decide to only set a background during prelight themselves.
2014-08-17 00:58:04 +02:00
Benjamin Otte
9adf0bf323 stylecontext: Update docs to reflect theming engines being gone 2014-08-16 19:39:45 +02:00
Benjamin Otte
b59e6f1948 themingengine: Deprecate 2014-08-16 19:39:44 +02:00
Benjamin Otte
9ca04c0f9d themingengine: Remove now unused private API 2014-08-16 19:39:44 +02:00
Benjamin Otte
9e4fc66e9a themingengine: Transition code towards StyleContext
We want to get rid of theming engines, so stop using them as much as
possible.
2014-08-16 19:39:44 +02:00
Benjamin Otte
1a143cd272 borderimage: Use style context as argument
... not the theming engine.
2014-08-16 19:39:44 +02:00
Benjamin Otte
04bf3d1e1f roundedbox: Remove functions that take a GtkThemingEngine
Instead, make the functions use a GtkStyleContext argument.
2014-08-16 19:39:44 +02:00
Benjamin Otte
5e8d3d533f themingbackground: Remove initializer that takes a GtkThemingEngine
With the unification to use style contexts everywhere, make that
initializer the only one to use.

Also rename it appropriately.
2014-08-16 19:39:44 +02:00
Benjamin Otte
7e5b58c727 stylecontext: Move private a11y function to private header 2014-08-16 19:39:44 +02:00
Benjamin Otte
eecbe5416e togglebutton: Remove unneeded code
The state is completely handled by gtkbutton.c so no need to do anything
in the togglebutton.
2014-08-16 16:34:16 +02:00
Benjamin Otte
1febbdb499 togglebutton: Don't duplicate button code
It's the same code, so no need to write the same vfunc twice.
2014-08-16 16:34:15 +02:00
Benjamin Otte
0f7c90ac62 radiobutton: :hover on hover
No special cases, those go in the theme.
2014-08-16 16:34:15 +02:00
Benjamin Otte
db1ab7ddf8 button: Handle :inconsistent in GtkToggleButton 2014-08-16 16:34:15 +02:00
Benjamin Otte
cd349dcd48 button: Handle :checked in gtktogglebutton.c
Don't try to handle it elsewhere.
2014-08-16 16:34:15 +02:00
Benjamin Otte
65cc3630c8 widget: Add checks for setting state flags
This is more for GTK developers to catch when they forgot to change
GTK_STATE_FLAGS_BITS after adding a new state flag than to prevent
widget developers from using the wrong flags.
2014-08-16 16:34:15 +02:00
Benjamin Otte
e5d0d5f9e6 themingengine: Remove hack to draw backgrounds instead of checks
This was a hack we added in early 3.x to allow themes to customize their
checkmarks.
Now that we want to properly support real backgrounds everywhere,
supporting this feature would cause double draws of backgrounds.
2014-08-16 16:34:15 +02:00
Benjamin Otte
97a6e692ce stylecontext: Update docs for gtk_render_activity() 2014-08-16 16:34:15 +02:00
Benjamin Otte
6c06bd55da gtk: Don't use gtk_render_activity()
... in places where we draw a background. This was changed for GTK 3.0.0
to allow animations, but these days it doesn't make sense anymore to use
gtk_render_activity() for backgrounds.
2014-08-16 16:34:14 +02:00
Benjamin Otte
b675a13233 button: Remove depressed_on_activate
All buttons should always be marked as :active when they are pressed.
That includes checkboxes (which are never activated in real code anyway,
so this change pretty much doesn't matter).
2014-08-16 16:34:14 +02:00