Commit Graph

21245 Commits

Author SHA1 Message Date
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
Lapo Calamandrei
e201e6b230 Adwaita: white search bar for the file chooser 2014-07-15 19:09:58 +02:00
Lapo Calamandrei
8c57dcec28 Adwaita: correct background color for backdrop treeview column headers 2014-07-15 17:58:13 +02:00
Lapo Calamandrei
64ee268d71 Adwaita: brighter depressed buttons 2014-07-15 17:52:11 +02:00
Benjamin Otte
a43b90e49f pathbar: Implement clipping
.. so the path bar's buttons can have shadows.
2014-07-15 14:36:04 +02:00
Lapo Calamandrei
df0d3caa9a Adwaita: reorderable tabs inhert in backdrop 2014-07-15 13:28:40 +02:00
Lapo Calamandrei
3bb6b36c74 Adwaita: fix backdrop insensitie flat button 2014-07-15 13:01:48 +02:00
Lapo Calamandrei
9e770d5aad Adwaita: selected list rows inhert in backdrop 2014-07-15 10:25:40 +02:00
Lapo Calamandrei
f34e7ebc63 Adwaita: darker hover state again for spinbuttons button in the dark variant.
And for hovered list rows, since it works better and it's less
distracting.
2014-07-15 09:11:56 +02:00
Matthias Clasen
5a252f13a8 GktIconTheme: Be more careful with paths
Slapping file:// in front of a path does not guarantee a working
uri (e.g. if you are on windows and the path looks like F:\\...).
Therefore, go back to using g_file_new_for_path if we don't have
to deal with a resource.
2014-07-14 18:44:00 -04:00
Lapo Calamandrei
3a1645fea5 Adwaita: brighter spinbutton button active state for the dark variant. 2014-07-14 18:42:37 +02:00
Lapo Calamandrei
1345735cab Adwaita: bright spinbutton button hover effect in the dark variant.
In line with what we do for hovered list rows.
2014-07-14 18:37:31 +02:00
Lapo Calamandrei
b4519ac0cd Adwaita: list-row style 2014-07-14 18:29:08 +02:00
Matthias Clasen
27244fb9d7 listbox: Update docs
Multiple selection is supported now.
2014-07-14 08:48:33 -04:00
Matthias Clasen
daf05ad987 GtkTreeView: Avoid interference with animation
The animated scrolling interferes with incremental validation.
As short-term solution, disable scrolling animation during
incremental validation. This is not a proper solution, but
it avoids broken behavior like scrollbars that are not reacting
to clicks. The problem was visible, e.g. in the list view
example in gtk3-demo.
2014-07-13 23:04:40 -04:00
Matthias Clasen
aa5afb38e8 Fix a typo
A getter shouldn't return void.
2014-07-13 23:04:39 -04:00
Matthias Clasen
332fa9b848 Revert "GtkTreeView: Avoid interference with animation"
This reverts commit faa676ffa7.

It fixed the problematic list view example in gtk3-demo, but
broke all others :-(
2014-07-13 22:54:19 -04:00
Matthias Clasen
faa676ffa7 GtkTreeView: Avoid interference with animation
The animated scrolling interferes with incremental validation.
As short-term solution, disable scrolling animation during
incremental validation. This is not a proper solution, but
it avoids broken behavior like scrollbars that are not reacting
to clicks. The problem was visible, e.g. in the list view
example in gtk3-demo.
2014-07-13 22:00:59 -04:00
Matthias Clasen
7086080b03 Add a getter for the adjustment animation duration 2014-07-13 22:00:30 -04:00