Matthias Clasen
394ea32e93
Use gtk_widget_add/remove_css_class more
...
Replace most uses of gtk_style_context_add/remove_class
by the new APIs. The only remaining uses of the old API
are in save/restore situations.
2020-04-10 12:09:57 -04:00
Emmanuele Bassi
6e8c78714d
Turn GtkShortcutAction into a GObject
...
Just like we did for GtkShortcutTrigger.
This allows language bindings to properly deal with all the actions.
2020-03-25 23:14:45 -04:00
Matthias Clasen
844801580f
colorchooser: Stop using ::popup-menu
...
This signal is going away. Use an action instead.
2020-03-25 23:14:44 -04:00
Matthias Clasen
31db615885
Revert "Merge branch 'disable-window-test' into 'master'"
...
This reverts commit 3ac4c76b18
, reversing
changes made to 6ec96d2e98
.
2020-03-19 18:03:16 -04:00
Matthias Clasen
f40965cc40
colorchooser: Stop using ::popup-menu
...
This signal is going away. Use an action instead.
2020-03-18 23:00:51 -04:00
Timm Bäder
655711fef2
Rename gtk_widget{get,set,has}_style_class to _css_class
...
We want to use css instead of style everywhere now.
2020-02-07 13:16:45 -05:00
Timm Bäder
b7ee2cbc28
Start using GtkWidget's new style class API
2020-02-07 13:16:32 -05:00
Timm Bäder
095a378dbc
GdkRGBA: Use floats instead of doubles
2020-01-07 17:27:15 +01:00
Timm Bäder
7344723a95
colorscale: Remove some duplicated code
2019-10-12 17:59:23 +02:00
Timm Bäder
6f1cade817
color chooser: Port checkered pattern drawing from cairo
2019-08-11 09:34:50 +02:00
Timm Bäder
9b15c6900a
colorscale: Redraw correct widget after setting rgba
...
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
2019-01-16 19:20:53 +01:00
Timm Bäder
059d9376da
colorscale: Cache hue texture
...
Otherwise we regenerate a new one on every snapshot() call.
2018-11-27 05:37:38 +01:00
Timm Bäder
6eba544ad4
colorscale: Remove x/y arguments from snapshot_scale
...
We only pass 0 anyway.
2018-11-09 18:01:58 +01:00
Timm Bäder
501efeb6b9
colorscale: Remove priv pointer
2018-06-18 17:35:03 +02:00
Benjamin Otte
bf82149271
longpressgesture: Port to new API model
2018-04-26 17:59:42 +02:00
Benjamin Otte
73b4a62f51
snapshot: Redo debug messages
...
Instead of every snapshot function having debug messages, have an
explicit gtk_snapshot_push_debug() function that appends a debug node.
2018-04-24 04:06:58 +02:00
Benjamin Otte
8c43f22e3e
colorscale: Draw gradient using render nodes
...
Don't use Cairo when it's not needed.
2018-03-26 00:31:12 +02:00
Benjamin Otte
438b4b6b5c
colorscale: Draw hue background as a texture
...
No need to use Cairo here.
2018-03-26 00:31:12 +02:00
Benjamin Otte
6bad307180
colorscale: Don't free surface data before surface
...
When drawing onto a recording surface, source surfaces get cached.
But if we g_free() the surface data after we're done, that cache is
gonna point at invalid data...
2018-03-25 22:38:42 +02:00
Carlos Garnacho
a72404dd5a
gtk: Mass delete all GtkWidget event mask API
...
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.
Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
2017-05-25 16:25:58 +02:00
Benjamin Otte
6055028c96
snapshot: Rename append APIs
...
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.
2017-01-13 04:46:09 +01:00
Benjamin Otte
4d9eedafcd
roundedbox: Add gtk_rounded_boxes_init_for_style()
...
Instead of making people intiialize a rectangle and then applying border
radius manually, provide a constructor that does it for them.
While doing that, also allow people to instead request the padding box
or the content box.
Refactor all relevant code to use this new constructor.
2016-12-20 18:01:12 +01:00
Benjamin Otte
81297857cc
snapshot: Convert Range, Scale, ColorScale
...
And of course Scrollbar, but that one does no drawing itself.
2016-12-20 18:01:11 +01:00
Timm Bäder
6b01940194
colorscale: Avoid invalid write
2016-10-17 18:47:16 +02:00
Ben Iofel
84739239ce
colorscale: modify loop variables in loop body
2016-10-17 15:17:28 +01:00
Emmanuele Bassi
fbf6aa1776
colorscale: Rename variables
...
Avoid shadowing existing variables.
2016-10-17 11:44:10 +01:00
Benjamin Otte
fc7335bdb4
colorscale: Draw a trough
...
Make sure the color info is actually drawn inside the trough.
2016-03-11 16:39:34 +01:00
Cosimo Cecchi
1a116b9a95
colorscale: don't use style properties to determine slider size
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
8b87eca11e
Revert "range: move GtkColorScale special case to GtkColorScale"
...
This reverts commit d93d266ed9e3e26e382a4f6d4b5d4ea19eff3bcf.
2016-02-29 10:45:12 -08:00
Cosimo Cecchi
b6f0b6be87
range: move GtkColorScale special case to GtkColorScale
...
Now we can just tweak the node visibility for it.
2016-02-29 10:45:12 -08:00
Matthias Clasen
e7fc87e4ac
color scale: Improve themability
...
Add the .color class, so themes can style scale.color.
Clip the trough rendering to the content path, so that
themes can set rounded corners.
2016-01-15 20:08:57 -05:00
Matthias Clasen
c85e32d56e
color scale: simplify code a bit
...
It is not necessary to call gtk_widget_get_accessible repeatedly.
2015-02-18 17:28:08 -05:00
Carlos Garnacho
907e9f1946
gtk: Update GtkGesture users to the GtkPropagationPhase semantics change
...
Mainly doing s/TARGET/BUBBLE/ on the fully ported widgets, but GtkTreeView
where the double click handler has moved to GTK_PHASE_TARGET so it runs
parallelly to the still existing event handlers.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
d05a9f9a7b
gesture: Replace gtk_gesture_attach/detach with event controller API
...
Event controllers now auto-attach, and the GtkCapturePhase only determines
when are events dispatched, but all controllers are managed by the widget wrt
grabs.
All callers have been updated.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
5369c77029
gesture: Simplify gesture/widget interaction public API
...
The propagation phase property/methods in GtkEventController are gone,
This is now set directly on the GtkWidget add/remove controller API,
which has been made private.
The only public bit now are the new functions gtk_gesture_attach() and
gtk_gesture_detach() that will use the private API underneath.
All callers have been updated.
2014-05-23 19:54:29 +02:00
Carlos Garnacho
d5cb4841c8
colorscale: Replace GtkPressAndHold with GtkLongPressGesture
2014-05-23 19:54:26 +02:00
Cosimo Cecchi
13649a3fbc
colorscale: don't use focus-line-width
2014-05-09 11:02:46 -07:00
Cosimo Cecchi
c62d6fea70
colorscale: don't use focus padding
2014-05-09 11:02:44 -07:00
Emmanuele Bassi
0899ef7cc9
gtk: Use new macros for defining private data
...
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Matthias Clasen
a986cb4a76
colorscale: Select for touch events
...
We use long touches to trigger the popup.
2012-03-04 11:24:51 -05:00
Javier Jardón
9d0febc9a6
Change FSF Address
2012-02-27 17:06:11 +00:00
Cosimo Cecchi
bef12c003c
color-scale: remove Adwaita GtkColorScale trough hack
...
Instead of special-casing Adwaita, apply the half-width logic for themes
that have a scale slider with vertical proportions.
Also, simplify the rendering code a bit by factoring out the trough
sizing logic.
2012-02-14 16:37:05 -05:00
Cosimo Cecchi
19da38b811
colorchooser: factor out a private method to get the checkboard pattern
...
And use it in the color widgets.
2012-02-14 16:37:04 -05:00
Matthias Clasen
1f698e4f62
GtkColorScale: fix an RTL issue
...
When using a horizontal scale in RTL, we need to flip the
background image to go along with the flipped scale.
2012-02-14 16:37:04 -05:00
Matthias Clasen
bad24bc119
Consistently private headers
...
Add a 'private' suffix to all newly introduced private
headers.
2012-02-14 16:36:58 -05:00
Matthias Clasen
d7cff0797e
Misc cleanups
2012-02-14 16:36:56 -05:00
Matthias Clasen
cb128cc6e9
Deprecate old color selection widgets
...
GtkColorSelectionDialog, GtkColorSelection and GtkHSV have
been superseded by the GtkColorChooser* family of widgets.
2012-02-14 16:36:55 -05:00
Matthias Clasen
c5cfb6e02b
Rework the API a bit
...
Rename get/set_color to get/set_rgba and show_alpha to use_alpha,
to match existing GtkColorButton API and let GtkColorButton implement
GtkColorChooser.
2012-02-14 16:36:55 -05:00
Matthias Clasen
1f68d7d827
Simplify GtkColorScale private api a bit
2012-02-14 16:36:55 -05:00
Matthias Clasen
cc127c64a9
Add some accessible labels
2012-02-14 16:36:54 -05:00