Matthias Clasen
5a940408fe
placessidebar: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
efce8c2899
iconview: Port to GtkDragSource
...
A small api change here is that
gtk_icon_view_enable_model_drag_source now returns
a GtkDragSource that can be used to connect signals.
2020-01-08 18:48:19 -05:00
Matthias Clasen
24ef9df0f1
pathbar: Convert to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
5d49b11ffd
colorswatch: Convert to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
8e3db48482
colorbutton: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
b15c31a3f7
textview: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
a52757874e
textbuffer: Add a content provider api
...
We need a content provider for the selection,
to implement DND, and the text buffer already
has one. Just add an api to get it.
2020-01-08 18:48:19 -05:00
Matthias Clasen
e9203eeef7
text: Convert to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
337057eb35
entry: Port icon dnd to GtkDragSource
...
This requires a small change in the api,
since we need to provide a GdkContentProvider now.
2020-01-08 18:48:19 -05:00
Matthias Clasen
2803a15a51
calendar: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
d145032cb6
linkbutton: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
2612331282
label: Port to GtkDragSource
2020-01-08 18:48:19 -05:00
Matthias Clasen
d3fd071809
dnd: Patch up gtk_drag_get_source_widget
...
This is temporary until gtk_drag_dest_set users
have been ported over.
2020-01-08 18:48:19 -05:00
Matthias Clasen
303c9becf8
Add a GtkDragSource object
...
Add an explicit GtkDragSource object, and move the source-side
DND signals here. The object can be used on the spot, by calling
gtk_drag_source_drag_begin() yourself, or for static drag-source
configuration, by calling gtk_drag_source_attach(). In the latter
case, we set up and conect a drag gesture to trigger the drag_begin
call.
2020-01-08 18:48:19 -05:00
Matthias Clasen
6bf46c8f30
marshalers: Add another
2020-01-08 18:48:19 -05:00
Matthias Clasen
173952cbc8
fixed layout: Actually set child transforms
...
The code was unintentionally appending to the
existing child transform, leading to ever-moving
children when you call gtk_fixed_put.
2020-01-08 10:40:44 -05:00
Timm Bäder
8e4f0b9484
sizerequest: Remove _gtk_widget_get_preferred_size_and_baseline
...
Private and unused function.
2020-01-07 17:27:19 +01:00
Timm Bäder
a3f14a3395
rendernodepaintable: ceil() bounds for intrinsic size
...
Otherweise we floor() implicitly when casting to int, resulting in
slight scaling later.
2020-01-07 17:27:19 +01:00
Timm Bäder
73b8212bf3
label: Fix assumptions regaring link
2020-01-07 17:27:18 +01:00
Timm Bäder
726909d735
Window: Avoid some redundant assignments
2020-01-07 17:27:18 +01:00
Timm Bäder
04899e3707
colorswatch: Avoid redundant assignment
2020-01-07 17:27:18 +01:00
Timm Bäder
73ce437459
widget: Use cssnode api to get the filter value
...
it's confusing that we use GtkStyleContext here while we use the CssNode
directly elsewhere.
2020-01-07 17:27:18 +01:00
Timm Bäder
21a7dfae96
snapshot: Only normalize rectangle if we have to
...
We can even replace the comment this way.
2020-01-07 17:27:18 +01:00
Timm Bäder
6c188f7c93
bin: Move vfunc implementations before class_init
...
And avoid every single function prototype.
2020-01-07 17:27:18 +01:00
Timm Bäder
c30e0f78ad
bin: Avoid some type checks
2020-01-07 17:27:18 +01:00
Timm Bäder
c38c5c4ce1
text: Reset cursor opacity when unmapping
...
Otherwise we might get mapped again with a half-transparent cursor.
2020-01-07 17:27:18 +01:00
Timm Bäder
108aac9ee3
scrolledwindow: Don't snapshot junction if we use indicators
...
The junction doesn't make sense when we use indicators, since the
scrollbars overlap anyway. Not snappshotting it anymore has no visual
effect since it's being drawn below the scrollbars anyway.
2020-01-07 17:27:18 +01:00
Timm Bäder
c427c2b22a
cssimagelinear: Don't call get_start_end if !repeating
...
This makes it clear that the !repeating case is easier.
2020-01-07 17:27:18 +01:00
Timm Bäder
59111d100f
cssimagelinear: Avoid computing the length if we know it
...
We handlet the common easy cases manually anyway, so don't bother
sqrt()ing the x/y coords in those cases.
2020-01-07 17:27:18 +01:00
Timm Bäder
cee8f78c6e
toolitem: Remove unused members
2020-01-07 17:27:18 +01:00
Timm Bäder
0fc35b2124
toolitem: Plug memory leak
2020-01-07 17:27:18 +01:00
Timm Bäder
982d73df0b
adwaita: Solve junction problem without border image
...
This genius piece of CSS colors only the top left (or top right in RTL)
pixel of the scrollbar junction.
Doing it this way is better because we don't have to upload a cairo node
every frame.
2020-01-07 17:27:17 +01:00
Timm Bäder
1e55e01692
scrolledwindow: Remove a useless local variable
2020-01-07 17:27:17 +01:00
Timm Bäder
412fcb0330
scrolledwindow: Avoid using gtk_widget_get_preferred_size
...
This way we only measure in the direction we need.
2020-01-07 17:27:17 +01:00
Timm Bäder
4fb519f04d
renderborder: Only get border width if we really need to
...
We did this unconditionally before the if statement, but we don't need
to do it if any of the early-out checks in the not-border-image branch
hits.
2020-01-07 17:27:17 +01:00
Timm Bäder
4788f88840
snapshot: Repeat color nodes by creating a larger color node
2020-01-07 17:27:17 +01:00
Timm Bäder
d490d8f1f3
renderbackground: Try to omit a save/restore pair
2020-01-07 17:27:16 +01:00
Timm Bäder
cb2f523994
rendernodes: Use floats for everything
2020-01-07 17:27:16 +01:00
Timm Bäder
075a0ccb5e
renderbackground: Save a snapshot_translate() call
...
Just add the values manually when really using the snapshot later. Also
unifies the two if branches by pulling out getting the x/y values.
2020-01-07 17:27:16 +01:00
Timm Bäder
6a9bc5daef
Avoid a few state changes
...
We can't optimize the save/restore calls away in the snapshot code, so
do it from the caller side.
2020-01-07 17:27:16 +01:00
Timm Bäder
095a378dbc
GdkRGBA: Use floats instead of doubles
2020-01-07 17:27:15 +01:00
Timm Bäder
0956c30ee5
progressbar: Remove unnecessary snapshot implementation
2020-01-07 17:27:15 +01:00
Matthias Clasen
448a402353
widget: Remove an unused signal
...
HIERARCHY_CHANGED is no longer used.
2020-01-06 08:19:01 -05:00
Matthias Clasen
df58d0acf3
Adwaita: Make dnd marks in text views green
...
We already do this in entries, this just updates
text views to match.
2020-01-03 13:00:53 -05:00
Matthias Clasen
9c2c5665df
textview: Render visible marks better
...
The only other visible mark that is in common use
besides insert and selection_bound is dnd_mark, and
we don't want it to blink or be affected by 'cursor'
visibility.
Therefore, cache not just the cursor positions, but
also whether they are insert or selection_bound,
and take that into account when rendering them.
2020-01-03 13:00:53 -05:00
Matthias Clasen
1be9c6aa3f
Merge branch 'remove-xim' into 'master'
...
Remove the XIM input method
See merge request GNOME/gtk!1195
2020-01-03 17:56:26 +00:00
Matthias Clasen
7a1aefc7f3
Fix the previous commit
...
We need to actually use the right coordinates.
2020-01-02 00:43:27 -05:00
Matthias Clasen
f7f06f810b
stackswitcher: Fix switch-while-drag functionality
2020-01-02 00:24:54 -05:00
Matthias Clasen
e02fd80adb
dnd: Be safer
...
The contents of the selection are documented
to not be NULL if size is non-negative. So
use an empty string instead of NULL for size 0,
avoiding a crash.
2020-01-01 12:51:19 -05:00
Matthias Clasen
f8a19506ab
Merge branch 'drag-icon' into 'master'
...
Drag icon
See merge request GNOME/gtk!1274
2019-12-30 21:20:26 +00:00