summaryrefslogtreecommitdiff
path: root/gtk/gtkrange.c
Commit message (Collapse)AuthorAgeFilesLines
* macos: port gtk to GDK_WINDOWING_MACOSwip/chergert/gdk-macos-fixesChristian Hergert2020-10-091-1/+1
| | | | | | | | | For the various uses of GDK_WINDOWING_QUARTZ, we need to use alternatives from GDK_WINDOWING_MACOS. Some minor loss of functionality is here, such as icons sent with application menus. That can certainly be added back at a future point.
* Clean up lots of GTK+ -> GTKMatthias Clasen2020-09-121-3/+3
| | | | | | Replace most remaining uses of GTK+ in the docs and user-visible strings by GTK. Also remove some leftover "Was added in 3.x" sentences from the docs.
* Drop style class definesMatthias Clasen2020-08-141-8/+8
| | | | | | We document the supported style classes by name, not by macro name, and these macros don't really add any value. Drop them for GTK 4.
* gdk: Conflate GDK devicesCarlos Garnacho2020-07-291-1/+1
| | | | | | | | | | Make GdkEvents hold a single GdkDevice. This device is closer to the logical device conceptually, although it must be sufficient for device checks (i.e. GdkInputSource), which makes it similar to the physical devices. Make the logical devices have a more accurate GdkInputSource where needed, and conflate the event devices altogether.
* a11y: Update the accessible state for GtkRangeEmmanuele Bassi2020-07-261-10/+45
|
* Remove ATKEmmanuele Bassi2020-07-261-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To build a better world sometimes means having to tear the old one down. -- Alexander Pierce, "Captain America: The Winter Soldier" ATK served us well for nearly 20 years, but the world has changed, and GTK has changed with it. Now ATK is mostly a hindrance towards improving the accessibility stack: - it maps to a very specific implementation, AT-SPI, which is Linux and Unix specific - it requires implementing the same functionality in three different layers of the stack: AT-SPI, ATK, and GTK - only GTK uses it; every other Linux and Unix toolkit and application talks to AT-SPI directly, including assistive technologies Sadly, we cannot incrementally port GTK to a new accessibility stack; since ATK insulates us entirely from the underlying implementation, we cannot replace it piecemeal. Instead, we're going to remove everything and then incrementally build on a clean slate: - add an "accessible" interface, implemented by GTK objects directly, which describe the accessible role and state changes for every UI element - add an "assistive technology context" to proxy a native accessibility API, and assign it to every widget - implement the AT context depending on the platform For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
* gtk: Improve struct packing in placesMatthias Clasen2020-07-251-2/+2
| | | | | | Plug some holes in our structs by rearranging a few fields. This is was done looking at pahole output.
* Replace "gdouble" with "double"Benjamin Otte2020-07-251-71/+71
|
* Replace "gint" with "int"Benjamin Otte2020-07-251-36/+36
|
* gtkrange: group gestures the right way aroundCarlos Garnacho2020-07-091-2/+2
| | | | | | | | | | | | | | The gtk_gesture_group() call is not a commutative operation, it takes two gestures, maybe detaches the first one from its current group, and adds it to the same group than the second gesture. With the flipped argument order here, GtkRange was actually detaching the same gesture in order to group it with a second one two times, so the desired effect to group all 3 gestures was not achieved. Fixes autoscroll as the drag gesture is now actually grouped with the click one, so drag offsets can be accessed from the autoscroll timeout.
* scale: Rearrange child widgetsTimm Bäder2020-06-271-11/+0
| | | | | | | | | | | | | | | | Always keep the order: - [value] - [marks.top] - [marks.bottom] - trough Which makes sense given the rendering order. Slider should be drawn after the marks. Makes it possible to simply remove the custom snapshot implementations in scale and range. And Adwaita does not depend on the node order anyway.
* Fix minor typosYuri Chornoivan2020-06-181-1/+1
|
* a11y: Drop notify_gtk() from GtkRangeAccessibleEmmanuele Bassi2020-06-051-0/+9
| | | | | Let the GtkRange notify the accessible instance when the adjustment changes.
* Move orientable style classes into GtkWidgetEmmanuele Bassi2020-06-051-4/+5
| | | | | | | | | It feels slightly wrong to have GtkOrientable operate on widgets, but at least what happens when an orientable widget changes orientation should be part of GtkWidget. This will allow to add more state changes without accessing widget state from the outside of gtkwidget.c.
* range: Treat lower and upper limit the sameMatthias Clasen2020-05-211-2/+2
| | | | | | | | When clamping values to be within the range of the adjustment, treat the lower and upper limit the same. Fixes: #328
* Change coordinate translation apis to take doublesMatthias Clasen2020-05-171-13/+14
| | | | | | Change gtk_widget_translate_coordinates and gtk_native_get_surface_transform to operate on doubles. Update all callers.
* scale: Make the area around the trough clickableMatthias Clasen2020-05-131-4/+4
| | | | | The narrow trough is too hard to hit as a click target. Make the entire scale clickable.
* range: Use dispose instead of destroyMatthias Clasen2020-05-051-5/+5
| | | | The destroy vfunc is going away.
* gizmo: Allow passing changing focus behaviorMatthias Clasen2020-04-091-4/+5
| | | | | We need this in popovers. Maybe it could be done better by defining one-off custom widgets.
* range: Remove ::popup-menu emissionMatthias Clasen2020-03-251-10/+0
| | | | | This signal is going away, and having context menus on sliders is not really a thing anyway.
* Revert "Merge branch 'disable-window-test' into 'master'"Matthias Clasen2020-03-191-0/+10
| | | | | This reverts commit 3ac4c76b18cc89a841ce09f0943539f16988fd21, reversing changes made to 6ec96d2e989d029a303b8b20ec72b86f974c0e87.
* range: Remove ::popup-menu emissionMatthias Clasen2020-03-181-10/+0
| | | | | This signal is going away, and having context menus on sliders is not really a thing anyway.
* range: Remove an outdated commentTimm Bäder2020-02-251-3/+0
| | | | What even is a CList.
* range: Inline function into only callerTimm Bäder2020-02-251-20/+9
|
* range: Clean up compute_slider_position()Timm Bäder2020-02-251-47/+29
|
* events: reorganize gettersMatthias Clasen2020-02-211-1/+1
| | | | | | | | | | Restructure the getters for event fields to be more targeted at particular event types. Update all callers, and replace all direct event struct access with getters. As a side-effect, this drops some unused getters.
* Strip const from GdkEventMatthias Clasen2020-02-211-1/+1
| | | | | Events are refcounted structs, and we generally don't pass these as const.
* range: Avoid rounding errors when allocating highlightTimm Bäder2020-02-151-6/+4
| | | | Fixes #2438
* Rename gtk_widget{get,set,has}_style_class to _css_classTimm Bäder2020-02-071-12/+12
| | | | We want to use css instead of style everywhere now.
* Start using GtkWidget's new style class APITimm Bäder2020-02-071-27/+12
|
* range: Avoid a divison by 0Timm Bäder2019-08-111-3/+9
| | | | | | Based on a patch by Blake Latchford Fixes #618
* range: Use public delay-factory APITimm Bäder2019-08-111-1/+1
|
* scale: Properly update when invertedTimm Bäder2019-08-101-1/+1
| | | | | | Just queue_resize()ing the range itself doesn't work as it will just re-allocate all the child widgets (i.e. just the trough) to its old position and size.
* range: Remove outdated commentTimm Bäder2019-08-101-4/+0
|
* range: remove range_size_request vfuncTimm Bäder2019-08-091-11/+0
| | | | It's unneeded in GtkScale and named after the gtk2 size_request function
* Rename GtkGestureMultiPress to GtkGestureClickMatthias Clasen2019-05-291-17/+17
| | | | | The name just made it hard for people to find the right gesture to use.
* Remove gtk_widget_get/set_has_surfaceMatthias Clasen2019-05-281-2/+0
| | | | | These serve no purpose anymore - widgets don't have surfaces, unless they're a GtkNative.
* range: Use standard paddingMatthias Clasen2019-05-261-0/+1
|
* Rename thingsMatthias Clasen2019-04-081-1/+1
| | | | | Rename the can-pick property to can-target, and redo the pick flags with more descriptive names.
* Add a flags argument to gtk_widget_pickMatthias Clasen2019-04-071-2/+2
| | | | | | | This will be used to let the inspector and other users pick insensitive widgets again. For now, update all callers to pass no flags, preserving the current behavior.
* gizmo: Add a contains_funcMatthias Clasen2019-04-071-4/+5
| | | | | Let GtkGizmo override the contains() implementation. Update all callers to pass NULL for the contains_func.
* gtk: Check return value of compute_bounds()Benjamin Otte2019-02-201-21/+34
| | | | | Half of these calls will completely break if anybody ever uses CSS transforms with them, but hey...
* Remove some unnecessary gtkwindow.h includesTimm Bäder2019-02-051-1/+0
|
* gtk: Drop the "plus"Emmanuele Bassi2019-02-051-2/+2
| | | | Source names should use "[gtk]" without the plus.
* Remove :active state handling on widgetsTimm Bäder2019-01-291-27/+0
|
* gizmo: return void from snapshot funcTimm Bäder2019-01-181-4/+2
| | | | | This boolean return was from the old gadget code and we weren't using it in the new gizmo code.
* colorscale: Redraw correct widget after setting rgbaTimm Bäder2019-01-161-0/+8
| | | | | | | | | The entire color scale hack is still done in GtkRange, which draws the color scale in the range gizmo. So, to correctly redraw the color scale when setting a new color, we need to redraw the proper widget and that's the trough widget. Fixes #1453
* Use g_clear_pointer to unparent widgetsTimm Bäder2018-11-131-13/+6
|
* widget: Don't pass a position to ->size_allocateTimm Bäder2018-11-131-38/+43
| | | | | The values have been 0/0 for a long time now, so just drop the GtkAllocation argument and replace it with width and height.
* eventcontrollerscroll: Conditionally propagate ::scrollErnestas Kulik2018-11-121-2/+4
| | | | | | | | | | | | Currently, gtk_event_controller_scroll_handle_event() always returns TRUE if it is handled, which stops the propagation of the event. If there’s a single GtkEventControllerScroll in the widget hierarchy, that means that no others will run, depending on the propagation phase. In Nautilus, this can be observed when adding a scroll controller to the GtkScrolledWindow (ctrl-scrolling controls the zoom level) - either the scrolling or the zooming breaks. Fixes https://gitlab.gnome.org/GNOME/gtk/issues/45