Commit Graph

21319 Commits

Author SHA1 Message Date
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
Lapo Calamandrei
75b71869ae Adwaita: minor fixes 2014-07-08 21:33:48 +02:00
Lapo Calamandrei
51316a9689 Adwaita: update comments in drawings 2014-07-08 18:28:02 +02:00
Lapo Calamandrei
2619e40715 Adwaita: buttons on gtkvolume popup 2014-07-08 18:24:28 +02:00
Lapo Calamandrei
05ec121f3e Adwaita: spinbutton button inhert in backdrop 2014-07-08 16:54:21 +02:00
Matthias Clasen
88a86fa044 GtkScaleButton: Add a style class to the scale button popover
Set the .scale-popup style class on the popover of scale buttons.
This lets us select the +/- buttons and style them appropriately.
2014-07-08 10:47:01 -04:00
Lapo Calamandrei
71f328e8c2 Adwaita: remove the image effect for buttons icons in backdrop 2014-07-08 16:42:10 +02:00
Lapo Calamandrei
e399e68392 Adwaita: inhert scrollbars in backdrop 2014-07-08 16:36:02 +02:00
Matthias Clasen
0a34633914 GtkScaleButton: Set +/- sensitivity
The buttons should go insensitive when we are at their end of
the scale.
2014-07-08 10:27:30 -04:00
Matthias Clasen
89ada16998 GtkMenuButton: Use view-context-menu-symbolic when direction is NONE
This makes it easier to construct gear menus: just set the direction
to 'none', no need to manually construct an image.
2014-07-08 09:30:16 -04:00
Lapo Calamandrei
abb72efe8b Adwaita: column header dnd style.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=731663
2014-07-08 14:36:30 +02:00
Lapo Calamandrei
f15b61421a Adwaita: selection mode and selection menu tweaks 2014-07-08 12:52:55 +02:00
Lapo Calamandrei
3478156fb4 Adwaita: generalize inline and search bars
So the style get applied not only to say .toolbar.search-bar, but
.search-bar. Need to figure out something for possible missing borders.
2014-07-08 11:22:59 +02:00
Lapo Calamandrei
117b719816 Adwaita: selection menu button style fixes 2014-07-08 10:46:39 +02:00
Lapo Calamandrei
a3b98eab92 Adwaita: fix reorderable tab label color once again 2014-07-08 10:17:31 +02:00
Rico Tzschichholz
eec6deba90 build: Fix make dist 2014-07-08 10:13:39 +02:00
Lapo Calamandrei
461acd6e42 Adwaita: style notebook tab overflow arrow 2014-07-08 10:06:57 +02:00
Matthias Clasen
d49d592316 GtkImage: Add cairo surface api to the docs
https://bugzilla.gnome.org/show_bug.cgi?id=732861
2014-07-07 22:36:56 -04:00
Matthias Clasen
d1099b1759 Document gtk_application_get_menu_by_id 2014-07-07 19:44:39 -04:00
Jasper St. Pierre
1fb2756b99 gtkwindow: Remove the unused GTK_WINDOW_REGION_EDGE 2014-07-07 16:30:51 -04:00
Ryan Lortie
4948516100 GtkApplication: document icon path setup
https://bugzilla.gnome.org/show_bug.cgi?id=722092
2014-07-07 14:46:28 -04:00
Ryan Lortie
687a846923 GtkAppliation: setup icon theme resource path
If we have a resource base path for the application, set up an icon
theme search path based on it (within the default icon theme).

https://bugzilla.gnome.org/show_bug.cgi?id=722092
2014-07-07 14:46:27 -04:00
Ryan Lortie
868ee07f49 GtkApplication: use resources for loading menus
Use the new ::resource-base-path property on #GApplication to attempt to
load the menu layout of the application.

We look first at gtk/menus-appmenu.ui or gtk/menus-traditional.ui
depending on the setting of gtk_application_prefers_app_menu().  Failing
that, we fall back to the common case of gtk/menus.ui (which should
always be given).  This provides a convenient way for application
authors to provide a different set of menus, depending on the desktop
environment they find themselves in.

As is the intention with other resources, if the resource base path is
unset, nothing will be loaded.  Additionally, if the expected files are not
found, it is not an error -- just nothing happens.

https://bugzilla.gnome.org/show_bug.cgi?id=722092
2014-07-07 14:46:27 -04:00
Lapo Calamandrei
a6410c65f9 Adwaita: fix selection mode toolbar
Selection menu button still needs fixing
2014-07-07 20:33:19 +02:00
Benjamin Otte
80db4f9ce7 cssanimation: Fix animation-direction handling
"alternate" was behaving as "alternate-reverse" and vice versa.
2014-07-07 20:06:40 +02:00
Benjamin Otte
b6aecca71c css: Fix animation-direction parsing
We were parsig "alternate-reverse" as "alternate" and then complaining
about the "-reverse" junk at the end of the value.
2014-07-07 20:06:40 +02:00
Benjamin Otte
cb1ac0c056 clipboard: Fix compiler warning
Cast the type.
2014-07-07 20:06:40 +02:00
Benjamin Otte
2fde5e95ee textview: Fix compiler warning
No need to use braces anymore.
2014-07-07 20:06:39 +02:00
Lapo Calamandrei
e2af4853fc Adwaita: non csd message dialog and entry shadow fix
Made the non csd message dialog more similar to the csd one (to
match the csd one we need mutter theme changes), little shadow fix
for entry.
2014-07-07 19:53:57 +02:00
Lapo Calamandrei
e86f409f32 Adwaita: csd message dialog fixes.
Lighter shadow like popovers and bigger radius then buttons on
the background to avoid antialiasing artifacts.
2014-07-07 17:56:29 +02:00
Lapo Calamandrei
4422e27662 Adwaita: .grid-child 2px padding 2014-07-07 17:44:01 +02:00
Lapo Calamandrei
607bac7c69 Adwaita: entry shadows work.
For the transition to work the box-shadows types in the shadow list
needs to be matched in various states so I'm using transparent shadows
istead of resetting them when not needed.
2014-07-07 17:27:57 +02:00
Lapo Calamandrei
f12edc2d89 Adwaita: minor sass changes.
Made _button_border_color($c) mixin in _button_border($c) fuction.
2014-07-07 15:04:22 +02:00
Benjamin Otte
871d782e74 css: Don't special-case fill-mode in 'animation'
I have no idea why it was special cased when parsing the 'animation'
shorthand, but it caused crashes.

So remove the special case.
2014-07-07 14:26:05 +02:00
Lapo Calamandrei
b02837b2c2 Adwaita: style .subtitle like .dim-label 2014-07-07 14:17:51 +02:00
Lapo Calamandrei
fdd347a85a Adwaita: use opacity on dim-labels istead of a hack 2014-07-07 14:04:37 +02:00
Lapo Calamandrei
869d0f3d2f Adwaita: .dim-label 2014-07-07 13:30:53 +02:00
Jakub Steiner
0a0ae97d3c Adwaita: flat OSD style 2014-07-07 13:26:09 +02:00
Lapo Calamandrei
d96bdc357c Adwaita: fix combos and buttons padding issues.
For some strage reason (bug?) combobox buttons needs -2px vertical padding
wrt buttons to have the same size as buttons.
2014-07-07 11:47:30 +02:00
Matthias Clasen
a19bc50f64 GtkWindow: Elaborate the keybindings
Keep Ctrol-Shift-D as a straight toggle-the-inspector keybinding,
but make Ctrl-Shift-I always bring up the inspector, and point
it at the widget under the pointer.
2014-07-06 22:37:57 -04:00
Matthias Clasen
b0390a3349 GtkInspector: Add a function to select the widget under the pointer 2014-07-06 22:37:57 -04:00
Matthias Clasen
2a053cc6c3 GtkInspector: Add a style tab
This tab shows css properties of a widget, and their origin.
2014-07-06 22:37:57 -04:00
Matthias Clasen
2952739593 GtkCssProvider: Allow to enable debug at runtime
Add a private function that lets us decide at runtime whether to
keep css section information around - this will be useful in the
GtkInspector.
2014-07-06 22:37:57 -04:00
Matthias Clasen
b25b33f79f Drop a leftover declaration
This was left behind when resize grips were removed.
2014-07-06 22:37:57 -04:00
Matthias Clasen
a56a61d9cc Trivial rearrangement 2014-07-06 22:37:57 -04:00
Lapo Calamandrei
f99f52ff4a Adwaita: message dialog, destructive and suggested action buttons.
...and generic linked destructive and suggested action button fix.
2014-07-05 18:18:44 +02:00
Lapo Calamandrei
d648a2c7ac Adwaita: proper message dialog style.
Rounded bottom border added, custom style for csd versione only
[read: non csd version looks right now].
2014-07-05 16:30:43 +02:00
Matthias Clasen
9d527c83aa GtkHeaderBar: Use defines for style classes 2014-07-04 19:06:08 -04:00
Matthias Clasen
8328cfac92 Add defines for title style classes 2014-07-04 18:53:33 -04:00
Matthias Clasen
d9e475ed6a GtkScaleButton: Try harder not to pop over
When the popover does fit in the window, change the orientation
to make it fit.
2014-07-04 01:20:24 -04:00
Matthias Clasen
b5958d677f GtkWindow: Update default for has-default-grip
It is now FALSE.
2014-07-03 15:23:34 -04:00
Jasper St. Pierre
f4b212abd4 wayland: Add some dumb support for the TARGETS selection
The way that GtkTextView et al pop up their context menu is to first
query to see if the clipboard has some text, and if so, enable the Paste
menu item. But since the Wayland backend hasn't had the greatest
selection and clipboard code, the callback for the clipboard got dropped
on the floor.

Add some simple code to respond to the TARGETS selection.

This makes right-clicking on a GtkTextView work fine.
2014-07-03 13:29:14 -04:00
Jasper St. Pierre
ece9ae4bc5 gtkwindow: Remove resize grips
Resize grips were introduced for GNOME 3.0, before we had any of the
"new GNOME app" features like invisible borders and CSD. With OS X 10.6
and 10.7, Apple has replaced the classic grips in their applications
with invisible borders as well.

New GNOME app designs don't use resize grips anymore and the new
default theme for GTK+, Adwaita, disables them entirely by forcing their
width and height to 0.

They're past their time. Remove the code to support them. This can
always be reverted if some app relies on them.
2014-07-03 12:58:41 -04:00
Jasper St. Pierre
ed273e7518 gtkwindow: Fix compile warnings 2014-07-03 10:55:31 -04:00
Sébastien Wilmet
03b4c82f77 docs: make GtkWidget:margin-start and margin-end clearer
margin-start and margin-end have been added for RTL support, see:
https://bugzilla.gnome.org/show_bug.cgi?id=710238

So those properties are used only for the horizontal direction: left or
right, not top or bottom.

https://bugzilla.gnome.org/show_bug.cgi?id=732681
2014-07-03 14:50:22 +02:00
Matthias Clasen
196b9f8eea GtkSettings: fully undeprecate blink settings
We decided in f8412eca34 that
we still need to react to these for a11y reasons, but left
the (then) harmless property deprecation in place. Now, the
deprecation causes runtime warnings for merely reading the
property, so drop it.

https://bugzilla.gnome.org/show_bug.cgi?id=732667
2014-07-03 08:35:34 -04:00
Sébastien Wilmet
52efbb11ec doc: trivial fix 2014-07-03 14:15:10 +02:00
Lapo Calamandrei
7fa294038b Adwaita: some more notebook work...
...to try to make tab with close buttons to look better.
2014-07-03 13:19:11 +02:00
Jakub Steiner
8665f197d6 Adwaita: selection-mode selection-menu flat by default 2014-07-03 12:38:17 +02:00
Lapo Calamandrei
9044bf5328 Adwaita: style entry.warning and entry.error
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=724084
2014-07-03 12:29:25 +02:00
Lapo Calamandrei
d043125800 Adwaita: sidebar scrollbar fix.
.scrollbars-junction borders were removed by setting border-stylei: none,
it interacted (why?) with the scrollbars on sidebar, making the border
transparent seems not to have side effects there.
2014-07-03 11:01:31 +02:00
Lapo Calamandrei
c541e47c5e Adwaita: style progressbars in treeview cells.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732298
2014-07-03 10:30:14 +02:00
Lapo Calamandrei
e7a3dceb57 Adwaita: add transition to non flat popover buttons. 2014-07-03 09:31:51 +02:00
Matthias Clasen
b369719bcd inspector: Handle the dialog more carefully
When showing and hiding the inspector window repeatedly without
dismissing the dialog, we were hiding the inspector, but not
the dialog, leading to a confusing user experience.

https://bugzilla.gnome.org/show_bug.cgi?id=732443
2014-07-02 22:52:10 -04:00
Matthias Clasen
b0a7a6b042 GtkRange: Animate scrollbar jumps 2014-07-02 20:58:16 -04:00
Matthias Clasen
e31056f9b3 GtkListBox: Animate keybindings 2014-07-02 20:58:16 -04:00
Matthias Clasen
d331c949d6 GtkIconView: Animate keybindings 2014-07-02 20:58:16 -04:00
Matthias Clasen
ef40f54e31 GtkTreeView: Animate keybindings 2014-07-02 20:58:16 -04:00
Matthias Clasen
b04e3835cb GtkTextView: Animate keybindings 2014-07-02 20:58:16 -04:00
Matthias Clasen
939fbc43e1 GtkScrolledWindow: Animate the scroll-child keybinding 2014-07-02 20:58:16 -04:00
Matthias Clasen
36453a8a6b GktAdjustment: Add explicit api for animated setting
Making all set_value calls animated has side-effects, so
we need to be more selective.
2014-07-02 20:58:15 -04:00
Ryan Lortie
d3b34d3cf2 Add gtk_application_prefers_app_menu()
Applications can call this to determine if they should an app menu.
This will be %FALSE on desktop environments that do not have an
application menu like the one in gnome-shell.  It is %FALSE on Windows
and Mac OS.

Applications are completely free to totally ignore this API -- it is
only provided as a hint to help applications that may be interested in
supporting non-GNOME platforms with a more native 'look and feel'.

https://bugzilla.gnome.org/show_bug.cgi?id=722092
2014-07-02 20:17:34 -04:00
Matthias Clasen
8060ac6ddd GtkModelButton: Update widget state
We were only setting the state transiently in ::draw, leading
to various drawing anomalies, such as labels not picking up
the appropriate color from BUTTON styles.
2014-07-02 15:12:46 -04:00
Benjamin Otte
43788ba936 cssimageicontheme: Handle scale factors correctly
Code didn't account for the pixbuf returned being scaled.
2014-07-02 19:48:44 +02:00
Carlos Garnacho
5fe9ebfe11 entry: Do not unset selection if failing to update the primary selection
This is expected to happen on wayland and other platforms with no primary selection,
and just leads to the selected text being cleared after any attempt to change the
text selection itself through either mouse/keyboard.
2014-07-02 18:57:39 +02:00
Carlos Garnacho
67efefde49 textbuffer: Do not unset selection if failing to update the primary selection
This is expected to happen on wayland and other platforms with no primary selection,
and just leads to the selected text being cleared after any attempt to change the
text selection itself through either mouse/keyboard.
2014-07-02 18:57:39 +02:00
Lapo Calamandrei
8116e3e7b9 Adwaita: fix Gedit style tabs color.
I also introduced a gab between tabs as in the mockups.
2014-07-02 17:52:36 +02:00
Lapo Calamandrei
6e89856cc0 Adwaita: fix popover buttons.
Unfortunatelly labels doesn't change color wrt states.

See https://bugzilla.gnome.org/show_bug.cgi?id=732494
2014-07-02 17:27:12 +02:00
Lapo Calamandrei
f2972f13dd Adwaita: proper backdrop state for gtkcalendar header 2014-07-02 15:45:43 +02:00
Matthias Clasen
10892863d5 GtkDialog: fix invisible action area
When there area explicitly added buttons in the action area,
we were trying to ensure that the action area is visible,
but failed, since we are now hiding the action_box. Fix it
by showing the action_box when things are left in the action
area.
2014-07-02 00:33:46 -04:00
Jakub Steiner
c9152d2a71 Adwaita: transition :active buttons faster than the other states
https://bugzilla.gnome.org/show_bug.cgi?id=732134
2014-07-01 17:46:24 +02:00
Jakub Steiner
5e25bbb2ae Adwaita: no border-right on treeview-derived widgets
I fear to be opening a can of worms, but it does seem like
something the system theme should deal with.

https://bugzilla.gnome.org/show_bug.cgi?id=731463
2014-07-01 15:42:32 +02:00
Jakub Steiner
dfb4757f54 improve Calendar styling
slightly

https://bugzilla.gnome.org/show_bug.cgi?id=729620
2014-07-01 14:22:54 +02:00
Nikita Churaev
fa90b41fe4 Remove separators from GtkFileChooserButton and GtkFontButton
https://bugzilla.gnome.org/show_bug.cgi?id=722633
2014-07-01 13:02:43 +02:00
Matthias Clasen
2f5dbc655c GtkMessageDialog: Add back the empty csd title
We don't set use-header-bar for message dialogs, since we
want the buttons in the action area, but we do want a nice
rounded csd titlebar. Add back the box that was used before
to achieve this, when appropriate.
2014-06-30 21:51:19 -04:00
Matthias Clasen
120d1f8983 GtkDialog: Don't use csd when use-header-bar is FALSE
https://bugzilla.gnome.org/show_bug.cgi?id=730893
2014-06-30 21:44:40 -04:00
Lars Uebernickel
b6c4865ff8 gtkaboutdialog: support showing buttons in action area
Give GtkAboutDialog buttons in the action area instead of hard-coding
use-header-bar to TRUE. This is for environments which don't have the
Gtk/DialogsUseHeader xsetting turned on.

https://bugzilla.gnome.org/show_bug.cgi?id=730893
2014-06-30 19:07:56 -04:00
Matthias Clasen
bb6f406f13 inspector: Use a better icon on the css classes tab 2014-06-30 18:51:39 -04:00
Matthias Clasen
3dcd0a24b1 GtkScrolledWindow: Enable animated scrolling
We use gtk_adjustment_enable_animation to enable animated
updates of the adjustments. Currently, this is enabled
unconditionally, and with a duration that is hardcoded.

https://bugzilla.gnome.org/show_bug.cgi?id=732376
2014-06-30 18:41:20 -04:00
Matthias Clasen
a090f58922 GtkAdjustment: Animated updates
Add a private API that lets widget opt-in to animated updates of
the adjustment value. When enabled, all calls to
gtk_adjustment_set_value will smoothly transition from the old
value to the new value, using a fixed easing function and a
configurable duration. The animation is tied to the frame clock
of the widget.

By implementing this in GtkAdjustment, we can enable animation
for both scrollbars and keybindings, which are often implemented
in the child widget of the scrolled window.

https://bugzilla.gnome.org/show_bug.cgi?id=732376
2014-06-30 18:09:50 -04:00
Matthias Clasen
5a548106b0 Deprecate gtk_icon_theme_add_builtin_icon
Builtin icons are deprecated in favor of loading icons
from resource paths.
2014-06-30 17:17:49 -04:00
Matthias Clasen
e9ac1bb476 Make gtk_icon_theme_add_resource_path public API
This makes it possible to look up icons in resources using
the icon theme api, and should be used as a replacement
for installing icons below $pkgdatadir/icons and adding
that location to the search path.
2014-06-30 17:13:04 -04:00
Matthias Clasen
f6da4efd47 GtkIconTheme: Allow unthemed icons from resource paths
This makes it pretty straightforward to add individual icons
that don't need to be present in multiple sizes.
2014-06-30 17:02:41 -04:00
Matthias Clasen
c2a22feb27 Drop an extra dir from builtin icons
Make icon lookup from resources work without the extra hicolor
component in the path. It is redundant, since we always treat
builtin icons as part of hicolor anyway.
2014-06-30 16:23:28 -04:00
Matthias Clasen
c28d938a24 GtkIconTheme: Only look at resources for hicolor
We want to treat icons coming from resources as builtins that
are looked at as part of Hicolor.
2014-06-30 16:03:03 -04:00
Matthias Clasen
f7fbeb40c7 GtkIconTheme: Drop an unused parameter
We're always passing FALSE for scale_only, so why bother.
2014-06-30 16:00:05 -04:00
Matthias Clasen
bec3aa54e4 Treat unthemed icons the same as force_size for scaling
This is closer to what we were doing in the past.
2014-06-30 15:57:16 -04:00
Matthias Clasen
bd2cf65cb9 Adwaita: Make selectable labels work
This brings back white-on-blue selection in selectable labels.
https://bugzilla.gnome.org/show_bug.cgi?id=732441
2014-06-30 11:39:19 -04:00
Jasper St. Pierre
fe5402d32e gtkcellrendereraccel: Use a GtkInvisible to grab on
Grabbing on a non-toplevel might not do what we want it to do, since it
will go on the focused widget, not the grabbed widget. Since we don't
focus the widget before clicking on it, that means that putting the
focus somewhere else and then clicking on the accelerator editor will
freeze the app. Additionally, since it's a global system grab that can't
be exited except by a key press that we won't ever get, it effectively
locks up your system as well unless you know how to break the grab or
kill the app. Ouch.

Since doing a device grab on a non-toplevel is generally considered a
bad idea, just don't do it. Use a GtkInvisible and take a grab on that
instead.
2014-06-29 20:56:40 -04:00
Matthias Clasen
9f008e3477 GtkStyleContext: Avoid over-eager animation cancellation
When validating the style context, we are copying the animations
from one StyleValues instance to another, and cancel the old ones.
It turns out that sometimes the old and the new StyleValues are
the same, and in this case, we end up cancelling the animations
for good.

One case where breakage from this was observed is that the spinners
in gtk3-widget-factory stop spinning when you open and close a modal
dialog on page 2. This depends a bit on the window manager; the problem
can only be seen if opening the dialog causes a transition to backdrop.
2014-06-29 19:41:11 -04:00
Jasper St. Pierre
3d53e5d9c7 gtkmain: One more combine 2014-06-29 19:10:42 -04:00
Jasper St. Pierre
e95efbfc42 gtkmain: Combine two switch cases that are the same 2014-06-29 19:10:42 -04:00
Jasper St. Pierre
fc75f459b0 gtkswitch: Fix docs 2014-06-29 19:10:42 -04:00
Jasper St. Pierre
c84b49e332 gtkcellarea: Fix docs 2014-06-29 19:10:42 -04:00
Matthias Clasen
c304a84f2c GtkBuilder: Fix more GMenu leaks in the parser 2014-06-28 23:19:09 -04:00
Matthias Clasen
6f0951845f GtkMenuTrackerItem: Plug a memory leak
gtk_menu_tracker_get_[verb_]icon both return a reference,
so don't use g_value_set_object, which adds another one.
2014-06-28 22:39:43 -04:00
Matthias Clasen
d143919527 GtkCssImageIconName: Plug a memory leak
valgrind was complaining that we're not freeing the icon_name.
2014-06-28 22:39:02 -04:00
Matthias Clasen
8e0ba5bb3e GtkColorEditor: Initialize the allocation x/y 2014-06-28 22:38:13 -04:00
Matthias Clasen
0b88b869e6 GtkActionMuxer: Plug a memory leak
valgrind complained that we leak the primary_accels table.
2014-06-28 22:37:14 -04:00
Matthias Clasen
4067d0623f Revert "scrolledwindow: fix scrolling with shared adjustment"
This reverts commit f0478c3dfd.
Didn't mean to push this.
2014-06-28 22:29:57 -04:00
Matthias Clasen
31e4ec4632 GtkFileChooserWidget: Remove an errant line
This was leaking a schema object, and looks like a bad merge.
2014-06-28 21:38:47 -04:00
Matthias Clasen
7d67206734 GtkBuilder: Don't leak a reference to constructed GMenus
_gtk_builder_add_object adds a reference, so we need to drop
our initial one.
2014-06-28 20:21:32 -04:00
Matthias Clasen
70bfb02fde GtkGesture: Don't leak the group link
Found in a valgrind log.
2014-06-28 20:15:12 -04:00
Matthias Clasen
ef0e164a4c GtkEntry: Make progress pulsing smooth
This changes the calculation of activity mode progress in the
same way as was done in GtkProgressBar a while ago, and make it
smooth, using a tick callback.
2014-06-28 15:51:33 -04:00
Stefan Sauer
f0478c3dfd scrolledwindow: fix scrolling with shared adjustment
The GtkPolicyType set on the scrollbar is just about the presentation. What
matters for scrolling is the adjustment.

https://bugzilla.gnome.org/show_bug.cgi?id=730730
2014-06-28 11:49:54 -04:00
Matthias Clasen
733a590fbe GtkButton: warn slightly less
Use gtk_misc_set_alignment when setting x/align on button children
where possible, to avoid the runtime warning that g_object_set
incurs nowadays.
2014-06-28 10:56:54 -04:00
Lapo Calamandrei
4287e44a9a Adwaita: minor code refactoring 2014-06-28 15:22:23 +02:00
Lapo Calamandrei
0fd3ec80db Adwaita: button work
- finally fixed +|- buttons on inline toolbars
- commented out :focus and :selected for normal buttons since it makes
  flat buttons background blue...
2014-06-28 15:05:06 +02:00
Matthias Clasen
cc8ee01ff6 Avoid a redundant strlen
The GString knows perfectly well how long it is.  Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=731158
2014-06-28 01:51:24 -04:00
Matthias Clasen
fda53e5529 Adwaita: Neuter frames in statusbars
Too much.
2014-06-28 01:34:25 -04:00
Saurabh
931958f9f4 Adding 'no-matches' signal support to gtkentrycompletion
Add a new 'no-matches' signal and add a function pointer to gtkentrycompletionclass
and remove one from the padding at the end.

https://bugzilla.gnome.org/show_bug.cgi?id=726566
2014-06-28 00:41:09 -04:00
William Jon McCann
aa30278e6b Allow activating an item after single click on a different item
We were ignoring double click events when a different item was
previously selected.

https://bugzilla.gnome.org/show_bug.cgi?id=484640
2014-06-28 00:23:02 -04:00
Matthias Clasen
3f7318432c GtkPrintUnixDialog: Set a higher limit for the number of copies
As requested in bug 672676.
2014-06-28 00:20:19 -04:00
Jasper St. Pierre
2651b99a13 colorplane: Don't connect to the configure-event signal
We want to stop people from using configure events
entirely. GtkDrawingArea synthesizes a configure event, but we can just
make the only user of this functionality stop it, and correct the
documentation to not mention it.
2014-06-28 00:10:42 -04:00
Matthias Clasen
691dd83580 Improve popover menu spacing
Make iconic buttons have a more reasonable height, and add some
space above an iconic row.
https://bugzilla.gnome.org/show_bug.cgi?id=732229
2014-06-28 00:00:16 -04:00
Matthias Clasen
b9941d0dde Fix a documentation copy-paste error
The color chooser doesn't deal with fonts.
2014-06-27 23:53:03 -04:00
Matthias Clasen
38e4fbc90c Revert "colorplane: Don't connect to the configure-event signal"
This reverts commit 886f58e1cf.

This made the color plane go missing.
2014-06-27 22:03:59 -04:00
Matthias Clasen
96b6b44e4e GtkMessageDialog: Don't set x/yalign explicitly
The h/valign work fine to give us what we need here, so we
can avoid the runtime deprecation warnings for deprecated
properties.
2014-06-27 21:57:25 -04:00
Matthias Clasen
1cd9ba187e GtkSettings: defensive defaults
Change the default value of the gtk-decoration-layout setting
to menu:minimize,maximize,close. The masses want it that way.
2014-06-27 21:29:18 -04:00
Matthias Clasen
08e5efd605 Bring back redundant notifications for GtkToggleButton::draw-indicator
GtkCheckButton sets a different initial value for this property without
actually changing the declared default, and then relies on change notification
to update other properties (such as xalign). This, combined with glades
insistance on putting default values into ui files creates a situation
where we can't remove the redundant notification for ::draw-indicator
without causing lots of checkboxes to suddenly have centered labels.
This was seen in gnome-terminal, evolution, and other applications.

Therefore, keep the extra notification for now. This can be revisited
when we clean up the button hierarchy.
2014-06-27 21:22:40 -04:00
Matthias Clasen
af507be99b inspector: Chain up in constructed
Its the right thing to do.
2014-06-27 18:44:36 -04:00
Lapo Calamandrei
8231a3c7b9 Adwaita: export the right color for the wm hilight dark var 2014-06-27 16:24:24 +02:00
Jasper St. Pierre
796dc682bc gtkwindow: Refactor out some similar code for grips 2014-06-27 09:19:50 -04:00
Jasper St. Pierre
1210b693a0 gtkwindow: Merge some similar code 2014-06-27 09:19:49 -04:00
Jasper St. Pierre
95cb816666 gtkwindow: Remove a dead chain-up
GtkWidget / GtkBin don't have configure-event handlers, so we don't need
to attempt to chain up to them.
2014-06-27 09:19:49 -04:00
Lapo Calamandrei
651328b0e4 Adwaita: remove borders from flat frames 2014-06-27 14:53:31 +02:00
Lapo Calamandrei
89f2a48bb1 Adwaita: remove borders from scrollbars junction 2014-06-27 14:47:29 +02:00
Lapo Calamandrei
8b1e52cbd6 Adwaita: initial flat entry styling. 2014-06-27 14:24:53 +02:00
Lapo Calamandrei
6e7e1ebf46 Adwaita: .flat button styling 2014-06-27 13:15:54 +02:00
Matthias Clasen
ec7200797e GtkFrame: Use style classes for shadow
Use the FLAT style class when shadow is set to none, and
let the theme render the appropriate border.
https://bugzilla.gnome.org/show_bug.cgi?id=732256
2014-06-26 22:02:19 -04:00
Matthias Clasen
17679c168a GtkEntry: Make has-frame use style classes
Instead of code that internally does weird things, use the FLAT style
class if has-frame is FALSE and remove it otherwise.
Based on a patch by Benjamin Otte.
https://bugzilla.gnome.org/show_bug.cgi?id=732256

fixup entry
2014-06-26 22:02:19 -04:00
Matthias Clasen
598777166f GtkButton: Use FLAT style class
This commit makes button always draw background and frame.
Buttons with relief none get a new style class, FLAT, which
allows themes to style these buttons as they like.

We also (finally) mark GTK_RELIEF_HALF as deprecated. It
has never done anything different from GTK_RELIEF_NORMAL.

https://bugzilla.gnome.org/show_bug.cgi?id=732256
2014-06-26 22:02:18 -04:00
Matthias Clasen
e6341a0b63 Add a FLAT style class
This will be used for frame-less buttons and frames in the future.
2014-06-26 22:02:08 -04:00
Matthias Clasen
3bd2705b7a GtkScrolledWindow: Use style classes for shadow
Translate shadow != None into the FRAME style class.
This doesn't change the style classes used for drawing,
it only sets the style class permanently instead of
saving and restoring in draw().
https://bugzilla.gnome.org/show_bug.cgi?id=732256
2014-06-26 21:56:21 -04:00
Matthias Clasen
dbeb0c9ca8 GtkViewport: Use style classes for shadow
Translate shadow != None into the FRAME style class.
This doesn't change the style classes used for drawing,
it only sets the style class permanently instead of
saving and restoring in draw().
https://bugzilla.gnome.org/show_bug.cgi?id=732256
2014-06-26 21:56:20 -04:00