Commit Graph

24854 Commits

Author SHA1 Message Date
Jakub Steiner
bb183ae591 last last gesture stock image fixes
- swipe left was missing outline conversion to allow recolorization
2015-11-23 16:13:45 +01:00
Matthias Clasen
b6e03dbc26 Load gesture images as symbolic icons
This makes them recolor in the dark theme, which looks better.
2015-11-23 10:08:14 -05:00
Jakub Steiner
454a4b7576 gesture stock images size fix
fit all images to 64x64
2015-11-23 15:53:02 +01:00
Jakub Steiner
24cedfd87e gesture stock images fixes
- convert all objects to shapes to allow css recoloring
  ala symbolic icons
2015-11-23 15:45:24 +01:00
Jakub Steiner
25d5fd97e9 more gesture stock images tweaks
- rotation gestures more natural look
2015-11-23 14:40:30 +01:00
Matthias Clasen
98fd5bda58 Tweak the gtk-font-name setting docs
Clarify that only parts of the font name are used.

https://bugzilla.gnome.org/show_bug.cgi?id=758367
2015-11-23 08:18:37 -05:00
Jakub Steiner
3e649c4812 gesture stock images sizing
- make swipe left and right less wide
2015-11-23 14:06:18 +01:00
Jakub Steiner
1cd5ef5285 minor touchups on stock gesture images
- add minimal margin for safe scaling
- fixed height of 64pixels
- pixel alignment issues (grid fit)
2015-11-23 13:53:12 +01:00
Matthias Clasen
50abc8b525 shortcuts: Add set properties for optional things
This makes it possible to switch between gesture and accelerator
types and override the builtin icons and subtitles for predefined
gestures.
2015-11-22 22:41:48 -05:00
Matthias Clasen
304c5ac226 shortcuts: Add support for standard gestures
Add an enum for gestures that GtkShortcutsShortcut knows how
to show an image and subtitle for.

https://bugzilla.gnome.org/show_bug.cgi?id=758187
2015-11-22 22:41:48 -05:00
Matthias Clasen
62620a5244 Add stock gesture images
These will be used in the shortcuts window.
2015-11-22 22:41:48 -05:00
Matthias Clasen
c6dc863e90 shortcuts shortcut: Take over gesture functionality
It turns out that it is nicer in glade to have just a single
widget that can show either a shortcut or a gesture, so make
GtkShortcutsShortcut do it both.

GtkShortcutsGesture is now redundant and will be removed before
the next stable release.
2015-11-22 22:41:48 -05:00
Matthias Clasen
b1aef18c84 shortcuts: Fix size group handling
We need to keep pointers to the size groups and apply
them to shortcuts that are added later.
2015-11-22 22:41:48 -05:00
Matthias Clasen
a661ce4d06 shortcuts: Complete the container implementations
Various problems with the container implementations in
GtkShortcutsWindow, Section and Group were showing up
in glade.
2015-11-22 22:41:48 -05:00
Matthias Clasen
520da80bd0 shortcuts: Update title and section-names properly
The current code in gtkshortcutswindow.c is good enough to
construct a widget once from a .ui file, but fails to handle
changes at runtime, as happen e.g. in glade. Fix this by
listening for changes to section-name and title.
2015-11-22 22:41:48 -05:00
Timm Bäder
2182fe7d9d Don't pass widget state flags to GtkStyleContext API 2015-11-22 17:11:35 +01:00
Cosimo Cecchi
9ba94849e8 GtkRenderBorder: make one function static 2015-11-21 14:55:13 -08:00
Cosimo Cecchi
b821f132d1 GtkCssImage: formatting fixes 2015-11-21 14:52:18 -08:00
Matthias Clasen
036ee7a68b inspector: Always underline at least one char
Empty underlines are hard to make out. Since we get somewhat
unreliable section information from the CSS parser, we just
make sure that we always underline at least one character.
2015-11-20 20:59:53 -05:00
Benjamin Otte
ee1381a1f3 cssnodedeclaration: Only set the id on the widget path if we have one
Widget paths don't like NULL.
2015-11-21 02:40:53 +01:00
Matthias Clasen
adead3b499 Update key themes to use -gtk-key-bindings
The name gtk-key-bindings has been deprecated and causes warnings.
2015-11-20 20:35:39 -05:00
Matthias Clasen
d267b8e028 Rename the gtk-key-bindings property
This is not a standard CSS property, so rename it to
-gtk-key-bindings. We still support the old name, with a
deprecation warning.
2015-11-20 20:35:39 -05:00
Matthias Clasen
ba1fb4b0a7 HighContrast: use -gtk-icon-shadow
The name icon-shadow has been deprecated and causes warnings.
2015-11-20 20:35:39 -05:00
Matthias Clasen
b1f0283630 Adwaita: use -gtk-icon-shadow
The name icon-shadow has been deprecated and causes warnings.
2015-11-20 20:35:39 -05:00
Matthias Clasen
5f73e8a720 Rename the icon-shadow property
This is not a standard CSS property, so rename it to
-gtk-icon-shadow. We still support the old name, with a
deprecation warning.
2015-11-20 20:35:39 -05:00
Matthias Clasen
f3e4e8660d Warn if a property alias is used
Emit a deprecation warning if a property is not used
by its official name.
2015-11-20 20:35:39 -05:00
Matthias Clasen
7c95f50ee2 Add a way to add aliases for css properties
This will be used to rename some properties in a more
systematic way without breaking all users of the old name.
2015-11-20 20:35:39 -05:00
Matthias Clasen
d2d521d4b5 Add a deprecation error for the engine css property
This helps people fix up their css.
2015-11-20 20:35:39 -05:00
Matthias Clasen
df55412ba2 inspector: Fix css warning tags
The builder syntax for tags was invalid here (why did this not
get flagged as error ?!). While we're at it, give the warning
underline a nice, orange color.
2015-11-20 20:35:39 -05:00
Benjamin Otte
4b2ea59dd1 stylecontext: Treat empty path like no path
This way, we don't do weird stuff when an empty path is set.
2015-11-21 02:22:22 +01:00
Benjamin Otte
6eb89fb6a3 stylecontext: Copy name when setting widget path
Imitate what we do for the type. This way we don't lose the name on
save/restore.

https://bugzilla.gnome.org/show_bug.cgi?id=758442
2015-11-21 02:21:12 +01:00
Benjamin Otte
7373fd8aab cssnodedeclaration: Set element name and id on widget path
Otherwise the widget path creation functions will fail. This affects
widgets still using gtk_style_context_save().

https://bugzilla.gnome.org/show_bug.cgi?id=758442
2015-11-21 02:14:08 +01:00
Benjamin Otte
55061eca59 customproperty: Remove unused function 2015-11-21 02:11:52 +01:00
Benjamin Otte
0e2648e8c2 customproperty: Stop supporting the parsing of values
Now that we don't use custom CSS properties anymore, let's fail as early
as possible.
2015-11-21 00:53:47 +01:00
Matthias Clasen
ad49103b93 inspector: Show css parsing errors
The squiggly underline is useful, but seeing the error message
is much better, so show it in a tooltip.
2015-11-20 18:18:01 -05:00
Matthias Clasen
68d77b1823 Expand the container_remove hack
Make it possible to use gtk_container_remove on GtkShortcutsWindow.
glade needs this.
2015-11-20 15:31:00 -05:00
Matthias Clasen
159a13a065 shortcuts window: More complete container implementation
To give glade a chance to work with GtkShortcutsWindow, the
container implementation needs to be a bit more complete.
2015-11-20 15:31:00 -05:00
Benjamin Otte
d75989a52b cssstyle: Don't store custom css properties
This makes custom CSS properties no longer configurable. But it avoids
crashes when loading custom themes, so that's a good thing.

Testcase included.

https://bugzilla.redhat.com/show_bug.cgi?id=1281234
2015-11-20 21:22:15 +01:00
Timm Bäder
6489ec440f GtkSpinButton: Update node state on button release 2015-11-20 20:32:15 +01:00
Matthias Clasen
cf7bb4f2aa spin button: Fix initial button state
We can't use up_panel and down_panel as differentiators for the buttons,
because these window system resources don't exist before realize().
Just use a one-off enum for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=758094
2015-11-20 11:40:55 -05:00
Timm Bäder
1db5ed0aae GtkLabel: Create gestures only when needed
And move them into the GtkLabelSelectionInfo struct.
2015-11-20 16:45:17 +01:00
Carlos Garnacho
770feff302 gtkdnd: Unbreak non-wayland builds
missing #ifdef...
2015-11-20 13:30:14 +01:00
Matthias Clasen
9f75c5445f cell renderer progress: Avoid warnings
Use the right state when calling gtk_style_context_get_padding,
to avoid warnings.
2015-11-20 00:13:20 -05:00
Matthias Clasen
4aceee71c5 stack switcher: Notify consistently
Whether to notify a property change should not depend
on whether the switcher is associated with a stack or not.
2015-11-20 00:13:20 -05:00
Matthias Clasen
530aa3cced shortcuts: Avoid excessive property notification
Notifying needlessly causes unnecessary work, and causes our
testsuite to fail.
2015-11-20 00:13:20 -05:00
Carlos Garnacho
26f9d6b1c1 gtkdnd: Ensure we don't fold the drag icon into the cursor on wayland
This is wrong by all accounts there, as we can do no tricks there to show
a "drag failed" animation, which is performed by the compositor itself
on wayland.
2015-11-19 23:28:19 +01:00
Carlos Garnacho
e3012dc9b3 gtkdnd: Use gdk_drag_begin_for_device()
We've got the pointer at hand there, just pass that instead of figuring
out from the client pointer.
2015-11-19 23:26:49 +01:00
Christoph Reiter
bb34db6d35 gtkheaderbar: update the window buttons on ::hierarchy-changed instead of ::realize
The window button setup depends on properties of the toplevel window.
Instead of updating the setup on realize, do it when the toplevel
changes.

This makes sure that when a GtkHeaderBar is added to a window
all the widgets are present and get_preferred_height() will return
the height the widget will have when finally shown. This allows
the logic in gtkwindow to select the right window size so that
the content size will match the requested default size.

https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-11-19 21:42:53 +01:00
Christoph Reiter
308aec53c6 gtkwindow: apply CSD adjustments to the default size when used instead of when setting it
Before the resulting window size would differ if the default size was set
before adding a headerbar vs after. Now the saved state is again the actual
requested size and it is adjusted at the time we request a window size.

https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-11-19 21:42:24 +01:00
Olivier Fourdan
1080ffdf19 window: maximize on double click only if allowed
GtkHeaderBar will not show the maximize button if the window in not of
type normal or not resizeable.

Use the same restriction for double-click actions as well.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=757530
2015-11-19 15:04:03 -05:00