Commit Graph

21563 Commits

Author SHA1 Message Date
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
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
Matthias Clasen
d35f664b1a inspector: Make values in general tab selectable 2014-07-13 16:08:44 -04:00
Matthias Clasen
639180790f inspector: Make listbox rows non-activatable 2014-07-13 16:03:32 -04:00
Matthias Clasen
a67570b9e0 listbox: Avoid a warning
Don't try to set an adjustment value if we don't have an adjustment.
2014-07-13 15:51:03 -04:00
Owen W. Taylor
fc6e2cc4b2 Handle resolution changes in the GDK backend code
gdk_x11_display_set_window_scale() affects the interpretation of the
Xft/DPI XSETTING - it is substituted inside GDK with the value of
Gdk/UnscaledDPI xsetting. However, this change is not propagated to
GTK+ and from GTK+ back to gdk_screen_set_resolution() until the
main loop is run.

Fix this by handling the screen resolution directly in gdk/x11.
This requires duplication of code between GDK and GTK+ since we still
have to handle DPI in GTK+ in the case that GdkSettings:gtk-xft-dpi
is set by the application.

https://bugzilla.gnome.org/show_bug.cgi?id=733076
2014-07-13 15:35:23 -04:00
Stefano Facchini
cef6f34fb7 inspector: Do not accidentally change tab in the object notebook
The "hide-and-show" dance makes the notebook select the next tab.

https://bugzilla.gnome.org/show_bug.cgi?id=733092
2014-07-13 15:19:27 -04:00
Matthias Clasen
66428bdd70 Adwaita: Work towards working touch selection popups
This fixes some of the confusion around toolbars inside .osd.
The look is not perfect, but less broken than before.
2014-07-13 14:38:43 -04:00
Matthias Clasen
d4e8a501a0 GtkTextHandle: Better draw() implementation
Conceptually, text handles are boxes, whose content is a 'handle',
so draw background, frame and handle. With this, and the previous
commit, the cursor-handle theming in Adwaita now works as intended.
2014-07-13 13:58:16 -04:00
Matthias Clasen
f8950bf878 Allow to use -gtk-icon-source for handles
This will let us use icons for touch selection handles, once
they use gtk_render_handle.
2014-07-13 13:56:14 -04:00
Matthias Clasen
5641fba7c6 Adwaita: Try to fix up selection touch handles
The text handles reuse the style context from their parent widget,
and just add .cursor-handle. That means that the more specific
entry selectors override the .cursor-handle theming unless we
select for .entry.cursor-handle. We also need to work harder to
keep the .entry styling from drawing decorations around the outlines.
2014-07-13 13:34:59 -04:00
Matthias Clasen
a2ac9e1baa listbox: Scroll headers on screen
The listbox code relies on the container focus adjustment handling
to scroll the cursor row on screen. But GtkContainer has no idea
about row headers, so ensure that we scroll the header on screen too.
2014-07-13 13:00:37 -04:00
Sébastien Wilmet
472fd9a75f textiter: small optimization for find_by_log_attrs()
Use gtk_text_iter_set_line_offset (&tmp_iter, 0) instead of
gtk_text_iter_get_line(). The difference should not be big. In the first
case the line doesn't need to be traversed thanks to the offset 0. For
get_line(), the btree must be traversed.

A temporary iter is needed to not break the behavior. But the behavior
is quite strange, the function works directly on the iter passed as an
argument to the function, even if the function returns FALSE (not
found). So maybe a later commit will fix this strange behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=629129
2014-07-13 17:08:52 +02:00
Sébastien Wilmet
7f6ae622d3 textiter: remove recursivity of find_by_log_attrs()
find_by_log_attrs() was a recursive function. It is replaced by an
iteration.

The already_moved_initially parameter was TRUE only for the recursive
call, so the paramater is removed.

There is also a small cleanup of the find_visible_by_log_attrs()
(remove trailing spaces, fix indentation).

There is still a part to optimize for a later commit.

https://bugzilla.gnome.org/show_bug.cgi?id=629129
2014-07-13 17:08:52 +02:00
Matthias Clasen
97b9d8e4ae GtkDialog: Set window titles in header bars
This is fallout from the recent dialog changes. We don't set the
headerbar as titlebar early enough anymore, so when the window title
gets set, it does not get passed on to the headerbar. So, re-set it
manually when the titlebar is put in place.

https://bugzilla.gnome.org/show_bug.cgi?id=733099
2014-07-13 09:58:31 -04:00
Paolo Borelli
808705327d list-box: fix typo in natural size computation 2014-07-13 15:47:03 +02:00
Matthias Clasen
3e48fc8878 Adwaita: Some theming for activatable list rows 2014-07-13 09:26:35 -04:00
Matthias Clasen
2b9285e52e GtkListBox: Add an activatable property for rows
This will let us theme activatable rows differently.
We also avoid emitting the ::row-activated signal for
rows that are not activatable. For compatibility reasons,
rows are activatable by default.

https://bugzilla.gnome.org/show_bug.cgi?id=733112
2014-07-13 09:26:27 -04:00
Matthias Clasen
6f6cedcc66 Trivial typo fix 2014-07-12 14:47:48 -04:00
Matthias Clasen
9d26ea42ac Fix the build
gtkx.h can no longer be included internally, so skip it when
generating the gir. We include the individual headers anyway.
2014-07-12 01:56:55 -04:00
Matthias Clasen
91133fc14c inspector: Reshuffle Visual and General tabs
Move the touchscreen switch to the other debug switches, and
move the hidpi spin to the other graphical controls. Since the
Visual tab is getting large, make it scroll. The General tab
is purely informational again.
2014-07-12 01:45:44 -04:00
Benjamin Otte
02ccfb5d62 GtkStack: Render a background
https://bugzilla.gnome.org/show_bug.cgi?id=733027
2014-07-12 07:16:33 +02:00
Benjamin Otte
f35ec11578 label: Include all of the allocation in the clip
Otherwise, the CSS background we draw would be clipped if the ink rect
was smaller than the allocation (a very common thing).

Broken since 37030a7710 where we clipped
to the ink rect.
2014-07-12 07:13:28 +02:00
Benjamin Otte
0be93f8e86 gtkx: Warn if we include gtkx.h during GTK compilation 2014-07-12 07:13:28 +02:00
Benjamin Otte
fcbbe54936 a11y: Do not include gtkx.h directly 2014-07-12 07:13:27 +02:00
Benjamin Otte
3332492281 socket: Don't include gtk.h
And fix remaining headers to not emit warnings
2014-07-12 07:13:27 +02:00
Matthias Clasen
c1867761ca Revert "GtkStack: Render background and chain up gtk_widget_draw ()."
This reverts commit f6695b962f.
2014-07-12 00:33:19 -04:00
Matthias Clasen
4ef2f24c75 inspector: Reshuffle visual tab 2014-07-12 00:17:43 -04:00
Matthias Clasen
dfb2b6328e inspector: Reorder tabs
Move Resources next to Objects, and Visual next to General.
2014-07-12 00:10:59 -04:00
Matthias Clasen
c526634fdb inspector: Fix the build
I forgot to test the previous commit with -Wimplicit-function-delcaration,
and it promptly broke.
2014-07-11 23:45:18 -04:00
Matthias Clasen
f8986d9aa7 inspector: Clean up includes
Don't include gtk.h, instead include individual headers.
And include config.h and gi18n-lib.h everywhere.
2014-07-11 23:14:04 -04:00
Matthias Clasen
28998425d9 inspector: Don't mark environment variables for translations
These names don't change with the locale, after all.
2014-07-11 22:29:58 -04:00
Timm Bäder
0840f13c15 gtklabel: Set the correct initial cursor
Use GDK_XTERM only if the label is really selectable.

https://bugzilla.gnome.org/show_bug.cgi?id=732970
2014-07-11 21:24:21 -04:00
William Hua
f6695b962f GtkStack: Render background and chain up gtk_widget_draw ().
https://bugzilla.gnome.org/show_bug.cgi?id=733027
2014-07-11 20:46:03 -04:00
Matthias Clasen
cfec3ba794 Document that the drag icon window will be modified
This is in response to the complaint in
https://bugzilla.gnome.org/show_bug.cgi?id=732991
2014-07-11 18:09:47 -04:00
Руслан Ижбулатов
609f4c05ae Correctly generate def files again 2014-07-11 18:22:29 +02:00
Matthias Clasen
deefe3cd6a inspector: Add comments
The binding support pokes some not-quite-official (or entirely
private) implementation details. Add comment to warn about this.
2014-07-11 10:27:00 -04:00
Matthias Clasen
f4b961c6ac inspector: Show settings bindings
Similar to the previous commit, show settings bindings for
properties in the property editor.
2014-07-11 00:48:51 -04:00
Matthias Clasen
d8880bf7ab inspector: Show property bindings
This commit add information about existing bindings to the
property editor.
2014-07-10 23:57:37 -04:00
Matthias Clasen
c3b20e3d11 Adwaita: Set background color of header buttons
Without a background, one can see titles shine through when
resizable columns are squeezed.
2014-07-10 19:36:26 -04:00
Matthias Clasen
425d785de5 inspector: Allow setting hidpi scale 2014-07-10 18:36:16 -04:00
Matthias Clasen
614412e913 inspector: Show GSETTINGS_SCHEMA_DIR when set 2014-07-10 17:37:26 -04:00
Matthias Clasen
bce5a0f1a1 GtkTreeViewColumn: a better way to avoid overlap
The overlap was caused by using pack-end for the arrow, which
causes it to be allocated from the other end. Avoid the problem
by using pack-start for both the title and the arrow, and
reordering them according to xalign.
2014-07-10 15:21:17 -04:00
Carlos Garnacho
cb6ef5c222 Adwaita: Add comment around the .overshoot style class
And document the oddities around it, as requested by Lapo
2014-07-10 20:44:55 +02:00
Carlos Garnacho
b3ab5088df treeview: remove needless duplicate gtk_widget_set_parent_window() call
This same call happens a few lines above.
2014-07-10 20:44:55 +02:00
Matthias Clasen
4aa649e9cd GtkTreeView: Avoid overlapping sort indicator
Hide the sort indicator when it would overlap the column title.
2014-07-10 14:22:59 -04:00
Benjamin Otte
3e82d12abd widget: Remove special case for clipping
Labels now call gtk_widget_set_clip() so there is no longer a need to
exclude them from clipping.
2014-07-10 18:56:35 +02:00
Benjamin Otte
37030a7710 label: Add ink rect support to GtkLabel 2014-07-10 18:56:34 +02:00
Benjamin Otte
a97901b1f7 label: Move function
This just moves the function, no actual code changes.
2014-07-10 18:56:34 +02:00
Javier Jardón
c5b0ae5574 docs: Change documentation to consistenly use "Returns:"
Instead "Return value:" or "Return:"
2014-07-10 16:54:34 +01:00
Matthias Clasen
8883074497 inspector: Disable non-functional controls
Some of the features we expose can be hardcoded via environment
variables. In that case, don't confuse the user by letting them
change settings that have no effect.
2014-07-10 10:33:27 -04:00
Matthias Clasen
7fa4d60bf3 inspector: Add a switch for simulating touch
This makes it easy to test test touchscreen features with a
plain old mouse.
2014-07-10 10:12:02 -04:00
Matthias Clasen
34245515e5 Add a 'touchscreen' debug flag
This has the same effect as the GTK_TEST_TOUCHSCREEN environment
variable, but can be toggled at runtime.
2014-07-10 10:12:02 -04:00
Lapo Calamandrei
562a942f99 Adwaita: treeview progressbar fix 2014-07-10 15:47:57 +02:00
Lapo Calamandrei
294e82a753 Adwaita: saner treeview lines style plus treeview expander style 2014-07-10 14:59:08 +02:00
Lapo Calamandrei
63c88d5013 Adwaita: initial and hopefully temporary treeview separation lines style 2014-07-10 13:54:21 +02:00
Lapo Calamandrei
378c290150 Adwaita: drawing functions housekeeping 2014-07-10 12:22:41 +02:00
Lapo Calamandrei
17b679c866 Adwaita: simplify buttons drawing function 2014-07-10 11:55:51 +02:00
Matthias Clasen
5f549fa7cb Docs: Mention that shadow type is a lie
As requested here:
https://bugzilla.gnome.org/show_bug.cgi?id=659926#c2
2014-07-10 00:16:04 -04:00
Carlos Garnacho
d3b481ac19 Adwaita: Set a background color for the overshoot class
https://bugzilla.gnome.org/show_bug.cgi?id=731297
2014-07-09 23:15:16 -04:00
Carlos Garnacho
7bdc219464 scrolledwindow: Remove overshoot window and displacement animation
The displacement animation has been replaced by edge gradients, that
have a stronger color the harder overshooting is hit. This makes it
possible to remove the internal overshoot window, which was merely
used to have contents displaced when overshooting to top/left.

Overshooting to bottom/right used to cause queue_resize() to be
called on the scrolled window, this isn't necessary anymore either.

https://bugzilla.gnome.org/show_bug.cgi?id=731297
2014-07-09 23:13:48 -04:00
Carlos Garnacho
18c113cde1 stylecontext: Add GTK_STYLE_CLASS_OVERSHOOT
This class is meant to render the hint on scrolledwindow corners
when scrolling past-limits.

https://bugzilla.gnome.org/show_bug.cgi?id=731297
2014-07-09 23:11:42 -04:00
Carlos Garnacho
7178e342b1 textview: Call gtk_widget_size_allocate() on children widgets invariably
There was this hack, taken verbatim from GtkCList according to the comment,
that would recursively translate the allocation during scrolling, and set
it on children widgets through the direct gtk_widget_set_allocation() setter.

Since commit 4f89eb05cf, this has caused the wrong clipping areas to children
widgets of a textview. The reasons for this seem lost in time, and the approach
seems indeed wrong for windowed widgets as the repositioning of those windows
couldn't happen.

So replace all of this with just a gtk_widget_size_allocate() call, which does
work ok for the children widgets embedded in the "multiple views" gtk demo, and
ought to work for every other widget.

https://bugzilla.gnome.org/show_bug.cgi?id=732900
2014-07-09 22:57:52 -04:00
Carlos Garnacho
edc5cb4e47 treeview: Add back the Gdk pointer grab during column dragging
The reparenting happening on the column header so it gets a movable
window breaks the implicit grab, so this is one situation were we
want a pointer grab, if just to replace it.

https://bugzilla.gnome.org/show_bug.cgi?id=732933
2014-07-09 21:28:46 -04:00
Carlos Garnacho
5fb9c4441e treeview: Fix horizontal position during column dragging
Code was expecting view coordinates, not widget ones, as we're
only dealing with horizontal displacements, just adding the
horizontal adjustment value suffices.

https://bugzilla.gnome.org/show_bug.cgi?id=732933
2014-07-09 21:28:45 -04:00
Matthias Clasen
f547466029 Make Adwaita the default theme across platforms
This ensures that we have a polished out-of-the-box appearance
on all platforms.
2014-07-09 21:19:09 -04:00
Matthias Clasen
6abcda8391 Use a define for the default icon theme name
We're using this name in two places, so match what we are doing
for the default theme name, and use a macro.
2014-07-09 21:18:18 -04:00
Matthias Clasen
eee7057421 GtkIconTheme: Rename a macro
We use DEFAULT_THEME_NAME in gtksettings.c as well, and this
can be a confusing when grepping, so rename this to
FALLBACK_ICON_THEME.
2014-07-09 21:12:08 -04:00
Matthias Clasen
18ba0dee87 GtkColorButton: Some formatting cleanups 2014-07-09 21:08:18 -04:00
Matthias Clasen
afe8bd6db9 GtkColorButton: Use a color swatch
This saves some code and lets us reuse the color swatch styling.
Among other things, this fixes a lack of discernible border when
the selected color is very similar to the background.

https://bugzilla.gnome.org/show_bug.cgi?id=680885
2014-07-09 20:50:47 -04:00
Matthias Clasen
b68a28fbb0 GtkColorSwatch: Respect an explicitly set size
This will let us use a suitably sized color swatch in the color
button.
2014-07-09 20:44:06 -04:00
Matthias Clasen
da699bcaba app chooser: Move buttons to template
Use the new builder dialog action support.
2014-07-09 19:48:27 -04:00
Matthias Clasen
9aad874fad font chooser: Move buttons to template
Use the new builder dialog action support.
2014-07-09 19:48:22 -04:00
Matthias Clasen
ee06083c6b color chooser: Move buttons to template
We can now use the new builder action support.
2014-07-09 19:48:01 -04:00
Matthias Clasen
8afd4b71e9 GtkDialog: Fix setting of default action
The recent reshuffling caused an ordering problem where we would
hide the action area before relocating the buttons to the header
bar. But hiding makes the default button loose its defaultness.
Rearrange things so that we move the buttons before hiding the
action area, and thus preserve the default.
2014-07-09 19:48:01 -04:00
Lapo Calamandrei
ef3b5ca735 Adwaita: vertically linked buttons 2014-07-09 19:38:12 +02:00
Stefano Facchini
cd71a23ee2 icontheme: Use correct URI for icons in resource paths
Fix based on a patch by Stefano Faccini,
https://bugzilla.gnome.org/show_bug.cgi?id=732894
2014-07-09 11:01:40 -04:00
Matthias Clasen
0abb2f57fd Update more places for the changed icon name 2014-07-09 08:03:57 -04:00
Allan Day
add36eb488 message dialogs - remove extraneous padding
Removes unnecessary padding above message dialog headings. This
makes the dialogs look much more balanced.

https://bugzilla.gnome.org/show_bug.cgi?id=732857

https://bugzilla.gnome.org/show_bug.cgi?id=732882
2014-07-08 23:14:14 -04:00
Carlos Garnacho
d5b96b95a0 range: Avoid animations during slider drag
If the drag gesture gets a GtkGesture::updated signal, the user
is directly interacting through pointer/touch with the range slider,
animating the adjustment value change in this situation can produce
perceived lag, so set the value immediately when this is happening.
2014-07-08 21:14:41 -04:00
Carlos Garnacho
ea19e595a1 textview: Fix cursor positioning oddities when scrolling through Pg Up/Down
Use the adjustment target value when repositioning the cursor, and remove the
checks that ensured the cursor was made onscreen immediately, as there will
be definitely a delay on animated adjustment changes.
2014-07-08 21:14:41 -04:00
Carlos Garnacho
6aa8511495 textview: Use adjustment animations in gtk_text_view_scroll_to_iter()
This makes keyboard-triggered scrolling animated, as this function is
used underneath in order to make the cursor onscreen after it is
displaced.
2014-07-08 21:14:41 -04:00
Carlos Garnacho
f7e983a4c9 textview: Use the adjustment target value to figure out if keynav failed
When moving the cursor, compare current adjustment value with the post-animation
target value, in order to avoid false "keynav failed" positives as the animation
hasn't started yet, so dx/dy are still 0 at that time.
2014-07-08 21:14:41 -04:00
Carlos Garnacho
ee0982ffe3 adjustment: Add private gtk_adjustment_get_target_value() method
This call returns either the target value if there is an ongoing animation,
or the current value if there is no animation.
2014-07-08 21:14:40 -04:00