Matthias Clasen
47ac0db66c
viewport: Drop shadow-type
...
The viewport draws a frame at the same place as
the scrolled window, so there is really no need
to have that ability in both. Just drop the frame
from viewports.
2020-04-17 10:57:36 -04:00
Matthias Clasen
edae2a8dc5
frame: Drop shadow-type
...
Frames that don't draw frames are not very useful,
so just drop the shadow-type property.
2020-04-17 10:57:36 -04:00
Matthias Clasen
ffbc58d328
treeviewcolumn: Stop using a frame
...
There is no desire to draw a frame here, so don't use a GtkFrame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
285aa226e5
scrolledwindow: Drop shadow-type
...
We were only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
f297d0684d
scrolledwindow: Document the .frame style class
2020-04-17 10:57:36 -04:00
Matthias Clasen
7caed3a462
Merge branch 'assorted-menu-fixes' into 'master'
...
Assorted menu fixes
See merge request GNOME/gtk!1704
2020-04-17 14:12:20 +00:00
Timm Bäder
f4acde371e
snapshot: Avoid a save/restore pair if we can
2020-04-17 15:21:00 +02:00
Timm Bäder
aad67743b9
label: Ignore setting attrs from NULL to NULL
2020-04-17 15:21:00 +02:00
Timm Bäder
1886648652
text: unconditionally unref attr list
...
pango_attr_list_unref() works on NULL
2020-04-17 15:21:00 +02:00
Timm Bäder
67c2665028
text: Avoid creating a PangoAttrList we don't need
...
It's going to be empty, unless we have preedit_attrs
2020-04-17 15:21:00 +02:00
Timm Bäder
dda7a850da
meson: Use summary()
...
Instead of doing our own. Bumps the dependency to 0.53 though.
2020-04-17 15:21:00 +02:00
Timm Bäder
b8ef164c2b
meson: Trivial formattting
2020-04-17 15:21:00 +02:00
Timm Bäder
5d61abd748
label: Redraw when text attrs are affected by css change
...
GtkWidget doesn't do it automatically and probably shouldn't
2020-04-17 15:21:00 +02:00
Timm Bäder
9f6ec5b7d4
label: Don't create an unnecessary attribute list
2020-04-17 15:21:00 +02:00
Timm Bäder
78e6475f9f
label: Only parse mnemonic attributes if we need to
2020-04-17 15:21:00 +02:00
Timm Bäder
6289f7eecd
label: Ignore AFFECTS_ATTRS css changes if we can
...
It's only interesting if we either already have attributes, or the new
style adds some.
2020-04-17 15:21:00 +02:00
Timm Bäder
9ad0dbb145
label: Inline function into only caller
2020-04-17 15:21:00 +02:00
Timm Bäder
db9fbb3918
label: Remove some unused quarks
2020-04-17 15:21:00 +02:00
Timm Bäder
afaa352142
label: Remove priv pointer
2020-04-17 15:21:00 +02:00
Timm Bäder
3b7cb31157
label: Stop connecting to notify::gtk-enable-accels
...
Leftover from when GtkAccelLabel was a GtkLabel subclass. GtkAccelLabel
connects to this itself these days though.
2020-04-17 15:21:00 +02:00
Timm Bäder
f0b33cdc53
label: Set underline text and markup in one step
...
Try to unify the way we parse the mnemonic character
2020-04-17 15:21:00 +02:00
Timm Bäder
203b0c9c9d
label: Fold set_pattern_internal into only caller
2020-04-17 15:21:00 +02:00
Timm Bäder
1ea24e98c1
adwaita: don't extent %link in linkbuttons
...
We already do that for the label inside the button.
2020-04-17 15:21:00 +02:00
Timm Bäder
36248c609d
label: Remove GtkLabel:track-visited-links
...
Always track visited state of links. This way all visited links in all
labels look the same. Whether the theme wants to style :visited is the
theme's business.
2020-04-17 15:21:00 +02:00
Timm Bäder
f6bedd0d5e
label: Remove a11y-only properties
...
Update them manually instead.
2020-04-17 15:21:00 +02:00
Timm Bäder
8f96b38539
label: Fold function into only caller
...
This makes it more obvious that gtk_label_setup_mnemonic() depends on
the root of the widget and it therefore makes sense to call it in
::root/::unroot.
2020-04-17 15:21:00 +02:00
Timm Bäder
813be8a921
label: Don't normalize booleans in internal setters
...
We almost always pass a literal TRUE/FALSE to them.
2020-04-17 15:21:00 +02:00
Timm Bäder
21ac2330af
stylecontext: Remove get_pango_attributes
...
Make the only caller use GtkCssNode API.
2020-04-17 15:21:00 +02:00
Timm Bäder
584a71ae96
cssstyle: Only create PangoAttrList if there are attribtues
...
Don't allocate a new GString if we never need it and therefore don't
create the PangoAttrList if we have no attributes anyway. Update callers
to handle the possible NULL return value.
2020-04-17 15:21:00 +02:00
Timm Bäder
2e14ea84f3
label: Pull all pango attributes from the theme
...
Dont' force an underline attribute here. Just ask the theme for the
text-decoration.
2020-04-17 15:21:00 +02:00
Timm Bäder
4737495e3c
label: Fix an old TODO comment
2020-04-17 15:21:00 +02:00
Timm Bäder
57f913b753
modelbutton: Emit ::clicked() before closing the popover
...
The clicked handler might still need the popover.
2020-04-17 15:21:00 +02:00
Timm Bäder
4851081a77
label: Remove public pattern API
2020-04-17 15:21:00 +02:00
Timm Bäder
13fde6f4cd
label: Shorten set_markup_internal a bit
2020-04-17 15:21:00 +02:00
Timm Bäder
1db53e6676
label: Avoid duplicating a string
...
We only use str_for_accel if with_uline is TRUE.
2020-04-17 15:21:00 +02:00
Timm Bäder
74b5eaa700
label: Pass <markup> length directly when parsing markup
2020-04-17 15:21:00 +02:00
Timm Bäder
b16157bc0d
label: Remove a double if (needs_root) check
...
The code is clearer and shorter this way.
2020-04-17 15:21:00 +02:00
Timm Bäder
7a98e79d90
label: Use widget API to add style class
2020-04-17 15:21:00 +02:00
Timm Bäder
c588d8f858
label: Clear select info before creating a new one
...
E.g. set_markup_internal will create a new select_info, but then we were
destroying it again, just to recreate it later.
2020-04-17 15:21:00 +02:00
Timm Bäder
23cffdfe42
label: Save a few LOC
2020-04-17 15:21:00 +02:00
Timm Bäder
99998d25f8
label: Save links in an array
...
Stop using GList for this.
2020-04-17 15:21:00 +02:00
Timm Bäder
ca47e96d35
widget: Return an array from list_devices
...
To forther reduce the GList usage in the code base.
2020-04-17 15:21:00 +02:00
Timm Bäder
e583349956
accelgroup: Restructure gtk_accelerator_name
...
To fix invalid reads and make the function a bit shorter while we're at
it.
Fixes #2602
2020-04-17 15:21:00 +02:00
Timm Bäder
7bc4daae2f
main: Stop using GList when propagating events
...
There are still some cases missing.
2020-04-17 15:21:00 +02:00
Matthias Clasen
3469a63453
widget-factory: Use a model for the complex menu
...
We had the model already in the ui file, but weren't
using it.
2020-04-17 09:07:17 -04:00
Matthias Clasen
17cb92889a
modelbutton: Don't show accels without text
...
We don't want to show accelerators in iconic buttons.
2020-04-17 09:04:26 -04:00
Matthias Clasen
4a20a3fdb2
widget-factory: Catch errors
...
This speeds up the debugging when doing quick experimental
changes to widget-factory.ui.
2020-04-17 08:55:56 -04:00
Matthias Clasen
726a7ac705
inspector: Fix a crash
...
Don't crash while picking. The event signal broke
when GdkEvent was turned into a type instance,
since the automatic marshallers don't know how to
deal with that. Manually set the right marshaller.
2020-04-17 08:37:45 -04:00
Matthias Clasen
60329c3cda
Merge branch 'event-types' into 'master'
...
Rework event types
Closes #2585
See merge request GNOME/gtk!1702
2020-04-16 20:36:24 +00:00
Emmanuele Bassi
f28aa1ba02
Restructure the GdkEvent type hierarchy
...
GdkEvent has been a "I-can't-believe-this-is-not-OOP" type for ages,
using a union of sub-types. This has always been problematic when it
comes to implementing accessor functions: either you get generic API
that takes a GdkEvent and uses a massive switch() to determine which
event types have the data you're looking for; or you create namespaced
accessors, but break language bindings horribly, as boxed types cannot
have derived types.
The recent conversion of GskRenderNode (which had similar issues) to
GTypeInstance, and the fact that GdkEvent is now a completely opaque
type, provide us with the chance of moving GdkEvent to GTypeInstance,
and have sub-types for GdkEvent.
The change from boxed type to GTypeInstance is pretty small, all things
considered, but ends up cascading to a larger commit, as we still have
backends and code in GTK trying to access GdkEvent structures directly.
Additionally, the naming of the public getter functions requires
renaming all the data structures to conform to the namespace/type-name
pattern.
2020-04-16 19:54:02 +01:00