Commit Graph

46104 Commits

Author SHA1 Message Date
Matthias Clasen
e8ad47498b path bar: Don't hide arrows
Changing the visibility of child widgets in size-allocate does
not work well with out current allocation and layout machinery.
To avoid the visual fallout, just keep the arrow buttons visible
and only change their sensitivity.

https://bugzilla.gnome.org/show_bug.cgi?id=754868
2016-01-24 16:29:40 -05:00
Matthias Clasen
761120a5e2 inspector: Show CSS pseudoclass names for node state
This is a better fit for showing CSS node state, since one
commonly looks at this information to devise CSS selectors,
where the CSS names are needed.
2016-01-24 10:59:46 -05:00
Matthias Clasen
33bb1af277 css: Privately export a function to get pseudoclass names
This function centralizes the mapping for widget states
to pseudoclass names in one place, for easier maintenance.
2016-01-24 10:59:46 -05:00
Timm Bäder
f0439264aa gdkdnd: Fix signal docs
Signals all have at least one parameter, the object that received the
signal.
2016-01-24 10:48:48 +01:00
Timm Bäder
d6f989f59c Inspector: Plug a few leaks 2016-01-24 08:01:36 +01:00
Matthias Clasen
43747a6b30 paned: Initialize max_position
As pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=608865
max_position should be set to G_MAXINT.
2016-01-24 00:22:31 -05:00
Matthias Clasen
873a024f5b widget-factory: Add a color editor example 2016-01-23 22:30:59 -05:00
Matthias Clasen
a80b555274 color editor: Ensure spin buttons are wide enough
If we don't explicitly ask for 2 chars to be visible, we might
get less, and it doesn't look great.
2016-01-23 18:26:09 -05:00
Sebastien Lafargue
526fd89ec5 GtkColorChooser: make set_rgba work in editor mode
When using the color chooser in editor mode,
gtk_color_chooser_set_rgba need to be propaged
to the editor

https://bugzilla.gnome.org/show_bug.cgi?id=761005
2016-01-23 18:16:51 -05:00
Matthias Clasen
5febf4f170 Add a color editor test
This tests using a color editor embedded in other ui.
2016-01-23 18:16:51 -05:00
Matthias Clasen
770e308c9e widget-factory: Ensure spinbuttons are sized right
GtkEntry now respects the padding set by the theme, so we
need to ask the spin buttons to show 2 characters, otherwise
they will be clipped.
2016-01-23 18:16:51 -05:00
Matthias Clasen
8ba996a6db container: Clarify the forall/foreach documentation
Try to make the difference between these two functions
clearer.
2016-01-23 18:16:51 -05:00
Phil Clayton
695860958a Add missing (out) annotation to gdk_rgba_parse
https://bugzilla.gnome.org/show_bug.cgi?id=754990
2016-01-23 18:16:51 -05:00
Mario Blättermann
b208edacc2 Updated German translation 2016-01-23 18:21:45 +01:00
Ignacio Casal Quinteiro
05f1994808 win32 geometry: reorganize code to avoid prototypes 2016-01-23 14:43:57 +01:00
Ignacio Casal Quinteiro
3bb23ef2fe win32 device manager: reorganize code to avoid prototypes 2016-01-23 14:43:55 +01:00
Ignacio Casal Quinteiro
b3eaaa5a2c win32 virtual device: reorganize code to avoid prototypes 2016-01-23 14:43:52 +01:00
Ignacio Casal Quinteiro
36c3f21989 win32 device: reorganize code to avoid prototypes 2016-01-23 14:43:50 +01:00
Ignacio Casal Quinteiro
ca4ffbfe80 wintab: reorganize code to avoid prototypes 2016-01-23 14:43:47 +01:00
Timm Bäder
ddbafa023a overlay: Don't access priv pointer before typ check 2016-01-23 10:30:53 +01:00
Matthias Clasen
8096740ea4 levelbar: Document CSS node ordering 2016-01-22 23:30:36 -05:00
Matthias Clasen
2cf983eb30 notebook: Document CSS node order 2016-01-22 23:14:09 -05:00
Matthias Clasen
73307f78dc box gadget: Don't allow shifting too far
We don't want to let baseline adjustment shift the child
out of the original allocation. This is purely a sanity
measure - in practice, the baseline should always be bigger
than the child_baseline.
2016-01-22 22:49:01 -05:00
Matthias Clasen
50e923349e box gadget: Fix baseline calculation
Careful comparison with GtkBox revealed that the box gadget
code was confusing up and down, and thus shifted baselines
vertically.
2016-01-22 22:47:47 -05:00
Matthias Clasen
57baf6804b inspector: Show baseline value
The misc info page already shows the allocation and clip areas,
the baseline fits right in.
2016-01-22 22:24:46 -05:00
Matthias Clasen
e26300625f box gadget: Fix baseline allocation for widgets
We were adjusting the allocation to line up baselines before
calling gtk_widget_size_allocate_with_baseline, but that function
is doing this alignment internally anyway and expects to be given
a 'fill' allocation.

Move the allocation adjustment code down into
gtk_box_gadget_allocate_child where it only affects child gadgets,
not child widgets.
2016-01-22 22:08:38 -05:00
Matthias Clasen
029d568b04 gadget: Add baseline debugging
This should help to understand whats going wrong with
baselines.
2016-01-22 21:34:54 -05:00
Matthias Clasen
5469f26260 Adwaita: Move .ssd class around
Make the theme follow our documentation for the various .csd and
.ssd style classes: They all go on the window node. For now, just
add the new selector; the old one will be removed when mutter has
been updated.

https://bugzilla.gnome.org/show_bug.cgi?id=760714
2016-01-22 19:23:54 -05:00
Matthias Clasen
3d52fd3992 box gadget: Fix height-for-width handling
When measuring children while distributing a given height,
we must measure them for the given width that goes with
the height. Otherwise, things will go wrong if some of the
children do actual width-for-height. This was showing up
as misaligned images in anaconda.

https://bugzilla.gnome.org/show_bug.cgi?id=760967
2016-01-22 17:15:33 -05:00
Carlos Garnacho
f32a54fb70 GtkTreeView: Update prelight row after revalidating rows
It might have changed (eg. after a row being expanded, and the child
rows revalidated), so just update it here based on the last pointer
position.

Based on a patch by Maxim Reznik <reznikmm@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=760891
2016-01-22 21:18:24 +01:00
Carlos Garnacho
a5f9dc1284 GtkTreeView: Avoid device query on collapsing rows
The pointer position is queried to properly trigger the prelight
updates on the new row below it. We store the last coordinates
though, and track crossing events to unset these, so it's safe
to just update_prelight() here on these.
2016-01-22 21:18:24 +01:00
Benjamin Otte
0a9e9db9f4 shortcuts: Don't forall() widgets that aren't children 2016-01-22 20:39:14 +01:00
Benjamin Otte
efc899bd2b widget: Improve gtk_cairo_should_draw_window()
Check that non-native window are indeed children of the event window and
only then confirm that they should be drawn.

Fixes Glade thinking that it's okay to have the draw function do
different things depending on what window to draw. (This should really
be fixed in Glade.)
2016-01-22 14:18:15 +01:00
Benjamin Otte
74c3468d64 cssstyleproperty: Don't allow assigning min-width/min-height 2016-01-22 14:18:15 +01:00
Benjamin Otte
d4f853dc64 container: Turn assert into return_if_fail()
There's no reason to insta-crash when something goes wrong. Just don't
do anything stupid.

Also, remove the SPCIAL_CONTAINER() exception. Every case where special
containers needed this, it is wrong and made containers draw children
multiple times.
2016-01-22 14:17:28 +01:00
Benjamin Otte
6bb8da5564 stack: Clip animation drawing
We use cairo_paint() when doing that and we don't want to overdraw the
content area.
2016-01-22 13:46:01 +01:00
Benjamin Otte
a6845091f9 spinbutton: Make the entry gadget be the entry's gadget
This is a big and somewhat evil hack: We replace the entry's gadget's
node with the spinbutton's entry node.
2016-01-22 13:46:01 +01:00
Lapo Calamandrei
c7c17abdb9 Adwaita: fix checks and radios on selected row 2016-01-22 13:29:35 +01:00
Matthias Clasen
6a1722f689 text view: Don't leak cairo transforms
The text view draw function was leaving its cairo context
with a transformation after drawing to all the border windows,
which lead mis-drawing in gitg. Avoid this by moving the
gtk_cairo_transform_to_window call inside the existing
cairo_save/restore calls.

https://bugzilla.gnome.org/show_bug.cgi?id=760942
2016-01-21 23:39:16 -05:00
Matthias Clasen
eb2ef63211 wayland: Don't hardcode /tmp
As pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=760964,
we should use the GLib facilities for determining the preferred
location for temporary files.
2016-01-21 22:57:39 -05:00
Mario Blättermann
d3f18abf7d Updated German translation 2016-01-21 17:48:25 +01:00
Carlos Garcia Campos
0f7b4dad0f cssstyleproperty: Make it possible to query CSS opacity with gtk_style_context_get()
Add a query implementation to opacity property. Also fix the assert in
gtk_css_style_property_register() to allow registering properties with
query but without assign function.

https://bugzilla.gnome.org/show_bug.cgi?id=760933
2016-01-21 14:58:57 +01:00
Lapo Calamandrei
bd4aaa1285 Adwaita: first css check/radio implementation
draw checks and radios with css istead of relying on png assets.
2016-01-21 14:48:47 +01:00
Matthias Clasen
77a6d976b2 css: Fix refcounting thinko in -gtk-recolor
gtk_css_style_get_value does not return a reference.
So don't unref the return value without taking one.
2016-01-21 08:42:55 -05:00
Matthias Clasen
b4bfba00c4 Handle svg image assets in Adwaita
The build glue for collecting all the assets in Adwaita as
resources was assuming that they are all pngs, and tried to
preprocess them into embedded GdkPixbufs.
Fix it to leave svgs unmolested, so they can be recolored
at runtime.
2016-01-21 08:20:06 -05:00
Matthias Clasen
419f2c670d css: Handle image loading errors graciously
If we fail to load the image for a -gtk-recolor() expression,
fall back to using the image-missing icon instead of crashing,
and include more details in the warning message.
2016-01-21 08:19:37 -05:00
Matthias Clasen
ffc4f8ee11 Forgotten file 2016-01-21 08:18:28 -05:00
Matthias Clasen
52326e909a Adwaita: Set a text color for lists
Symbolic icons in list boxes came out white-on-white in the
inspector. Set an explicit text color to prevent that.
2016-01-20 22:53:47 -05:00
Matthias Clasen
e33bda3078 inspector: Show full allocation + clip
Previously, we were only showing the size of the allocation
and clip area. But there is no good reason to hide the position
of these rectangles, so add them, in the traditional format
of X geometry strings: wxh+x+y
2016-01-20 22:52:05 -05:00
Matthias Clasen
449a9c419a inspector: Refine typography
Use thin spaces in the formatting of monitor sizes.
2016-01-20 22:51:25 -05:00