Commit Graph

21563 Commits

Author SHA1 Message Date
Lapo Calamandrei
de19fa4bb3 Adwaita: path-bar home button spacing 2014-08-13 16:41:36 +02:00
Lapo Calamandrei
cf7a5401b2 Adwaita: saner backdrop switch for the dark variant 2014-08-13 16:36:15 +02:00
Lapo Calamandrei
913d6c8061 Adwaita: saner menubar 2014-08-13 16:19:32 +02:00
Matthias Clasen
f72bcc5c01 GtkPathBar: Don't hardcode spacing in buttons
The theme will be changed to provide padding.
2014-08-13 09:31:34 -04:00
Matthias Clasen
9ce968ffb2 GtkPathBar: Make recoloring symbolics work
We were only recreating the icons the very first time the theme
changed, and not every time as was intended.
2014-08-13 09:29:40 -04:00
Matthias Clasen
7d55355d4d GtkTextView: Preserve the cairo context around draw_layer
Otherwise, draw_layer might unintentionally wreak havoc on the
regular drawing that happens between the two draw_layer calls.
2014-08-13 09:18:08 -04:00
Matthias Clasen
7450277708 GtkTextView: Change draw_layer signature
Vfuncs should really take 'this' of the right type - the type
that the vfunc is added in.
2014-08-13 09:18:08 -04:00
Lapo Calamandrei
fc09560d13 Adwaita: widget edge for inline toolbars 2014-08-13 14:27:31 +02:00
Alexander Larsson
afeb50009d Change way alpha is used when recoloring symbolics
If the foreground color has an alpha != 1 we used to just pass that into
the svg. This is useful to e.g. render an insensitive icon. However,
that is not an ideal model for symbolics. For instance, if the icon uses
overlapping areas when drawing, expecting these to be opaque then the
transparent color will result in a different alpha value for the overlapping
area. Also, non-foreground symbolic colors are still rendered opaque, and
the recoloring of pngs can't handle transparent colors.

So, instead we extract any alpha from the foreground, render using the
opaque colors and then apply the foreground alpha to the entire result.
This means we get an even transparency, even for other colors, and we
can apply alpha for the pngs too.

https://bugzilla.gnome.org/show_bug.cgi?id=734668
2014-08-12 15:51:36 +02:00
Alexander Larsson
928822f1a5 GtkIconHelper: Short circuit _gtk_icon_helper_get_size in some cases
_gtk_icon_helper_get_size() is often used during size request and may
not necessary mean that the icon will be displayed immediately. In
many common cases we know the size without having to ensure a surface.
In many cases this means we can avoid loading an icon until needed, and
in the case of stateless IconHelpers such as GtkCellRendererPixbuf this
is very important as otherwise it will constantly be reloading icons
if the displayed set is larger than the in-memory icon cache.

https://bugzilla.gnome.org/show_bug.cgi?id=734651
2014-08-12 15:47:42 +02:00
Carlos Garnacho
8ff47570af stack: Ensure the bin window has an evmask suitable to windowless children
If a child has set_has_window == FALSE, it purely relies on the events set on
the parent window, for which the bin window used to just ensure the exposure
mask, eating all input events.

https://bugzilla.gnome.org/show_bug.cgi?id=734357
2014-08-12 14:28:34 +02:00
Carlos Garnacho
62507776fe widget: Include event controllers' event mask on gtk_widget_get_events()
gtk_widget_get_events() must indeed tell about events enabled purely through
a GtkEventController, those events will most surely trigger event handlers.

https://bugzilla.gnome.org/show_bug.cgi?id=734357
2014-08-12 14:28:34 +02:00
Debarshi Ray
225bb95795 GtkSpinButton: Only notify 'adjustment' if the property changed
https://bugzilla.gnome.org/show_bug.cgi?id=734649
2014-08-12 11:54:29 +02:00
Carlos Garnacho
b56f5cec3e treeview: Check the selected node active flag before maybe starting rubberband
This check used to be present in the pre-gestures code, but was unintentionally
removed when splitting code into drag/multiclick gestures. The policy used to
be that if clicking happened on an already selected node, DnD would happen
instead of rubberband selection, so this behavior is resuscitated.

https://bugzilla.gnome.org/show_bug.cgi?id=734143
2014-08-11 18:09:16 +02:00
Matthias Clasen
cb60da5f6b GtkToolbar: Set clip
This allows outset box shadows to work on toolbars.

https://bugzilla.gnome.org/show_bug.cgi?id=734526
2014-08-10 07:53:59 -04:00
Matthias Clasen
327b097725 Trivial: Use g_clear_object more
It no longer has atomic overhead, so we can use it everywhere.
2014-08-09 10:16:27 +02:00
Lapo Calamandrei
9c7e31fc1c Adwaita: GtkSwitch size reduction and tweaks
See https://bugzilla.gnome.org/show_bug.cgi?id=734485
2014-08-08 23:36:55 +02:00
Nikita Churaev
684b981fb5 Only show title button separator when there is something to separate
https://bugzilla.gnome.org/show_bug.cgi?id=729636
2014-08-08 23:02:14 +02:00
Matthias Clasen
1a11515118 Revert "Adwaita: comment out the header-bar separator"
This reverts commit b4e7ada6ac.
2014-08-08 22:35:48 +02:00
Lapo Calamandrei
f1a9273844 Adwaita: pushed button shadows tweakings 2014-08-08 10:11:11 +02:00
Руслан Ижбулатов
3b916e4405 Handle ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET
https://bugzilla.gnome.org/show_bug.cgi?id=733773
2014-08-07 15:55:27 +00:00
Lapo Calamandrei
a13761ceb4 Adwaita: progressbar background in scale highlight 2014-08-07 14:17:50 +02:00
Руслан Ижбулатов
ae149285ea Add missing include to gtk-win32.rc
Otherwise ISOLATIONAWARE_MANIFEST_RESOURCE_ID and RT_MANIFEST constants
can't be expanded.

https://bugzilla.gnome.org/show_bug.cgi?id=733773
2014-08-06 15:38:14 +00:00
Ray Strode
08b17ab344 drag: add missing introspection annotations
gtk_gesture_drag_get_start_point and gtk_gesture_drag_get_offset
have out args that need to be annotated.

This commit adds the (out) and (nullable) annotations as appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=734292
2014-08-06 10:14:47 -04:00
Lapo Calamandrei
b4e7ada6ac Adwaita: comment out the header-bar separator 2014-08-06 13:33:17 +02:00
Lapo Calamandrei
f8c1a4fed8 Adwaita: linked logic surgery 2014-08-06 13:20:45 +02:00
Lapo Calamandrei
cfff562069 Adwaita: linked combos 2014-08-06 12:23:47 +02:00
Chun-wei Fan
7a3bc9a5ff gtk/gtkprintoperation-win32.c: Fix Missed Include
We need to include gtkprivate.h for _gtk_load_dll_with_libgtk3_manifest().
2014-08-06 12:55:09 +08:00
Руслан Ижбулатов
0d02cc8203 Make sure native W32 print dialog uses visual styles
For that to happen the libgtk3 is embedded with a manifest that requests
common controls library 6.x, and GTK lazily calls InitCommonControlsEx()
to initialize those. Then this manifest is used to temporarily override
the process activation contest when loading comdlg32 (which contains the
code for the print dialog), ensuring that it too depends on common
controls 6.x, even if the application that uses GTK does not.

https://bugzilla.gnome.org/show_bug.cgi?id=733773
2014-08-05 06:41:31 +00:00
Matthias Clasen
f0632d5ced inspector: Add a switch to turn off animations
This may be useful in some places to check that application-specific
animations respect this setting.
2014-08-05 00:03:37 +02:00
Matthias Clasen
5131472984 GtkSwitch: Initialize offset when beginning animation
handle_x always corresponds to the visible position of the handle,
which is where we want to start the animation. Without this, repeated
keyboard activation will not always animate.
2014-08-04 14:36:42 +02:00
Matthias Clasen
1569952d0e GtkSwitch: Update handle_x in size-allocate
Since we are storing positions here that depend on the allocation,
we need to update them in size-allocate. This fixes incorrect
positioning of the handle if the switch is active initially.

https://bugzilla.gnome.org/show_bug.cgi?id=734213
2014-08-04 14:36:42 +02:00
Matthias Clasen
2e85046b8f GtkSwitch: Don't store dest_offset
Instead, calculate it on the spot in the tick callback, and
update handle_x in gtk_switch_set_active, based on the new
active property.
2014-08-04 14:36:42 +02:00
Matthias Clasen
d4bd9e9c46 GtkSwitch: End animations on finalize
Handle the unlikely case that a switch gets finalized while its
toggle animation is running.
2014-08-04 14:36:42 +02:00
Matthias Clasen
007ba3bc14 GtkSwitch: End animation in set_active
End any running toggle animation before setting the set,
otherwise things get confused.
2014-08-04 14:36:42 +02:00
Matthias Clasen
8820c46ff0 GtkSwitch: Also animate for keyboard activation 2014-08-04 14:36:41 +02:00
Rico Tzschichholz
45145c8c10 gtk-encode-symbolic-svg: Fix build with -Werror=format-security 2014-08-04 13:31:34 +02:00
Matthias Clasen
4b2dc1e38b Fix the build
Quoting accident. "echo -e" is not a command that the shell knows,
echo -e is.
2014-08-04 00:20:40 +02:00
TingPing
6ea36f3a18 Fix building quartz backend
These were some api changes introduced in:
d930716
48db841
f6ee007

https://bugzilla.gnome.org/show_bug.cgi?id=732137
2014-08-03 23:22:39 +02:00
Florian Müllner
6f857f87dc listbox: Add missing ::row-selected emissions
Rows are not necessarily selected via select_row_internal(), add
the missing signal emissions there. Also the signal should be emitted
when removing the selection altogether.

https://bugzilla.gnome.org/show_bug.cgi?id=729809
2014-08-03 23:17:01 +02:00
John Ralls
30ba9c1316 Add missing paramter to gtk-menu-tracker-new. 2014-08-03 13:28:52 -07:00
John Ralls
af3572f36a Replace deprecated gtk_application_add_accelerator
With new gtk_application_set_accels_for_action.
2014-08-03 13:28:52 -07:00
John Ralls
b9771ab1ff Fix build of resource files on OS-X
OS-X's 'echo' command does not have a -e option, so it was included in the files.
2014-08-03 13:28:52 -07:00
Ryan Lortie
7d81d0a3bb Add gtk_application_get_actions_for_accel()
This counterpart to gtk_application_get_accels_for_action() lets you
find out if a particular accelerator has one or more actions associated
with it. This might be useful from an accelerator editor or plugin
system to prevent the the installation of conflicting accelerators.

https://bugzilla.gnome.org/show_bug.cgi?id=721367
2014-08-03 20:27:51 +02:00
Matthias Clasen
9746419cce GtkTreeView: Avoid deprecation warnings 2014-08-03 20:12:48 +02:00
Pietro Gagliardi
f9d118ed8a gtk/Makefile.am: fix gtk-encode-symbolic-svg build for jhbuild
Currently, jhbuild-ing GTK+ on Ubuntu 14.04 LTS and gcc 4.8.2 errors out with
	/usr/bin/ld: encodesymbolic.o: undefined reference to symbol 'g_file_new_for_path'
	/opt/gnome/lib/libgio-2.0.so.0: error adding symbols: DSO missing from command line
when trying to build gtk-encode-symbolic-svg. This is because $(GTK_DEP_LIBS) isn't defined in $(gtk_encode_symbolic_svg_LDADD) in gtk/Makefile.am. This patch should fix that.

Thanks to b4n and gregier in irc.gimp.net/#gtk+ for help.

https://bugzilla.gnome.org/show_bug.cgi?id=734201
2014-08-03 20:12:47 +02:00
Carlos Garnacho
9d7f1caca7 textview: Avoid relocating adjustments on ::size-allocate while these are animating
An animation may be scheduled while the textview content changed in size, so the resize
queued would just unset the animation and set the adjusments with a current value,
defeating gtk_text_view_scroll_to_iter(). In this case, just avoid the adjustment change,
as there is a target value on the way.

https://bugzilla.gnome.org/show_bug.cgi?id=733406
2014-08-03 20:12:47 +02:00
Carlos Garnacho
5b8267028d window: Update popover positions on ::size-allocate
Popovers may get relocations optimized away if only x/y changed
in the GtkAllocation. So make sure the toplevel updates popover
positions on all situations.

https://bugzilla.gnome.org/show_bug.cgi?id=729140
2014-08-03 18:37:53 +02:00
Paolo Borelli
bd07845c31 Add missing include for setlocale 2014-08-03 11:54:36 +02:00
Paolo Borelli
a0c89af801 GtkSwitch: implement animation 2014-08-03 10:22:41 +02:00
Paolo Borelli
22bd23adf3 GtkSwitch: remove unused assignment 2014-08-03 10:22:41 +02:00
Matthias Clasen
b52214faeb Ensure an image-missing icon is available
It is bad if the image that is used as a fallback for missing
images goes missing itself, so include it as a resource. This
way, it will always be available.
2014-08-03 10:13:23 +02:00
Руслан Ижбулатов
7fd90804fb Embed manifest into gtk-update-icon-cache.exe
This way it doesn't need to be installed alongside it.

https://bugzilla.gnome.org/show_bug.cgi?id=705054
2014-08-03 06:48:54 +00:00
Emmanuele Bassi
0ed766ec86 treeview: Deprecated rules-hint
The rules-hint property has always been a fairly bad application API, as
it set some wrong expectations for the developers; deferring to the
theme makes it impossible to design application reliably, and if this is
a usability setting we should either impose this setting on every theme,
or simply drop it.

Our own default theme does not honour the zebra striping, which makes
this function even more questionable.

In practice, usability studies on zebra striping have demonstrated that
alternating colors on a list it improves readability just as much as
clear ruling between rows, or by visually differentiating the selected
row. Zebra striping improves readability (or, at least, it does not
hinder it) on static displays, like a table on paper or a document; on a
dynamic display, like an application's UI, there are different
strategies that yield similar, if not better, results.

https://bugzilla.gnome.org/show_bug.cgi?id=733312
2014-08-03 02:51:02 +02:00
Timm Bäder
fb7d710931 listboxrowaccessible: Avoid assertion failure
The next call to gtk_list_box_get_selection_mode just expected the
GtkListBoxRow's parent to be a GtkListBox and failed when the row was
added to something other than a GtkListBox.

https://bugzilla.gnome.org/show_bug.cgi?id=733782
2014-08-03 02:48:26 +02:00
Alexander Larsson
1d68801ade icon-theme: Support recolorable .symbolic.png files
If an icon theme has a file called "foo-symbolic.symbolic.png" which
was converted from svg using gtk-encode-symbolic-svg we will read
it in an recolor, allowing symbolic icons without using librsvg.

https://bugzilla.gnome.org/show_bug.cgi?id=730450
2014-08-03 02:20:18 +02:00
Alexander Larsson
50ba3c72bb Add gtk-encode-symbolic-svg
This utility loads a symbolic svg at a specified size and
renders a png file in a special format that can be recolored
later.

https://bugzilla.gnome.org/show_bug.cgi?id=730450
2014-08-03 02:20:18 +02:00
Matthias Clasen
d7850e8be0 inspector: Add GtkTreeSelection to the object tree
It is not accessible, otherwise.
2014-08-03 01:28:23 +02:00
Carlos Garnacho
25721ae3e7 window: Only avoid queueing resizes if the popover position didn't change
If the same position is requested on a popover, it should at least ensure
the window is realized and raised, even if no resizes are queued on the
content. Otherwise other widgets being mapped might raise the windows over
the popover's if its original position is unchanged.

https://bugzilla.gnome.org/show_bug.cgi?id=734129
2014-08-03 01:12:12 +02:00
Jasper St. Pierre
9f2e0902f6 gtkcssshadowvalue: Don't double-apply the alpha to shadows
It turns out that when we were painting the shadows, we painted the them
with the base color once, which contained the alpha, and then blurred it
and used it as a mask for the fill, which has the fill again.

To fix this, always paint the base surface with full alpha. The existing
code applies the blur conditionally sometimes in weird ways, so the code
shuffling fix may not look correct, but be assured it is. If the blur
happens, the new cr we return has the *default* color applied, which is
fully opaque black, which works perfectly against the A8 surface.

The fallback spinner code needs some modification, since it is
intentionally using the alpha to paint the lobes which are "in the past".
Since we shouldn't be hitting this fallback path very often, we use a
temporary group and paint it with paint_with_alpha, even though it is
slow.
2014-08-02 18:58:19 -04:00
Matthias Clasen
1c34ad2668 Small comment fixups
One factual pointed out in the review in
https://bugzilla.gnome.org/show_bug.cgi?id=734053, plus some
formatting nit picks.
2014-08-03 00:42:48 +02:00
Jasper St. Pierre
f5d8f75c0f gtkcairoblur: Replace our exponential blur with the box blur from mutter
https://bugzilla.gnome.org/show_bug.cgi?id=734053
2014-08-03 00:35:55 +02:00
Ryan Lortie
edeb1a0161 GtkMenuTrackerItem: introduce action debugging
Add some action debugging output for GtkMenuTrackerItem as well...

https://bugzilla.gnome.org/show_bug.cgi?id=733965
2014-08-03 00:18:44 +02:00
Ryan Lortie
16e02850c1 GtkActionHelper: add some debugging output
Introduce a new debug category "actions" and write some messages from
GtkActionHelper about if we can find the actions or not.

We will probably soon want to add some similar messages to
GtkMenuTrackerItem.

https://bugzilla.gnome.org/show_bug.cgi?id=733965
2014-08-03 00:18:44 +02:00
Matthias Clasen
785c9f5e2c Remove a reference to a non-existing function 2014-08-02 22:26:05 +02:00
Руслан Ижбулатов
bbe475fd97 Use g_clear_object() shorthand for unref-and-set-to-null
https://bugzilla.gnome.org/show_bug.cgi?id=733766
2014-08-02 14:18:05 +00:00
Руслан Ижбулатов
e1acb93415 W32: Don't unregister parent window of an embedded widget
This leads to an assertion failure, because parent window is never registered
in the first place, widget's own GdkWindow is. But that window is unregistered
in a generic fashion by GtkWidget code, so there's nothing for us to do here.

https://bugzilla.gnome.org/show_bug.cgi?id=733766
2014-08-02 14:18:05 +00:00
Руслан Ижбулатов
3fea9ff24c Remove generated gtk-win32.rc from EXTRA_DIST
https://bugzilla.gnome.org/show_bug.cgi?id=733773
2014-08-02 13:07:49 +00:00
Matthias Clasen
14eccae603 GtkWindow: Add a way to declare initial focus in ui files
With this commit, it is possible to use <initial-focus name="blah">
to declare the initial focus widget for a window.

This is related to
https://bugzilla.gnome.org/show_bug.cgi?id=734033
2014-08-02 11:58:13 +02:00
Matthias Clasen
f15ebc2dd2 GtkWindow: Make set_focus work before show
So far, gtk_window_set_focus just did not work when called on
a hidden window. Change it to record the desired focus widget
for hidden windows, and apply it when the window gets shown.

This is similar to how we tread other window properties that
can't be set before the window is realized, like maximized
or fullscreen.

This is related to
https://bugzilla.gnome.org/show_bug.cgi?id=734033
2014-08-02 11:38:23 +02:00
Руслан Ижбулатов
e934ddd498 Ensure that print operation is alive until we're done
https://bugzilla.gnome.org/show_bug.cgi?id=733767
2014-08-01 04:44:46 +00:00
Sébastien Wilmet
6e4e7c22a0 textiter: don't call g_utf8_prev_char() on start of string
Changes also the "goto finally" with a break. A break is more common.

Another way is to use g_utf8_find_prev_char().

https://bugzilla.gnome.org/show_bug.cgi?id=638709
2014-07-31 18:00:49 +02:00
Benjamin Otte
a3d1db608b label: Don't clip text shadows
The previous code for computing the clip rectangle forgot to respect
the text-shadow CSS property. This is usually not very visible because
text shadows usually don't extend the ink rectangle by very much.

See attached testcase for an example.
2014-07-31 17:50:24 +02:00
Benjamin Otte
d6e9997619 css: Fail animation shorthand parsing properly
When a number is not a nubmer, don't just crash, exit properly with an
error code.

See attached testcase for an example.
2014-07-31 10:03:19 +02:00
Benjamin Otte
5f5d3a9d82 css: Don't infloop when parsing broken borders
There was an infinite loop when parsing invalid text after having parsed
a color in the border shorthand. See attached testcase for an example.
2014-07-31 10:03:18 +02:00
Matthias Clasen
83c9fe109e GtkImage: Always close the loader
This was causing some tests to fail with a critical.
2014-07-31 00:12:30 +02:00
Matthias Clasen
bd7e7d1dd6 inspector: Make the action editor more useful
We were not finding the action owner for menuitems, we have to
try harder to walk all the way up to the window.
2014-07-30 23:46:13 +02:00
Matthias Clasen
2b0ae4bad3 GtkPopover: Properly update a11y parent
When the relative-to widget changes, update the accessible parent
of the popovers accessible.

https://bugzilla.gnome.org/show_bug.cgi?id=733923
2014-07-30 23:14:41 +02:00
Ryan Lortie
ffbfee0738 GtkApplication: load gtk/menus-common.ui resource
Allow the app to install a resource called gtk/menus-common.ui which
will always be loaded, regardless of which type of menus we are using.

https://bugzilla.gnome.org/show_bug.cgi?id=733925
2014-07-30 09:57:33 +02:00
Sébastien Wilmet
8ad9cf8b8c textbuffer: emit notify signal for the "text" property
Although there is the "changed" signal, it is more correct to notify the
"text" property too. It can be useful for a small text view, where the
text is saved e.g. to gsettings with a binding to the text property.

The "text" property includes only the text, not child widgets or images,
so the notify signal is sent too many times (also for child widgets and
images), but it's not a big problem.

https://bugzilla.gnome.org/show_bug.cgi?id=624791
2014-07-29 15:21:23 +02:00
Matthias Clasen
0f47ffb6f5 inspector: Set a filename for saving css
This is good practice when using save dialogs.
2014-07-29 13:59:02 +02:00
Jasper St. Pierre
45bdec84f5 gtkcairoblur: Blur a CAIRO_A8 surface instead of a full CAIRO_ARGB32
This is considerably faster to draw and paint.
2014-07-29 10:49:39 +02:00
Jasper St. Pierre
227b4a8620 gtkcssshadowvalue: Use the blur surface as a mask, instead of painting it
This will make it easier to use an A8 for our blurred surface instead of
a ARGB32, which makes things a lot easier and faster.
2014-07-29 10:49:39 +02:00
Cosimo Cecchi
09a36b1e9f iconhelper: reset original pixbuf scale on clear
Avoids a previously set value for a different image to accidentally
stick around.

https://bugzilla.gnome.org/show_bug.cgi?id=733416
2014-07-29 10:13:21 +02:00
Cosimo Cecchi
7e425f3019 image: support scale factor when loading from GResource and file
Currently, when loading an image from a GResource or file we don't take
the scale factor of the display into consideration, and let
GtkIconHelper scale it accordingly.
While this in general works for non-scalable images, we can take
advantage of the native loader's scaling for e.g. SVG images, and load
them at the right scale factor automatically.
This is achieved by switching to a pixbuf loader instead of using the
native function.

https://bugzilla.gnome.org/show_bug.cgi?id=733416
2014-07-29 10:13:21 +02:00
Alexander Larsson
5b53eb287c textview: Add draw_layer vfunc
This allows subclasses to render things below and above the text
in the text view. This allows e.g. GtkSourceView to highlight the
cursor row and to render overlays for colum 80. This used to be done
by rendering before/after chaining up to the parent, but that doesn't
work anymore since the view now renders a background, and due to the
use of the pixel cache.
2014-07-28 16:23:33 +02:00
Alexander Larsson
4fe051bb4a Revert "GtkTextView: Fix regression in GtkSourceView drawing"
This reverts commit 1ac13435b7.

We want to instead replace this with special vfunc for drawing
below/above the main text so that gtksourceview can use it.
2014-07-28 16:23:33 +02:00
Lapo Calamandrei
b584970b95 Adwaita: fix a typo 2014-07-28 15:34:03 +02:00
Lapo Calamandrei
c97480caab Adwaita: button drawing function rework...
...to take colored buttons into considerations, so buttons on
colored background works better now (infobars and the like).
2014-07-28 12:45:34 +02:00
Paolo Borelli
86ed270163 textview: document text mark properties 2014-07-28 12:21:17 +02:00
Jakub Steiner
1c97a5f4c6 Adwaita: remove shadows from progressbars 2014-07-27 13:39:02 +02:00
Alejandro Piñeiro
2be4474a19 a11y: unref selected item only if it is not NULL
https://bugzilla.gnome.org/show_bug.cgi?id=733610
2014-07-25 10:03:24 +02:00
Matthias Clasen
d97fd540ac inspector: Show the buildable ID in the misc tab
This is useful, since you sometimes want to use it as #id in css.
2014-07-24 08:29:12 -04:00
Matthias Clasen
3e82b77d7d inspector: Prepare misc tab for showing non-widgets
This will happen in the near future.
2014-07-24 08:14:54 -04:00
Matthias Clasen
155c45eba5 GtkPlacesSidebar: Fix editing of bookmarks
This was silently broken - the code was just assuming that the
text cell renderer is item no. 6 on the list of all cells. That
doesn't work so well if the cell renderers are set up elsewhere
and get rearranged.

Fix this by keeping an explicit pointer to the the text cell.
2014-07-23 14:11:22 -04:00
Matthias Clasen
d576069cec GtkPathBar: Use symbolic icons
This fits better with the symbolic icons we use in the places
sidebar now.
2014-07-23 13:41:57 -04:00
Matthias Clasen
d26a84889b GktFileSystem: Support rendering symbolic icons 2014-07-23 13:41:57 -04:00
Benjamin Otte
27b9efbea2 cssimage: Fix size computation for -gtk-icontheme()
For images without a concrete size but with an aspect ratio, we took the
wrong code path.

(I even copied the documentation that said "Otherwise" but didn't put an
else clause there, go me!)
2014-07-23 18:51:26 +02:00
Matthias Clasen
0d1d17107f GtkPathBar: Set style classes on buttons
Set text-button/image-button on these, just like we do for
buttons everywhere else.
2014-07-23 12:44:26 -04:00
Matthias Clasen
d758e9ddd9 GtkPathBar: Don't use GtkArrow
Instead, use an image button.
2014-07-23 12:44:26 -04:00
Lapo Calamandrei
db2133bad4 Adwaita: spinbutton button hover visible on the dark variant 2014-07-23 17:53:31 +02:00
Lapo Calamandrei
2b1cad0289 Adwaita: entry icons position fix 2014-07-23 15:25:22 +02:00
Lapo Calamandrei
4718c165ad Adwaita: backdrop check/radio fix
Set the correct color wrt the dark variant for checks/radios on
selected treeview rows.
2014-07-23 13:31:05 +02:00
Lapo Calamandrei
11245bc549 Adwaita: GtkCalendar style simplification 2014-07-23 13:26:36 +02:00
Lapo Calamandrei
d3d675511c Adwaita: accelerators 2014-07-23 12:34:00 +02:00
Lapo Calamandrei
99f72ac474 Adwaita: vertical spinbutton rtl fix 2014-07-22 20:26:43 +02:00
Lapo Calamandrei
8a01e90608 Adwaita: position needs-attention dot in rtl 2014-07-22 20:21:30 +02:00
Lapo Calamandrei
f0c0be896f Adwaita: correct color on insensitive check/radio labels 2014-07-22 20:09:18 +02:00
Lapo Calamandrei
590c32ede1 Adwaita: some more assets refresh 2014-07-22 20:02:06 +02:00
Lapo Calamandrei
80a1097060 Adwaita: .needs-attention dark variant style 2014-07-22 19:50:15 +02:00
Lapo Calamandrei
542e0db615 Adwaita: graphic assets refresh 2014-07-22 19:13:34 +02:00
Ignacio Casal Quinteiro
8f873f3aa3 gtkselection: fix warnings of unused vars on win32 2014-07-22 17:22:00 +02:00
Benjamin Otte
c4c383fa39 scrolledwindow: Remove unused variable 2014-07-22 15:06:26 +02:00
Ignacio Casal Quinteiro
fc8b7156a3 win32: add css files to EXTRA_DIST 2014-07-22 14:53:16 +02:00
Lapo Calamandrei
5ff1c9a6ef Adwaita: reduce padding on path bars 2014-07-22 14:35:01 +02:00
Carlos Garnacho
0bb955b30e treeview: Add back a check to ignore buttons > 3
The removal was not intentional, and still needed as the GtkGestureMultiPress
will work for any button unless told to lock on a single specific one.
2014-07-22 13:20:13 +02:00
Lapo Calamandrei
3d5e9c9556 Adwaita: GtkSwitch in selected list rows 2014-07-22 10:29:01 +02:00
Lapo Calamandrei
35e4421bb8 Adwaita: less distracting active list-rows 2014-07-22 10:27:49 +02:00
Lapo Calamandrei
7fe1bd70cf Adwaita: decrease column headers paddings 2014-07-22 09:58:58 +02:00
Lapo Calamandrei
a67baa51ae Adwaita: stack switcher button needs-attention fix.
Don't draw the dot when the stack switcher button is active.
2014-07-22 09:42:22 +02:00
Benjamin Otte
5a3ebb4860 stylecontext: Query style properties with correct state
Now that widget paths are allowed to have a state, use that state when
querying style properties. This uses a fast path in gtkcssprovider.c and
that is great.
2014-07-22 03:06:04 +02:00
Matthias Clasen
a0566770da GtkWidgetPath: Don't forget to copy the state
gtk_widget_path_copy was not copying the state of each element.
This was showing in "GtkRadioButton:active GtkLabel" not matching
in stack switchers.
2014-07-21 20:35:59 -04:00
Matthias Clasen
2df06d3490 GtkWidgetPath: Show states in the path string
This shows clearly that some widgets don't set the state on their
path currently.
2014-07-21 19:49:11 -04:00
Benjamin Otte
153a7e71ce stylecontext: Don't do anything with empty widget path
It's a corner case, but empty widget paths don't allow setting
state/regions/classes, so exit early

Fixes gtk/stylecontext test.
2014-07-22 01:10:21 +02:00
Matthias Clasen
0d71478237 inspector: Offer Raleigh as a theme
As long as it is included, might as well offer it.
2014-07-21 14:13:06 -04:00
Matthias Clasen
821955a998 Avoid a compiler warning 2014-07-21 14:13:06 -04:00
Benjamin Otte
3747e0fc4e css: Make commented out debug code work again 2014-07-21 19:54:14 +02:00
Benjamin Otte
09a1d983d4 css: Add printing code for :visited and :link
Don't just crash when those states are encountered
2014-07-21 19:54:14 +02:00
Lapo Calamandrei
6b8dd7beef Adwaita: stack switcher button fixes
Paddings and outline offset are ok now.
2014-07-21 19:26:41 +02:00
Lapo Calamandrei
c4b583ed47 Adwaita: bright outline on suggested/destructive action buttons 2014-07-21 19:22:24 +02:00
Lapo Calamandrei
306890ef9d Adwaita: bit padding overhaul
Header-bar and action-bar buttons used to be bigger then others
now everything is as big as those, maintaining two different sizes
for default widgets depending on the placement is a maintainance
nightmare and having controls the same size is good from a usability
point of view.
2014-07-21 18:52:58 +02:00
Matthias Clasen
c8c6da4ca4 GtkTooltip: Drop an unused variable
The toplevel_window was never set, and the only place where it
was used was causing us to hide tooltips needlessly. So removing
it is a double win.

https://bugzilla.gnome.org/show_bug.cgi?id=733321
2014-07-21 12:40:57 -04:00
Matthias Clasen
2a7577d23a inspector: Show misc info
Add yet another tab for showing information about a widget that
does not quite fit into any of the other tabs (not a property,
not style information, etc...).

For now, we show the widget state, as well as the default and
focus widget for windows.
2014-07-21 11:18:29 -04:00
Paolo Borelli
167f200a0c GtkMenuButton: do not mention GtkArrow in the docs
GtkArrow is deprecated and is not used internally anymore by the
menu button. Document also the fact that if no direction is specified
then the view-context-menu icon is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=733441
2014-07-21 15:26:09 +02:00
Paolo Borelli
8b6bf3a5ea GtkMenuButton: do not use gpointer for the arrow widget
Just a small cleanup, we can use a proper type.
2014-07-21 15:26:09 +02:00
Lapo Calamandrei
81b22883fd Adwaita: header bar buttons padding fix 2014-07-21 15:24:08 +02:00
Sébastien Wilmet
9527205291 GtkTextView: use GSlice
GSlice is better for allocating structs.

https://bugzilla.gnome.org/show_bug.cgi?id=733407
2014-07-20 12:26:01 +02:00
Matthias Clasen
85297367dc GtkDialog: Manage action area visibility more carefully
People expect to be able to call gtk_widget_show_all on the dialog
to make action widgets visible, as seen e.g. in
https://bugzilla.gnome.org/show_bug.cgi?id=733431

To keep this working, we can't always set no-show-all on the
action_box. Only set it when the action_area is not used and empty.
2014-07-20 01:05:41 -04:00
Matthias Clasen
caa47b2ef4 GtkMenuItem: fix display of accelerators
The accel label in menus was getting a small allocation that
caused its draw code to always omit the accelerator string.
Fix that by setting halign to fill. To keep the menu label
left-aligned, set xalign to 0 to compensate.
2014-07-20 00:12:40 -04:00
Matthias Clasen
d6d424f920 GtkModelMenuItem: Make properties readable
This makes the inspector much more useful when dealing
with model menu items.
2014-07-19 23:40:27 -04:00
Matthias Clasen
73267102fd GtkAccelLabel: unconditionally chain up in draw
No need to check, we know for sure that GtkLabel has a draw
function.
2014-07-19 23:37:43 -04:00
Matthias Clasen
70e898bc90 inspector: Add a font button to the visual tab
The font was already settable via the gtk-font-name property
of the settings object, but this this much more convenient.
2014-07-19 19:15:58 -04:00
Gergely POLONKAI
7f7084f7f5 GtkSpinButton: Document some signals
Based on a patch by Gergely Polonkai,
https://bugzilla.gnome.org/show_bug.cgi?id=733174
2014-07-19 18:34:58 -04:00
Matthias Clasen
f7c838ce5f Trivial: Use the canonical signal name 2014-07-19 18:34:58 -04:00
Benjamin Otte
cde81e169b notebook: Don't unset state flags on child removal
We don't set any state flags, so we shouldn't unset any either.
2014-07-19 23:48:06 +02:00
Benjamin Otte
52dd0f5014 widget: Add widget state when appending to widget path
Make gtk_widget_path_append_for_widget() add the state flags of the
widget, too.

This enables the ability to select pseudoclasses on all elements in a
selector.
2014-07-19 23:42:39 +02:00
Benjamin Otte
19eb1614de cssmatcher: Use widget path's state
Don't take a state when constructing the CSS matcher. Instead, rely on
the newly introduced state in the widget path.

This way, the state can be queried not only on the first element, but on
all elements of the widget path.
2014-07-19 23:42:39 +02:00
Benjamin Otte
be09e0ed4a stylecontext: Set state flags on widget paths
Set the widget path state flags with the state flags of the style
context.

We do not update the state flags but replace the previous one because we
want to be able to have save()/restore() unset state flags.
2014-07-19 23:42:39 +02:00
Benjamin Otte
09dd0ffcd0 API: Add gtk_widget_path_iter_set_state()
And the corresponding gtk_widget_path_iter_get_state().
2014-07-19 23:42:38 +02:00
Lapo Calamandrei
71d47ef607 Adwaita: suble gradient on progressbars 2014-07-19 15:42:17 +02:00
Lapo Calamandrei
3fb249e376 Adwaita: progressbar tweaks 2014-07-19 14:03:28 +02:00
Lapo Calamandrei
58777d6084 Adwaita: insensitive backdrop state restyle
Make backdrop insensitive state more similar to the focused
windows one, mostly to make dark variant more usable and
focused -> backdrop transition less distracting.
2014-07-19 11:11:44 +02:00
Lapo Calamandrei
f5c2c81645 Adwaita: some code refactoring 2014-07-19 10:50:01 +02:00
Lapo Calamandrei
61edf40936 Adwaita: more progressbar shadows 2014-07-19 09:59:10 +02:00
Lapo Calamandrei
27f24a1732 Adwaita: widget edge for level bars 2014-07-19 09:02:07 +02:00
Matthias Clasen
ea9026e3a0 Inspector: Show directory sizes in the resource tab
This is makes it easy to answer the question: how much do resources
cost. It turns out that all the resources in GTK+ currently weigh
around 1MB.
2014-07-19 01:20:28 -04:00
Matthias Clasen
a9201b8379 GtkProgressBar: Add style classes for edges
Add left/right/top/bottom style classes according to which edge(s)
of the progressbar the progress is adjacent to. Only for a fraction
of 1.0 will we set more than one edge.
2014-07-19 00:40:09 -04:00
Matthias Clasen
04c4e1963f GtkFlowBox: Add a missing #include 2014-07-18 23:00:54 -04:00
Matthias Clasen
f4db36ef49 GtkToolbar: Set orientable style classes initially
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:40:12 -04:00
Matthias Clasen
87b7103db1 GtkSpinButton: Set orientable style classes initially
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:39:56 -04:00
Matthias Clasen
b5ee9da924 GtkSeparator: Set orientable style classes initially
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:39:44 -04:00
Matthias Clasen
f1d1f139af GtkRange: Set orientable style classes initially
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:39:32 -04:00
Matthias Clasen
18a92992a0 GtkProgressBar: Set orientable style classes initially
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:39:11 -04:00
Matthias Clasen
9b4001ed00 GtkPaned: Set orientable style classes initially
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:38:56 -04:00
Matthias Clasen
cd6c880790 GtkGrid: Set orientable style classes initially
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:38:37 -04:00
Matthias Clasen
7ed133397a GtkFlowBox: Set orientable style classes initially
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:38:16 -04:00
Matthias Clasen
b4ab29d4d5 GtkBox: Set orientable style classes initially
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:37:33 -04:00
Lapo Calamandrei
663a50dd4e Adwaita: better colorswatches for the dark theme
...which reveals a "nice" border/fill border radius issue.
2014-07-18 23:49:54 +02:00
Matthias Clasen
e2cf8d2125 GtkLevelBar: implement clipping
So level bars can have shadows, too.
2014-07-18 17:47:53 -04:00
Lapo Calamandrei
cf62f66101 Adwaita: widget edge for switch and progressbars 2014-07-18 23:30:16 +02:00
Matthias Clasen
51a5cfc783 GtkSwitch: implement clipping
So switches can have shadows, too.

https://bugzilla.gnome.org/show_bug.cgi?id=733360
2014-07-18 16:37:18 -04:00
Matthias Clasen
c2907b8532 GtkProgressBar: implement clipping
This allows progress bars to have shadows.

https://bugzilla.gnome.org/show_bug.cgi?id=733361
2014-07-18 16:32:46 -04:00
Jasper St. Pierre
a3c12ffccb gtkwindow: Clean up gtk_window_move_resize a bit more
Don't shadow existing variables. Instead of sharing the allocation and
then overwriting the width/height when convenient, declare it in the
block we use it in, as, really, the three different paths are all
extremely different, and there's no sense in sharing the variable.
2014-07-17 13:10:50 -04:00
Jasper St. Pierre
927b5a592f gtkwindow: Remove a bogus comment
gtk_window_configure_event certainly doesn't fill the new allocation
in. We're filling it in right here!
2014-07-17 13:10:50 -04:00
Matthias Clasen
24e707315f GtkDialog: Be more careful in handling the headerbar
Just because an action widget has a parent thats a headerbar,
it is not guaranteed that it is 'our' headerbar. Add some
assertions to enforce this.
2014-07-17 12:53:54 -04:00
Matthias Clasen
7b40714541 GtkDialog: rejigger headerbar handling
We can't avoid calling set_titlebar in buildable_add_child, since
GtkBuilder assumes that it can e.g. call grab_default at the end,
which only works if the widget is inside a toplevel at that point.

Instead, drop the titlebar and clean up priv->headerbar in constructed
if we find that we don't want a headerbar.
2014-07-17 12:49:57 -04:00
Sébastien Wilmet
dc1317a521 textiter: fix bug in find_visible_by_log_attrs()
find_by_log_attrs() can return true only in this case:
return moved && !gtk_text_iter_is_end (arg_iter);

So if the iter moved (i.e. something has been found), but is the end
iter, find_by_log_attrs() returns false.

Now the same checks are made in find_visible_by_log_attrs(). The public
functions using find_visible_by_log_attrs() say in their documentation
that false is returned for the end iter, hence the check with
gtk_text_iter_is_end().

https://bugzilla.gnome.org/show_bug.cgi?id=618852
2014-07-17 12:56:57 +02:00
Sébastien Wilmet
69d20f53e2 textiter: fix bug in FindLogAttrFunc functions
attrs[len] is the last PangoLogAttr available, at the iter position after the
last character of the line.

For a line in the middle or the start of the buffer, the '\n' is taken
into account by 'len'. For example the is_word_end is generally reached
before the '\n', not after. But for the last line in the buffer, where
there is no trailing '\n', it is important to test until attrs[len].

The bug didn't occur before because find_by_log_attrs() worked directly
on the iter passed as the function argument. But now it is no longer the
case.

https://bugzilla.gnome.org/show_bug.cgi?id=618852
2014-07-17 12:56:56 +02:00
Sébastien Wilmet
76f3866bd3 textiter: make the FindLogAttrFunc functions clearer
- Return true (found) and false (not found) explicitly.
- Set found_offset only when something has been found.

find_backward_cursor_pos_func() was a bit different, the while loop had
the condition "offset > 0" but the return was "offset >= 0". Probably a
micro-optimization, since offset == 0 is always a cursor position.
Anyway now the code is the same as the other functions.

https://bugzilla.gnome.org/show_bug.cgi?id=618852
2014-07-17 12:56:56 +02:00
Sébastien Wilmet
37f5f78f81 textiter: simplify FindLogAttrFunc
The min_offset parameter was always 0. Since there are some bugs in this
code, it'll be clearer if there are fewer parameters.

https://bugzilla.gnome.org/show_bug.cgi?id=618852
2014-07-17 12:56:56 +02:00
Sébastien Wilmet
5d66634482 textiter: fix bug in find_by_log_attrs()
Do not work with the iter passed as the function argument. Work with
another iter, and set it back to the function argument only if something
has been found.

This fixes a few unit tests. But there are regressions for a few others.

https://bugzilla.gnome.org/show_bug.cgi?id=618852
2014-07-17 12:56:56 +02:00
Matthias Clasen
f7e94a7389 GtkPathBar: Add a style class
This will allow nautilus to reuse the style on its own
pathbar widget.
2014-07-17 06:48:36 -04:00
Matthias Clasen
f3ef3165df GtkIconTheme: Make spinners scale in hi-dpi
The Adwaita icon theme ships spinners in a scalable directory
with MaxSize=32 and Scale=1. One way to make them scale up in
hi-dpi would be to add an @2 directory with MaxSize=32 and Scale=2,
but that directory would also be consulted in non hi-dpi situations
and give us an effective spinner max size of 64.

Instead, treat svg icons implicitly as hi-dpi, and scale them
up to MaxSize * 2 when in hi-dpi.
2014-07-17 00:59:34 -04:00
Volker Sobek
a80e77ff95 GtkMenu: Don't subtract shadow from requisition
This was causing menus to show up in the wrong position in case the menu
popped up towards the top and/or left.

The change to the requisition was in error; it is the allocated size
of the menu, not the toplevel, and doesn't include the shadow.

https://bugzilla.gnome.org/show_bug.cgi?id=591258
2014-07-16 23:29:35 -04:00
Matthias Clasen
bb6057bfb7 GtkStackSwitcher: Simplify setting of .needs-attention
Always add the .needs-attention style class, even if the button
is active. Themes can already avoid showing anything in this case.
2014-07-16 21:08:27 -04:00
Lapo Calamandrei
e084e5c67e Adwaita: increase padding on header-bar and action-bar text buttons 2014-07-16 19:47:54 +02:00
Lapo Calamandrei
0d1b036e58 Adwaita: stack switcher needs-attention class style 2014-07-16 19:42:17 +02:00
Lapo Calamandrei
4053ee0cca GtkStackSwitcher: center the button child
Set button child halign to GTK_ALIGN_CENTER since I need it to style
the needs-attention class, see:
https://bugzilla.gnome.org/show_bug.cgi?id=707153
2014-07-16 19:35:29 +02:00
Volker Sobek
4af59dbd98 Adwaita: Add back a margin of 4px to .menu
This had originally been added to Adwaita in the gnome-themes-standard
commit 7bf01517bc2 but was lost during 3.13 theme changes, causing bug
591258 to reappear.
2014-07-16 17:21:51 +02:00
Chun-wei Fan
64e5d6ee3a gtk-inspector: size-groups.c: Fix build on pre-C99
Declare variables at the top of the block.
2014-07-16 17:58:20 +08:00
Matthias Clasen
fffd58fca8 GtkListBox: Mention activatable and selectable in the docs 2014-07-15 23:57:34 -04:00
Matthias Clasen
0bfad993ac GtkListBox: Implement non-selectable rows
This commit changes things so that we never mark non-selectable
rows as selected.
2014-07-15 23:57:33 -04:00
Matthias Clasen
7932370ef8 GtkListBox: Style selectable rows differently
We now apply the .button style class to rows that are either
activatable or selectable. Selectable rows only get the .button
if the listbox allows selection. This implies that we need to
update row styles when the selection mode changes, or when the
row gets added to a listbox.
2014-07-15 23:56:47 -04:00
Matthias Clasen
71f589c0b0 GtkListBox: Add a GtkListBoxRow:selectable property
Having an explicit property for this will make it easier
to have a hover style only for rows which are activatable
or selectable.

Rows are selectable by default, to preserve compatibility.
2014-07-15 23:56:47 -04:00
Matthias Clasen
880c6678eb Fix documentation typos 2014-07-15 23:56:47 -04:00
Matthias Clasen
83e9e0bd8f GtkListBox: Refactor ::activatable implementation
Store the value in the row struct, and split the style updating
out into a separate function.
2014-07-15 22:42:29 -04:00
Matthias Clasen
dc87027af9 Try harder to fix dialog titles
https://bugzilla.gnome.org/show_bug.cgi?id=733099
2014-07-15 21:31:13 -04:00
Руслан Ижбулатов
e3d725ed8c GktIconTheme: Be even more careful with paths
This is a followup for 5a252f13a8

https://bugzilla.gnome.org/show_bug.cgi?id=733189
2014-07-15 19:02:41 +00:00
Jasper St. Pierre
2e4018c386 gtkwindow: Clean up the code for an optimization
It's hard to figure out what the "expected_reply" means except under
close examination -- it's actually talking about whether this was a
reply to a ConfigureRequest or not. The inversion in the check doesn't
help either.

Make the code cleaner by moving it above the freeze/thaw case, and
making the check more explicit and without a confusing variable. If we
haven't sent any ConfigureRequests out, then it must be a gratuitous
ConfigureNotify.
2014-07-15 14:49:16 -04:00
Jasper St. Pierre
b7a8bde895 gtkwindow: Fix the comment for an optimization
The optimization was incorrect, and so it was changed in commit
2bf6824, but the comment to go along with it was never updated.
2014-07-15 14:49:16 -04:00