Timm Bäder
01ba11fc71
css: Remove outline border radius properties
...
These are always set to the same value as the corresponding border
radius properties. They are also non-standard, so remove them and
replace them with the border radius properties everywhere.
Fixes #2414
2020-02-08 20:43:16 +01:00
Matthias Clasen
f6b0e0e1c2
Merge branch 'avoid-mime-sniffing' into 'master'
...
Avoid mime sniffing where possible
See merge request GNOME/gtk!1400
2020-02-08 15:44:16 +00:00
Matthias Clasen
2f17ab3ce7
Avoid mime sniffing where possible
...
When we are loading symbolic pngs or svgs, we know
that we need to the png or svg loader, so there is
no need to go through (surprisingly expensive) mime
sniffing to find the right loader.
2020-02-08 10:22:54 -05:00
Matthias Clasen
55b60f6da9
gtk-demo: Don't call gtk_main_quit
...
It doesn't work with GtkApplications that do not
call gtk_main().
2020-02-07 16:25:02 -05:00
Matthias Clasen
1f74695758
Adwaita: Fix selection in vertical spin buttons
...
This was broken by more specific selectors.
2020-02-07 15:43:07 -05:00
Matthias Clasen
1ab70e2dfa
Merge branch 'patch-1' into 'master'
...
Update migrating-3to4.xml (fixed typo, in line 377)
See merge request GNOME/gtk!1398
2020-02-07 19:23:55 +00:00
J Arun Mani
3cbb3dc0f4
Update migrating-3to4.xml
2020-02-07 18:30:42 +00:00
Matthias Clasen
e3afb2fec8
label: Don't use gtk_widget_peek_style_context
...
We may just not have a style context. And we can just
as well go directly to the css styles.
2020-02-07 13:16:45 -05:00
Timm Bäder
d3857f8bd3
window: Move variable initialziation just before usage
2020-02-07 13:16:45 -05: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
69fa15981c
treepopover: Fix header guard
2020-02-07 13:16:32 -05:00
Timm Bäder
2a46d5960d
box: Move vfunc implementations before class_init
...
Just like we do everywhere else. This way we can also get rid of all the
prototypes.
2020-02-07 13:16:32 -05:00
Timm Bäder
b9b5cae6d2
calendar: Remove day-selected-double-click signal
...
It doesn't really make sense to treat double clicks here different than
single clicks (and is bad UX), and it also breaks switching months by
quickly trying to single-click the last/first days in the calendar.
2020-02-07 13:16:32 -05:00
Timm Bäder
3249756648
calendar: Remove an unused enum
2020-02-07 13:16:32 -05:00
Timm Bäder
8ef9009bde
calendar: Remove month-changed signal
...
Listen to notify::month instead.
2020-02-07 13:16:32 -05:00
Timm Bäder
093eac9441
calendar: Keep a GDateTime around
...
Instead of a year/month/day triple.
2020-02-07 13:16:32 -05:00
Timm Bäder
93c6f2256f
calendar: Return a GDateTime from get_date()
2020-02-07 13:16:32 -05:00
Timm Bäder
1151da5cf3
calendar: Use GDateTime to select days
2020-02-07 13:16:32 -05:00
Timm Bäder
a6f9052cf1
calendar: Use widgets for everything
2020-02-07 13:16:32 -05:00
Timm Bäder
a437162f6d
calendar: Try to avoid changing size when changing the year
2020-02-07 13:16:32 -05:00
Timm Bäder
9ecd448682
calendar: Remove spinning code
...
This is dead code
2020-02-07 13:16:32 -05:00
Timm Bäder
74cb1ca2f5
calendar: Add accessors for display properties
...
Instead of having a display flags enum and bitfield, just add proper
accessors for the properties, which is what we do everywhere else.
2020-02-07 13:16:32 -05:00
Timm Bäder
e94e703685
testcalendar: Remove unused function
2020-02-07 13:16:32 -05:00
Timm Bäder
4cceba06bc
calendar: Remove details
...
This is an unused feature that's way too complicated for a default
calendar widget and complicates the implementation a lot. Since we want
to eventually replace this with actual widgets, remove the details
support now.
2020-02-07 13:16:32 -05:00
Timm Bäder
ab84b17c1a
calendar: Fix an uninitialized value
...
Values pased to gtk_widget_measure must be initialized to 0. This failed
if the header widget of the calendar was invisible.
2020-02-07 13:16:32 -05:00
Timm Bäder
7fd06cacbd
Adwaita: Fix levelbar styling
...
The block nodes are inside a trough node.
2020-02-07 13:16:32 -05:00
Timm Bäder
b471158e38
{box,grid}layout: Access border spacing directly
...
Instead of going through the style context
2020-02-07 13:16:32 -05:00
Timm Bäder
8388791f87
GskTransform: Remove useless fmod check
...
All angles are in the [0; 360[ range
2020-02-07 13:16:32 -05:00
Timm Bäder
cbb05a3eab
GskTransform: add assertions to make normalize_angle() intentions clear
...
360deg should be expressed as 0deg and no angle should ever be
negative.
2020-02-07 13:16:32 -05:00
Timm Bäder
4cfac3b91c
snapshot: Remove new_with_parent
...
Unneeded now that we have push_collect()/pop_collect()
2020-02-07 13:16:32 -05:00
Timm Bäder
17ddae5bf9
textlayout: Use gtk_snapshot_{push,pop}_collect()
2020-02-07 13:16:32 -05:00
Timm Bäder
75ef8d8a50
GskRoundedRect: Inline graphene_rect_contains_rect
...
Brings gsk_rounded_rect_contains_rect down from 0.54% to 0.14% when
rendering rounded backgrounds.
2020-02-07 13:16:32 -05:00
Timm Bäder
47b8facca4
widget: Use gtk_snapshot_{push,pop})_collect
...
So we avoid allocating a new snapshot just for that.
2020-02-07 13:16:32 -05:00
Timm Bäder
bf8fb2c1a5
snapshot: Add _push_collect() and _pop_collect()
...
These will replace the previous gtk_snapshot_new_with_parent(), which
allocated an entirely new GObject just to push()/pop() some state. This
is already a problem but will be more important in the future as we
start using this more.
2020-02-07 13:16:32 -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
b1d64a6b3a
renderborder: Make simple border case more obvious
...
When reaching this point, it is impossible that all border styles are
HIDDEN or NONE, but up to 3 of them can still be that style. In any
case, the "none or solid" border style is the most common on there is,
so try to make this simpler here by just appending a border node
directly instead of going through the snapshot_border path.
2020-02-07 13:15:59 -05:00
Timm Bäder
60095ade9b
Move GTK_BORDER_STYLE_HIDDEN before GTK_BORDER_STYLE_SOLID
...
The simple case when drawing border is "solid or nothing", which we can
now check for as simple as "style <= GTK_BORDER_STYE_SOLID".
2020-02-07 13:15:59 -05:00
Timm Bäder
3a727eed7a
testcalendar: Close window properly
2020-02-07 13:15:59 -05:00
Timm Bäder
64c6229f54
searchbar: Use proper getter in _get_property()
...
Instead of retuning a seemingly random boolean, just use
gtk_search_bar_get_search_mode().
2020-02-07 13:15:59 -05:00
Timm Bäder
60be37d63a
searchbar: Use g_object_notify_by_pspec
...
We already keep the pspecs around, so use them.
2020-02-07 13:15:59 -05:00
Timm Bäder
e044656d99
progressbar: Remove a few unneeded queue_resize() calls
...
This will happen automatically when adding style classes, setting the
label text, etc.
2020-02-07 13:15:59 -05:00
Timm Bäder
c0fef36692
Window: inline function into only caller
2020-02-07 13:15:59 -05:00
Timm Bäder
a67bd7a04e
widget: Fix a from_string/try_string mixup
2020-02-07 13:15:59 -05:00
Timm Bäder
e152d25ac0
widget: Speed up verify_invariants()
...
Hide the expensive GTK_IS_ROOT() checks behind the cheaper realized,
mapped, etc. checks. This way we only check for the widget being a root
if the invariant does not hold.
This gets pop_verify_invariants() from 16% to 6% when running the
scrolling benchmark in the widget-factory.
2020-02-07 13:15:59 -05:00
Timm Bäder
b561eb8299
widget: Remove verify_child_invariants
...
Just calls verify_invariants() anyway.
2020-02-07 13:15:59 -05:00
Piotr Drąg
6150344195
Update POTFILES.in
2020-02-07 17:27:16 +01:00
Alexander Larsson
24fede0225
GtkIconHelper: Trigger preload when css sizes is valid
...
When the css is validated we know the css size, so we can
create the paintable at that point, and we do so passing the
LOAD_IN_THREAD flag.
This causes us to load most icons early on, in parallel instead of
during the first snapshot.
2020-02-07 17:26:22 +01:00
Alexander Larsson
e27413a9ed
icon-theme: Add GTK_ICON_LOOKUP_LOAD_IN_THREAD flag
...
This causes lookup to trigger a thread that loads the icon texture.
2020-02-07 17:25:18 +01:00
Matthias Clasen
03317ec2ec
NEWS: Small additions
2020-02-07 09:17:51 -05:00
Matthias Clasen
1a671cfd63
flatpak: Build against the master runtime
...
This is what the ci is set up to use, and building
against 3.34 fails there.
2020-02-07 09:17:51 -05:00