Commit Graph

21340 Commits

Author SHA1 Message Date
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
Jasper St. Pierre
9c37b3de74 gtk: Don't use GObjectClass.constructor
Use the newer constructed instead, which has a fast path in GObject.
2014-06-26 19:06:43 -04:00
Matthias Clasen
66492678b5 Flip GTK_STOCK_CLEAR icon in rtl locales
Adwaita now includes an edit-clear-rtl variant, so lets use it.
2014-06-26 18:02:05 -04:00
Jasper St. Pierre
75e770bc50 gtkwindow: Remove a dumb invalidate_rect from our configure_event
We shouldn't invalidate the entire window when we receive a
ConfigureNotify. That's just broken.
2014-06-26 15:58:45 -04:00
Jasper St. Pierre
46e7f7f456 gtkwindow: Remove a vestigal line of painting for OR windows
Since we have a paint clock, we shouldn't be sending out EXPOSE events
for OR windows inside the ALLOCATE cycle. The idea here was that we
would have to wait for a map to get an OR window to paint to, but since
then this has been abstracted away inside GDK and the paint clock.
2014-06-26 15:58:45 -04:00
Jasper St. Pierre
35f618e71d gtkwindow: Remove an unnecessary set of grip setting
We already update the grip position in _gtk_window_set_allocation, which
is done through the size_allocate above. Receiving a ConfigureNotify
also won't ever change a grip's visibility, so there's no point in
refreshing it.
2014-06-26 15:58:45 -04:00
Jasper St. Pierre
6926821ae1 treeview: Remove configure-event handler as well 2014-06-26 15:58:44 -04:00
Jasper St. Pierre
886f58e1cf 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-26 15:58:44 -04:00
Emmanuele Bassi
5b571ff4b6 docs: Show examples of how to use templates API
The template documentation is lacking inlined examples on how to use the
templates API, like binding children and callbacks. This makes looking
for best practices a bit harder than it ought to be, for a feature this
useful.
2014-06-26 19:29:06 +01:00
Jasper St. Pierre
6325e4a037 gtkwindow: Force CSD on Wayland
We rely on CSD here on the Wayland platform and giving the opportunity
to turn it off doesn't make too much sense.
2014-06-26 10:32:10 -04:00
Carlos Garnacho
80d6735ffc gesture: Consume the event triggering ::begin if reset within the handler
If the event triggers GtkGesture::begin, and the handler ends up resetting
the gesture (say, due to taking a grab somewhere else within the handler),
still take the event as "managed", as it actually triggered recognition,
even if just to end abruptly.

https://bugzilla.gnome.org/show_bug.cgi?id=731711
2014-06-25 18:36:44 +02:00
Lapo Calamandrei
2aed2cddd5 Adwaita: add inconsistent hover check/radios 2014-06-24 20:17:38 +02:00
Matthias Clasen
d09c458ced GtkButton: Queue a redraw on enter/leave
We currently getting a redraw for buttons, but that is just luck.
Better to make it explicit.
2014-06-24 13:21:05 -04:00
Matthias Clasen
1b3542419c GtkToggleButton: Queue a redraw on enter/leave
Without this, we don't redraw consistently for prelight state changes.
2014-06-24 13:03:47 -04:00
Matthias Clasen
ecffe56955 Avoid deprecation warnings
We know regions are deprecated, no need to warn about it here.
2014-06-24 08:23:21 -04:00
Lapo Calamandrei
739dacf12a Adwaita: set the correct indicator color for reorderable hover tabs 2014-06-24 14:04:26 +02:00
Lapo Calamandrei
7903c1d2a4 Adwaita: only side borders for reorderable tabs 2014-06-24 13:42:13 +02:00
Lapo Calamandrei
abe36dc9cd Adwaita: added active state to the switch slider 2014-06-24 10:38:03 +02:00
Lapo Calamandrei
3cb2bf8b8a Adwaita: comment out button separators removal
...after reading #gnome-design scrollbark, since a consensus on how to achieve
this has not been reached yet.
2014-06-24 10:28:19 +02:00
Lapo Calamandrei
793a3eab82 Adwaita: fix view check/radio selected state. 2014-06-24 10:25:49 +02:00
Lapo Calamandrei
58b2d2cd0c Adwaita: disable separators in buttons 2014-06-24 09:28:29 +02:00
Jasper St. Pierre
e76f41b788 gtkmain: Rearrange code
Prevent a segfault in unknown circumstances, and break the ignore
deprecations wrapper out from the if statement so that we don't
cover too much ground by accident.
2014-06-23 17:55:55 -04:00
Jasper St. Pierre
f4c2c4c667 gtkwidget: Actually mark set_double_buffered as deprecated 2014-06-23 17:53:48 -04:00
Jasper St. Pierre
24b9e91f47 Revert "gtkwidget: Widgets are now always double-buffered"
This reverts commit b875572f2a.

Apps like Abiword, gnumeric and gnome-chess, and toolkits like
ClutterGTK were all using this for various purposes, and this made them
break. Bring back this feature for now.

It still won't work under Wayland.
2014-06-23 17:50:01 -04:00
Matthias Clasen
3d0dac0aef GtkIconTheme: Copy all fields in icon_info_dup
This functionality is only exercised by gnome-shell, currently.
Therefore, forgetting to copy a field here means an instant
gnome-shell crash :-(. More tests needed.
2014-06-23 12:20:59 -04:00
Matthias Clasen
30982b6d4e GtkIconTheme: Be more careful when warning
It sucks when printing a warning causes gnome-shell to crash,
so be more careful about icon names being NULL here.
2014-06-23 12:13:22 -04:00
Matthias Clasen
12a40cf8a6 GtkIconTheme: keep misplaced symbolics working
Recent changes made it a breaking mistake to install symbolic icons
of the wrong size into a theme directory, or into the legacy unthemed
icon location.

Since this change affects many apps, do the extra work to keep these
icons working, but emit warnings, in the hope that this will lead to
cleaning up the mess over time.
2014-06-23 08:18:42 -04:00
Matthias Clasen
fe92c4478e Move some comments around 2014-06-22 22:04:00 -04:00
Matthias Clasen
a44f01c573 Some documentation rewording 2014-06-22 16:46:11 -04:00
Matthias Clasen
fe6cd7f2a5 Adwaita: Use rtl variants of pan-end when needed
The -gtk-icontheme() function not have any automatism for
symbolic or rtl variants built-in, instead, we expect the theme
to use selectors to provide the right icon for each situation.
2014-06-22 14:12:29 -04:00
Bastien Nocera
9d69ff697c placessidebar: Use symbolic name for symbolic icon
https://bugzilla.gnome.org/show_bug.cgi?id=731908
2014-06-22 12:23:52 -04:00
Matthias Clasen
4617fa7568 Docs: Reword deprecation notes
Mainly, make sure that deprecated properties are
documented as such. In this case: double-buffered.
2014-06-22 12:11:17 -04:00
Matthias Clasen
f5d7e54d33 GtkCellRendererPixbuf: Set force_scale_pixbuf
The recent icon theme scaling changes make the code more
sensitive to mis-sized icons (e.g. application icons in
the app chooser). A single row whose size gets blown out
of proportion by a big icon is never wanted in a list.
We can avoid this situation by telling GtkIconHelper to
force-scale the pixbuf to the requested size.
2014-06-22 11:52:11 -04:00
Matthias Clasen
6d83b173df GtkIconHelper: use FORCE_SCALE when force_scale_pixbuf is set
When force_scale_pixbuf is set, the icon helper will scale the
icon to the requested size (either the pixel size, or the resolved
icon size), so we can just as well instruct the icon theme code
to do the scaling for us.
2014-06-22 11:52:11 -04:00
Matthias Clasen
6cc32c24be GtkIconTheme: Drop an unused variable
We no longer need a separate field for symbolic icon size,
now that we are using the directory size.
2014-06-22 11:52:11 -04:00
Matthias Clasen
b96058c3b7 GtkIconTheme: Load symbolic icons at the same size
Reuse the scale information that we have from loading icons
normally, when loading a symbolic icon, so that we apply the
same size constraints.

This commit assumes that svgs have the nominal size of the
directory they are in, which will be true for all current
symbolic icons.
2014-06-22 11:52:11 -04:00
Matthias Clasen
acb276c644 GtkIconInfo: Small struct packing improvement
This makes the GtkIconInfo struct a bit smaller.
2014-06-22 11:52:11 -04:00
Matthias Clasen
f2b98f45db GtkIconInfo: Drop an unused field
The GtkIconInfo threshold field was never used, so lets not
carry it around.
2014-06-22 11:52:10 -04:00
Matthias Clasen
a10412f49e GtkIconTheme: Respect limits in theme dirs
Previously, we were taking thresholds and min/max sizes into
account when choosing the best theme dir, but when it came
to loading the icon, we always scaled icons from scalable
directories all the way, ignoring the min/max size limits.

This commit changes things around so that we now load icons
in Threshold directories at their nominal size, and scale
icons in Scalable directories only up to the specified limits.

To override this and keep the previous behaviour of scaling
all the way to the desired size, use the GTK_ICON_THEME_FORCE_SIZE
flag.
2014-06-22 11:52:10 -04:00
Matthias Clasen
1c57abb02b GtkSwitch: Implement hover for GtkSwitch
This makes switches more similar to other activatable widgets
like buttons or scales.
2014-06-21 21:34:50 -04:00
Michael Catanzaro
d9d0ba83ac docs: add missing apostrophe 2014-06-21 12:16:29 -05:00
Benjamin Otte
93b3179042 widgetpath: Deprecate regions
This is a foolowup to d80bf0790d
2014-06-21 15:46:44 +02:00
Jasper St. Pierre
6bc251692a gtkwidget: Add a warning about set_double_buffered
As requested on the mailing list.
2014-06-21 00:31:17 -04:00
Jasper St. Pierre
4a72563c7b gtktrayicon-x11: Stop using set_double_buffered
There's nothing better we can do for this case, now that we always
redirect drawing to a temporary pixmap. Maybe since this is already
X11-specific code, we should just do everything with Xlib directly.
2014-06-21 00:30:45 -04:00
Matthias Clasen
0ec00ffbb0 Adwaita: Fix highlight on check buttons
The .button style class does not apply to check and radio
buttons, and .check only applies to menuitems.
2014-06-20 23:17:53 -04:00
Jasper St. Pierre
b875572f2a gtkwidget: Widgets are now always double-buffered
gtk_widget_set_double_buffered is now deprecated, and we don't support
non-double-buffered widgets. This means that under normal circumstances,
paints are never outside of a begin_paint / end_paint sequence, which
natively-double-buffered backends like Wayland can't possibly support.
2014-06-20 20:41:54 -04:00
Jasper St. Pierre
a85f7028d4 gdkwindow: Deprecate gdk_window_flush
The function does nothing.
2014-06-20 20:41:53 -04:00
Matthias Clasen
240daf55a1 GtkIconTheme: Drop an unused function 2014-06-20 20:40:52 -04:00
Matthias Clasen
2472cf22db GtkIconTheme: Small cleanup
Make the default symbolic colors a little more readable in the code.
2014-06-20 20:40:52 -04:00
Matthias Clasen
669bc909d8 GtkIconTheme: Trivial cleanup
Drop the _-prefix from a static function.
We've agreed to no stop using those prefixes.
2014-06-20 20:40:51 -04:00
Matthias Clasen
d1918bbb69 Avoid a compiler warning
The name_offset variable is indeed unused.
2014-06-20 15:54:51 -04:00
Matthias Clasen
5ddacf094e GtkIconTheme: Don't create empty IconThemeDir structs
Starting gtk3-demo currently creates ~1200 of these, most
of them for nonexisting directories. Lets try to avoid that.
2014-06-20 12:15:25 -04:00
Matthias Clasen
b4d12fff4e GtkIconCache: Add api to find if directories are empty
This will help in not creating structs for tons of empty
directories.
2014-06-20 12:15:25 -04:00
Matthias Clasen
5925f9eeb4 GtkStatusbar: Add some space between the frame and the label
Looks better this way.
2014-06-20 12:15:25 -04:00
Lapo Calamandrei
401bf15c9a Adwaita: check/radio selector simplification 2014-06-20 17:25:19 +02:00
Matthias Clasen
ef30b8c051 docs: Drop image references for stock items
Most of those images are no longer in our tree, so just
say which ones have icons and rtl variants, instead of
showing it.
2014-06-20 10:55:48 -04:00
Matthias Clasen
2672837a14 GtkIconTheme: Keep gtk_icon_theme_add_resource_path private for now
We need to discuss some details of the semantics before
we can make this public.
2014-06-20 08:50:31 -04:00
Matthias Clasen
4f1ff179bb Revert "Document gtk_icon_theme_add_resource_path"
This reverts commit 988b6b483d.
2014-06-20 08:46:42 -04:00
Matthias Clasen
a31e8369f8 Revert "Deprecate gtk_icon_theme_add_builtin_icon"
This reverts commit 923eeda2d3.
2014-06-20 08:46:24 -04:00
Matthias Clasen
923eeda2d3 Deprecate gtk_icon_theme_add_builtin_icon 2014-06-20 01:17:47 -04:00
Matthias Clasen
988b6b483d Document gtk_icon_theme_add_resource_path 2014-06-20 01:17:47 -04:00
Matthias Clasen
49bcaf844c GtkIconTheme: Include legacy stock icons from resources
Add /org/gtk/libgtk/icons as a resource path, and ensure
that we always parse an index.theme file for hicolor which
makes the builtin icons available as part of the hicolor theme.
2014-06-20 01:17:46 -04:00
Matthias Clasen
968ea4186d GtkIconTheme: Allow loading icons from resources
We add a new API, gtk_icon_theme_add_resource_path, which
can be used to add resource path as a base location for
icon theme content, similar to gtk_icon_theme_append_search_path.
2014-06-20 01:17:46 -04:00
Matthias Clasen
13c354db8d GtkIconTheme: Drop the all_icons hash table
It is not used anywhere anymore.
2014-06-20 01:17:46 -04:00
Matthias Clasen
11ec8f7285 GtkIconTheme: Stop using the all_icons hash table
This hash table was used in gtk_icon_theme_has_icon; we can
implement that function just as well without it and save some
memory.
2014-06-20 01:17:45 -04:00
Matthias Clasen
6549031030 Formatting fixes 2014-06-20 01:17:45 -04:00
Matthias Clasen
aa44c0ca53 GtkIconTheme: Drop the code for parsing .icon files
Modern icon themes don't ship .icon files anyway.
2014-06-20 01:17:45 -04:00
Matthias Clasen
84bc9bba42 GtkIconTheme: Deprecate functionality related to .icon files
This functionality is not used at all in modern icon themes.
2014-06-20 01:17:45 -04:00
Matthias Clasen
36be12578c Drop the builtin icon cache
We don't need it anymore, now that the non-standard stock icons
are using resources.
2014-06-20 01:17:44 -04:00
Matthias Clasen
ea8afd2937 Add non-standard stock icons as resources
This will allow us to remove the builtin icon cache in the future
while keeping the deprecated stock icons working.
2014-06-20 01:17:35 -04:00
Matthias Clasen
548a804653 Drop all standard icons from the builtin icontheme
We're going to require a complete icon theme, and we have
a test that checks for all the icons we use, so there is
no need to include all these fallback icons.
2014-06-20 00:52:20 -04:00
Benjamin Otte
d80bf0790d stylecontext: Deprecate regions
Regions are done in a very non-css way. They don't fit the DOM in that
they don't integrate into the CSS tree and they have very weird matching
behavior in selectors.

So I'm deprecating them now. GtkNotebook and GtkTreeview will continue
to use them and as long as they do, we can't remove the code for it.
But once those are ported it might be safe to remove the code as it will
clean up lots of places in the code by quite a bit.
2014-06-19 22:26:51 +02:00
Benjamin Otte
8451b15d6e stylecontext: Remove long outdated docs
The part about transition animations doesn't apply since 3.8.
2014-06-19 22:26:51 +02:00
Matthias Clasen
0056d3a6ad GtkTreeView: Remove a no-longer-valid optimization
The rubberband rendering code was assuming that we just have
a 1-pixel border and the rest of the rubberband is uniform.
That is not a safe assumption to make with css-styled
rubberbands, so remove it.
2014-06-19 13:52:11 -04:00
Matthias Clasen
72ece5a62c GtkIconView: Remove a no-longer-valid optimization
The rubberband rendering code was assuming that we just have
a 1-pixel border and the rest of the rubberband is uniform.
That is not a safe assumption to make with css-styled
rubberbands, so remove it.
2014-06-19 13:52:11 -04:00
Lapo Calamandrei
b7c51de62b Adwaita: fix rubberband selection 2014-06-19 19:11:02 +02:00
Matthias Clasen
c9e848b659 GtkIconTheme: Fix svg loading with FORCE_SIZE
Paradoxically, we were loading svgs at the nominal size when
FORCE_SIZE is specified, while scaling them exactly when it
isn't.
	../build/win32/vs10/gtk.vcxproj
2014-06-18 19:09:37 -04:00
Jakub Steiner
51417f98d1 Adwaita: hover state for horizontal spinbuttons 2014-06-18 20:40:19 +02:00
Nikita Churaev
462f86d301 New window shadows
https://bugzilla.gnome.org/show_bug.cgi?id=731866
2014-06-18 20:40:19 +02:00
Lapo Calamandrei
6eedc62af9 Adwaita: highligh not hilight... 2014-06-18 19:38:14 +02:00
Lapo Calamandrei
a595dccf0e Adwaita: remove wildcard for image effect
-gtk-image-effect: hilight now is set for .button:hover
2014-06-18 19:29:33 +02:00
Lapo Calamandrei
060f7b7428 Adwaita: calendar fixes 2014-06-18 18:13:38 +02:00
Matthias Clasen
baea175628 GtkHeaderBar: Don't forget to show the subtitle
https://bugzilla.gnome.org/show_bug.cgi?id=731790
2014-06-18 11:56:08 -04:00
Jakub Steiner
e3a40065cc Adwaita: flatten buttons slightly.
- gets rid of the specialcase for dark too.
2014-06-18 16:36:41 +02:00
Lapo Calamandrei
c975b9ef9b Adwaita: more links styling 2014-06-18 16:07:59 +02:00
Lars Uebernickel
af0496dc68 themes: use .popover class instead of GtkPopover
https://bugzilla.gnome.org/show_bug.cgi?id=731834
2014-06-18 14:24:14 +02:00
Lars Uebernickel
d0a3c8bd6f gtkpopover: set background and popover css classes
https://bugzilla.gnome.org/show_bug.cgi?id=731834
2014-06-18 14:24:14 +02:00
Lapo Calamandrei
c2b7ebff11 Adwaita: remove bg from insensitive backdrop spinbutton buttons 2014-06-18 13:26:35 +02:00
Lapo Calamandrei
f39a12e0c6 Adwaita: vertical spinbuttons inhert in backdrop state 2014-06-18 13:16:21 +02:00
Jakub Steiner
0ff5c41718 Adwaita: actionbars' padding 2014-06-18 12:16:55 +02:00
Lapo Calamandrei
630b5b9797 Adwaita: reorderable tabs correctly styled for every notebook layout 2014-06-18 12:08:04 +02:00
Lapo Calamandrei
e1ae22465b Adwaita: set outline-color on selected items 2014-06-18 10:21:13 +02:00
Lapo Calamandrei
6cebdf80ac Adwaita: checks and radios text focus ring fix. 2014-06-18 10:11:11 +02:00
Lapo Calamandrei
0011c5c5e3 Adwaita: minor fixes. 2014-06-18 10:01:24 +02:00
Lapo Calamandrei
1566a5d9dd Adwaita: .scrollbars-junction 2014-06-18 09:52:29 +02:00
Matthias Clasen
d57793adb4 Include image data in the builtin icon theme cache
When we switched the default for gtk-update-icon-cache to
not include image data, we should have thought about the
builtin icons. For them, we rely on image data being included.

This made the notify test fail in gnome-continuous, where we
build from git and always regenerate the builtin cache.
2014-06-17 16:26:42 -04:00
Alexander Larsson
3574a809fa icon theme: Fix crash for builtin icons
This pushes the initialization of is_svg to an earlier point
when the GtkIconInfo is created. This is needed because an icon
info doesn't necessarily always have a filename that we can later
extract the suffix from. For instance, builtin icons have NULL
filename.

https://bugzilla.gnome.org/show_bug.cgi?id=721895
2014-06-17 13:54:13 -04:00
Jakub Steiner
d87d62fe73 Adwaita: selection mode buttons to have borders and fill 2014-06-17 15:55:58 +02:00
Jakub Steiner
e591c8ab41 Adwaita: symbolic checkboxes for selection mode. 2014-06-17 15:41:59 +02:00
Jakub Steiner
0ce17d4aca Adwaita: make bash actually call sass 2014-06-17 15:39:45 +02:00
Benjamin Otte
aa6652aac7 cssprovider: Names starting with -gtk- aren't style props
We want to have the "-gtk-" prefix for our custom CSS properties. But
we also want to parse names starting with a "-" as style properties.
So make sure that "-gtk-" is treated like a normal property and we emit
errors when somebody uses it wrong.

This is to catch errors with people typing
  -gtk-iconsource: none;
instead of the correct
  -gtk-icon-source: none;
2014-06-17 00:01:25 +02:00
Matthias Clasen
f0f9c2aa37 Revert "gtkbin: replace internal api"
This reverts commit 0f4751c08e.

This causes warnings from the notebook and combobox code.
2014-06-16 17:31:56 -04:00
Ryan Lortie
b532e1ff0a menu binding: emit submenu close after activate
We want to make sure that the submenu action is changed back to FALSE
_after_ the menu item has been activated.  This prevents the menu
teardown handler from deleting the menu item before it can be activated.

Unfortunately, GtkMenuShell emits "hide" before the item activation.
This is probably done to prevent the application from doing things like
showing dialogs when the menu is still holding the grab.

In the case where we are doing an activate, set a boolean flag on each
of the open menus (following the parent stack) indicating that we'll be
emitting another signal soon (selection done).  If that flag is set, we
defer the setting of the submenu action until we receive the second
signal.

https://bugzilla.gnome.org/show_bug.cgi?id=729820
2014-06-16 15:34:42 -04:00
Jasper St. Pierre
0855d55668 Makefile: Add gtk.gresource.xml to gitignore 2014-06-16 14:03:53 -04:00
Lapo Calamandrei
085de60305 Adwaita: list-row styling 2014-06-16 19:58:37 +02:00
Benjamin Otte
fba90d4c65 colorswatch: handle clip for box-shadow 2014-06-16 18:43:49 +02:00
Lapo Calamandrei
b1cca3aa11 Adwaita: fix a typo 2014-06-16 17:14:20 +02:00
Lapo Calamandrei
490cb30c78 Adwaita: GtkPaned separator invisible border shrinking 2014-06-16 17:12:03 +02:00
Lapo Calamandrei
67b4749be0 Adwaita: fix column-header backdrop state 2014-06-16 17:07:27 +02:00
Jasper St. Pierre
c2bf7a887c gtkicontheme: Fix a missing case where we forget to set is_svg
When duplicating the icon_info, we forgot to set is_svg. This meant that
any application that used gtk_icon_info_load_icon_async wouldn't have
is_svg set properly.

This fixes blurry icons in the gnome-shell app picker.
2014-06-16 10:47:34 -04:00
Lapo Calamandrei
aa339ee30c Adwaita: column headers visual simplification 2014-06-16 16:46:05 +02:00
Chun-wei Fan
cf8eaebc07 GtkInspector: Use Adwaita by Default on Windows Too
As we are using Adwaita by default on all platforms, do the same for
GtkInspector, to be consistent with the rest of GTK+.
2014-06-16 12:07:04 +08:00
Paolo Borelli
715b8744f5 TextView: render the background of border windows
Set the .top, .left, etc css classes and render the background
of the border windows.
Change the reftest implementation accordingly.
2014-06-15 18:57:06 +02:00
Matthias Clasen
c1476bf1d7 Revert "Fixes GtkMenuTrackerItem visible flag reference"
This reverts commit ceed0ee703.
2014-06-14 21:43:14 -04:00
Will Greenberg
ceed0ee703 Fixes GtkMenuTrackerItem visible flag reference
Previously GtkMenuTracker tried to access "gtk_menu_tracker_item_get_is_visible",
but the correct getter is "_gtk_menu_tracker_item_is_visible". This commit
corrects this reference

https://bugzilla.gnome.org/show_bug.cgi?id=731430
2014-06-14 21:26:22 -04:00
Matthias Clasen
a666827d3a gtk-update-icon-cache: Add an --include-image-data option
Now that we don't include the image data by default anymore,
lets add an option that  does it.
2014-06-14 19:30:17 -04:00
Matthias Clasen
62f8dae7a8 gtkicontheme: Don't query CONTENT_TYPE to determine svg
We already know based on the suffix of the filename.

https://bugzilla.gnome.org/show_bug.cgi?id=721895
2014-06-14 18:54:24 -04:00
Jasper St. Pierre
6f92c7942e updateiconcache: Don't include image data by default anymore
Since large images are in the icon cache, and apps don't tend to use that
many icons anymore, simply don't include image data and instead make apps
load files from disk. Additionally, since they're stored in GdkPixbuf data,
that means that we have to first convert them either to a cairo_surface_t,
which requires converting pixel data to be premulitplied, or an OpenGL
texture, which requires a whole GPU upload anyway.

So, even with the icon cache, the goal of icons through zero-copy, mmap()'d
data from disk just isn't doable with the icon cache format we have. The
icon cache on my disk is nearing 100MB, since we include a bunch of
high-resolution application icons, that I doubt would be used by apps at all.
Removing this inefficient pixel data makes memory usage for all applications
go down, with no speed loss.

The icon cache also, however, has an index of what icons are in each folder,
which prevents a readdir() and allows GTK+ to know what icon is where without
having to do a bunch of stat(); calls. Keeping this data is good for GTK+,
so we should still keep the index.

It doesn't make sense to remove any code for mapping pixel data from the icon
cache. There's a plan in the works to have a symbolic icon cache that does
pixel math on 16x16 icons to prevent slow SVG rendering. 16x16 pixels are
fairly small, and such images are flat colors, which should compress easily,
so the icon cache would be worthwhile here. So let's keep the code around
in preparation for that case.

https://bugzilla.gnome.org/show_bug.cgi?id=721895
2014-06-14 16:08:24 -04:00
Paolo Borelli
c184458ab3 notebook: set tab position style class on the main frame
We want to have .top etc also on the notebook frame, not only on
the header frame.
The patch includes a reftest by Benjamin.
2014-06-14 21:37:07 +02:00
Matthias Clasen
fea939b3d7 GtkIconTheme: Don't treat svg icons specially
This changes makes svg icons go through the same scale calculation
code as png icons. As a consequence, an svg that is put into the
32x32 directory will actually be loaded at size 32, even if it
gets requested at a bigger size. This will let us avoid giant
spinners.

https://bugzilla.gnome.org/show_bug.cgi?id=731658
2014-06-14 15:10:49 -04:00
Lapo Calamandrei
fd53732035 Adwaita: try to make scrollbars near paned separator usable. 2014-06-14 19:06:26 +02:00
Lapo Calamandrei
b939b17f51 Adwaita: comment added 2014-06-14 15:37:36 +02:00
Lapo Calamandrei
40775415cc Adwaita: fix GtkScale outline offset and radius 2014-06-14 15:31:05 +02:00
Lapo Calamandrei
77a4b253df Adwaita: Gtkscale
- added slider assets for scales with marks
- experimental touch friendly fine-tune mode, grow the trough istead
  of shrinking the slider
2014-06-14 14:51:03 +02:00
Rico Tzschichholz
e3443c9cf5 Adwaita: drop references to render-borders.sh/borders.txt
They were dropped with 82b1232898
2014-06-14 13:13:29 +02:00
Lapo Calamandrei
83bc345b50 Adwaita: noticiable scale slider active state for the dark variant 2014-06-14 11:30:22 +02:00
Lapo Calamandrei
b10e358f5e Adwaita: include missing assets 2014-06-14 11:01:31 +02:00
Lapo Calamandrei
a1991df8d3 Adwaita: darker base color for the dark variant 2014-06-14 11:00:33 +02:00
Lapo Calamandrei
a6de44ac69 Adwaita: dark var backdrop insensitive fixes
Consistent backdrop insensitive state for dark variant GtkScale and GtkSwitch
2014-06-14 10:48:28 +02:00
Lapo Calamandrei
54e4c11ed1 Adwaita: GtkScale
slider :hover state added
2014-06-14 10:19:15 +02:00
Lapo Calamandrei
3d70add7f6 Adwaita: sidebar separator and selected item backdrop fix 2014-06-14 09:00:21 +02:00
Lapo Calamandrei
04a1a15e88 Adwaita: added a missing border to GtkFileChooser 2014-06-14 08:45:55 +02:00
Lapo Calamandrei
7fd675e4f6 Adwaita: better tab close button 2014-06-14 08:42:12 +02:00
Lapo Calamandrei
82b1232898 Adwaita: remove old cruft not used anymore 2014-06-14 08:31:36 +02:00
Lapo Calamandrei
a1bf6718f5 check and radio assets refresh 2014-06-14 08:29:47 +02:00
Stefan Sauer
406974fdb1 scrolledwindow: update GtkPolicyType docs
The policy is not determining the visibility of the scrollbars anymore, but the
how the size is to be computed to achive the selected visibility.
2014-06-14 08:10:46 +02:00
Stefan Sauer
0f4751c08e gtkbin: replace internal api 2014-06-14 08:10:46 +02:00
Matthias Clasen
aba6871dba inspector: Use Adwaita as default theme 2014-06-14 00:15:09 -04:00
Matthias Clasen
3ae4c8f125 Adwaita: bring back the extra indirection
Without this, we are missing the 'Adwaita' component in the
path when resolving relative resources, and none of the assets
are found.
2014-06-13 14:44:38 -04:00
Matthias Clasen
6cc5908d88 Try to fix the continuous build
Making gtk.gresource.xml generated was causing a problem for
srcdir!=builddir builds from git. Builds from tarballs are
not affected, because the tarball contains the generated file.
2014-06-13 14:16:37 -04:00
Matthias Clasen
cefa19d30c Use Adwaita as the default theme
This ensures that GTK+ applications have a high-quality theme on
all platforms, and look consistent.
2014-06-13 13:20:58 -04:00
Matthias Clasen
b4e1e01acc Include the Adwaita theme
This adds the resources for the Adwaita theme, and includes them
in libgtk, on all platforms.
2014-06-13 13:20:47 -04:00
Matthias Clasen
4c95dbb05b Don't include the win32 theme on Linux
No need to carry around these resources when we are not
going to use them.
2014-06-13 10:30:36 -04:00
Matthias Clasen
f1cf10fe86 Generate gtk.gresource.xml
This will help when including Adwaita. It will also let us
drop the win32 theme on Linux, hopefully.
2014-06-13 10:24:30 -04:00
Matthias Clasen
6fc65d5b0f Rename cursor pngs to their resource name
This allows us to get rid of some aliases in the .gresource.xml.
2014-06-13 09:28:27 -04:00
Matthias Clasen
6de3741f18 Move theme resources into subdirectories
Preparing for Adwaita to come in here.
2014-06-13 08:40:56 -04:00
Matthias Clasen
2e5cda99f8 inspector: Allow Escape to cancel picking 2014-06-13 06:10:23 -04:00
Matthias Clasen
404149b2bf inspector: Use a better icon for the picker
Recommended by Allan Day.
2014-06-13 06:10:23 -04:00
Matthias Clasen
c1270a19c3 Trivial formatting fix 2014-06-13 06:10:23 -04:00
Carlos Garnacho
6d8842ca96 gesturesingle: Implement GtkGesture::cancel better than GtkEventController:reset
The former can be called individually on each sequence, and the latter will
always call the former on all currently active sequences, so only implementing
resetting on cancel() works for both cases. Also, chain up on subclasses
implementing cancel.

This fixes clicking on nautilus' file list after popping up a menu, as broken
grabs are one of those situations where sequences get cancelled individually,
the "current button" wasn't properly reset, and further clicks with button != 3
were ignored.
2014-06-13 01:27:31 +02:00
Carlos Garnacho
05810f80a4 textview: Unobscure the mouse cursor on motion events
This used to be done before the gestures port, and was removed
accidentally, so keep the motion_notify_event handler just for
this, and fallback to having those events handled by gestures
too.
2014-06-12 23:23:43 +02:00
Dieter Verfaillie
daa8b48a33 Fix gtk_selection_data_get_data annotations
The annotations were intended for the return
value, not the instance argument.

https://bugzilla.gnome.org/show_bug.cgi?id=731299
2014-06-12 21:01:01 +02:00
Dieter Verfaillie
0c5b5fc053 docs: remove mention of old GtkList and GtkCList
Reported by andlabs in irc://irc.gnome.org/gtk+

https://bugzilla.gnome.org/show_bug.cgi?id=731382
2014-06-12 20:46:21 +02:00
Matthias Clasen
9bc07a2634 Add a message-dialog style class
This helps in separating message dialogs from other dialogs,
theming-wise.
2014-06-12 09:22:36 -04:00
Matthias Clasen
e97cf2fd0b Add GTK_STYLE_CLASS_POPUP to the docs 2014-06-12 09:22:06 -04:00
Carlos Garnacho
3b636cbeb9 scrolledwindow: Deny scrolling sequences if pressed on the scrollbars
Scrollbars might be a bit too narrow for touch (and generally less useful
besides kinetic scrolling), but those should be functional nevertheless.
2014-06-12 15:17:47 +02:00
Carlos Garnacho
3ef1b387bc window: Only claim a button=1 press sequence when dragging is about to happen
This way plain clicks can be handled in gtkmain through the usual delivery mechanism,
and get possibly handled too by widgets holding a GTK+ grab. If window dragging is to
be started, the sequence will be claimed (and a grab will happen afterwards), notifying
properly the grabbing widget that event delivery was interrupted.

This makes it possible to dismiss popovers by clicking on window headerbars, while
still making it possible to drag the window with the popover opened.
2014-06-12 14:27:35 +02:00
Matthias Clasen
5334fb8921 Drop GDK_MULTIHEAD_SAFE
We don't support multiple screens anymore, so there is no need
for marking API as multihead safe any longer.
2014-06-11 21:55:15 -04:00
Matthias Clasen
41fd2ae898 Deprecate outside-border style properties
These should just be replaced by CSS margins, etc.
2014-06-11 19:38:22 -04:00
Matthias Clasen
48db936b70 GtkButton: Don't use a non-zero border by default
The non-zero default default-border was causing buttons to shrink as
the focus moves around them. Themes which want a default-border should
define it explicitly.
2014-06-11 19:06:36 -04:00
Carlos Garnacho
3e65655424 treeview: Check that :row-activated is only emitted on GDK_BUTTON_PRIMARY
It turned out not all code was fully prepared to handle multiple buttons,
this avoids respawning https://bugzilla.gnome.org/show_bug.cgi?id=731020.
2014-06-11 23:18:34 +02:00
Carlos Garnacho
f321d3a50a treeview: Make row area multipress gesture react to all buttons
The code is actually prepared for that, the gesture was initially limited
to only handling GDK_BUTTON_PRIMARY because it only used to handle row
activation.
2014-06-11 23:01:31 +02:00
Carlos Garnacho
e114717097 treeview: Remove unused variables from priv struct
These variables were last used before moving row activation to being
managed by a gesture.
2014-06-11 17:36:04 +02:00
Carlos Garnacho
89f38b5fc6 treeview: Move all button press/release management to the multipress gesture
The multipress gesture on the bin window now also does all the business related
to row selection. As row selection and activation can't be easily decoupled, this
fixes certain problems around ::row-activated being emitted on NULL paths.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=731455 and
https://bugzilla.gnome.org/show_bug.cgi?id=731018
2014-06-11 17:36:04 +02:00
Carlos Garnacho
3f084e3ab5 treeview: Use drag gesture for rubberband selection/DnD
This gesture acts only on events from the bin window, and checks that
either the pressed row is draggable, or the conditions for rubberband
selection apply.
2014-06-11 17:36:03 +02:00
Carlos Garnacho
50491f15ae treeview: Use gestures for column dragging/resizing
A multipress gesture takes care of autosizing on double click, and
a drag gesture is used for both column dragging/resizing (only one
can happen at a time).
2014-06-11 17:36:03 +02:00
Carlos Garnacho
b8886436b3 treeviewcolumn: Avoid a device position query
This happens in an event handler, and the button event should be
expected to have the right coordinates on the event window already.
2014-06-11 17:36:03 +02:00
Carlos Garnacho
20a59985fe gesturesingle: Ensure the current button stays set until after the touch/button release
This makes gtk_gesture_get_current_button() work properly on GtkGesture::end, and signals
spawn from there on subclasses.
2014-06-11 17:36:03 +02:00
Matthias Clasen
e7b3d8b414 GtkPaned: Make sure the raise the handle window above children
We need to show child windows and handle in the right order,
otherwise the input-only handle window ends up under the children
where it is useless.
2014-06-11 09:33:30 -04:00
Matthias Clasen
77cb6d8b4a GtkTooltip: Ignore shadow when finding widgets
When placing tooltips, the csd shadow will get 'pushed up' and
may end up underneath the pointer. We don't want this to cause
the tooltip to be hidden, because that leads to flickering, so
ignore the shadow when finding the widget under the pointer.
2014-06-11 00:04:04 -04:00
Matthias Clasen
2d05bf1492 csd: Fix non-resizable windows
For csd override-redirect windows, we don't set up resize handles,
but we were not ignoring the margin in all places, causing some
size calculations to go wrong.
2014-06-11 00:04:04 -04:00
Matthias Clasen
a4b0d35649 Don't mention no longer existing widgets in the docs
GtkText, GtkList and GtkCList don't exist anymore.
2014-06-11 00:04:04 -04:00
Benjamin Otte
200bdf1aec stylecontext: Get rid of StyleData struct
It's now just a GtkCssComputedValues + refcount. And
GtkCssComputedValues has its own refcount, so use that one instead.
2014-06-11 01:18:05 +02:00
Benjamin Otte
57c4f01e0d stylecontext: Move property cache
... from per style data to only existing once per style context. This is
technically an API break because it no longer allows getting different
style properties between save()/restore() pairs, but I don't think this
was ever intended to work that way, as the style property API was to be
used and is used via gtk_widget_get_style().

And it simplifies code a lot.
2014-06-11 01:18:05 +02:00
Benjamin Otte
4a6957f50d stylecontext: Remove state from _peek_style_property()
It evaluates to "current state" in all cases, so no need to special case
it.
2014-06-11 01:18:04 +02:00
Benjamin Otte
d1dd33d885 css: Fix uninitializaed variable 2014-06-10 15:58:17 +02:00
Matthias Clasen
b0c6263f6c inspector: Add combobox popups to the tree 2014-06-10 08:54:12 -04:00
Matthias Clasen
ec9cf6d7c3 GtkComboBox: Add private api to get the popup
This will be used to make the popup appear in the inspector.
2014-06-10 08:54:12 -04:00
Matthias Clasen
634972e063 inspector: Add submenus to the tree 2014-06-10 08:54:12 -04:00
Benjamin Otte
c906aa7e08 menuitem: Use .arrow style class for submenu indicators
As requested by the Adwaita guys.
2014-06-10 13:47:51 +02:00