Timm Bäder
f4f060c843
snapshot: Don't move shadows too much
...
dx/dy are relative to the node bounds, which are already moved by x/y.
2019-10-11 13:47:40 +02:00
Christian Hergert
c7a5d99286
textview: use gtk_snapshot_new_with_parent()
...
As recommended by Timm Bäder at:
3b959456ac (note_621655)
2019-10-09 12:56:06 -07:00
Christian Hergert
e4a00f864d
textview: fix off-by-one in y_range invalidation
...
Previously, with selection bounds, we could have a state where a line
display with selections set would eroniously stay in the cache. This
aggresively releases those at the boundary cases fixing deselection
drawing state.
2019-10-09 10:43:34 -07:00
Timm Bäder
c23afb2c86
widget: Compare adjusted sizes in size_allocate
2019-10-09 16:57:22 +02:00
Timm Bäder
e5de03144f
inspector: Don't add padding to spinbuttons
...
That looks stupid.
2019-10-09 16:57:22 +02:00
Timm Bäder
e325f65c8a
spinbutton: Fix adjustment value thinko
...
Using ints here is wrong as it makes it impossible to e.g. edit a double
in the [0; 1] range.
2019-10-09 16:57:22 +02:00
Timm Bäder
2a40ff1b47
Adwaita: add statusbar padding back
...
We removed the widget margins from the ui file over 2 years ago.
2019-10-09 16:57:22 +02:00
Timm Bäder
371c325ed1
statusbar: Use a bin layout
2019-10-09 16:57:22 +02:00
Timm Bäder
3d3525a589
stacksidebar: Inherit from GtkWidget
...
The child widgets are completely managed by the stacksidebar itself, so
this has no business being a GtkBin.
2019-10-09 16:57:22 +02:00
Timm Bäder
553c458e5a
Adwaita: Remove superfluous border from stacksidebar
...
We already get a border from .sidebar
2019-10-09 16:57:22 +02:00
Timm Bäder
172f68e77d
popovermenu: Switch to main submenu before mapping
2019-10-09 16:57:22 +02:00
Timm Bäder
fb1145d72d
popovermenu: Only close if there's a new focus widget
...
Makes sense and otherwise we end up closing the popover for no reason
2019-10-09 16:57:22 +02:00
Timm Bäder
bd9687a4f2
popovermenu: Switch back to "main" AFTER unmapping
...
Otherwise we might set things to child visible etc. while being
unmapped, which is a violation of the widget invariants of these
properties.
2019-10-09 16:57:22 +02:00
Timm Bäder
49887d4c81
filechooserbutton: Only destroy existing native dialogs
2019-10-09 16:57:22 +02:00
Timm Bäder
d8c940325c
widget: Create finalize assertions in destroy()
2019-10-09 16:57:22 +02:00
Timm Bäder
a3cef6c05e
label: Use TRUE/FALSE instead of 1/0
2019-10-09 16:57:22 +02:00
Timm Bäder
11ee72fc7e
dialog: Fix action button rearrangement
...
The gtk_widget_get_parent() check does not work anymore since the
headerbar adds the buttons to a child box.
2019-10-09 16:57:22 +02:00
Timm Bäder
355d3f070a
widget: Plug layout manager leak
2019-10-09 16:57:22 +02:00
Timm Bäder
b5b81dea7f
modelbutton: Rework
...
Create all the widgets on demand and use a box layout to arrange them
instead of manual size allocation.
Also don't inherit from GtkButton
2019-10-09 16:57:21 +02:00
Timm Bäder
5803366f7d
button: Remove unused signal enum members
2019-10-09 16:57:21 +02:00
Timm Bäder
d3fc47e149
modelbutton: Use a box layout
2019-10-09 16:57:21 +02:00
Timm Bäder
b8f37da911
modelbutton: Replace map() with root()
2019-10-09 16:57:21 +02:00
Timm Bäder
722f8e825e
modelbutton: Remove end_box
...
it's unused.
2019-10-09 16:57:21 +02:00
Timm Bäder
a743412c58
modelbutton: Create accel label on demand
2019-10-09 16:57:21 +02:00
Timm Bäder
a6f14555d1
Adwaita: Blue check/radiobuttons
...
Align with 3.24.
2019-10-09 16:57:21 +02:00
Feichtmeier
1c091a03f3
Tiny refactoring
...
- use checkradio_fg_color for check/radio in treeview, which points to fg_color, so no change of the hex color, thus no change to the parsed CSS
2019-10-09 16:57:21 +02:00
frederik.feichtmeier
2dfb8de0ec
Adwaita: Add color defines from 3.24
2019-10-09 16:57:21 +02:00
Jakub Steiner
876e256f94
Adwaita: make links in infobars legible
...
- No longer tinted blue, make legible
Fixes https://gitlab.gnome.org/GNOME/gnome-software/issues/751
2019-10-09 16:57:21 +02:00
Timm Bäder
eb834b8370
adwaita: Use border-spacing to style checkbuttons
2019-10-09 16:57:21 +02:00
Timm Bäder
dbabdf8341
radiobutton: Fix a warning in a code sample
2019-10-09 16:57:21 +02:00
Timm Bäder
703fda3be8
label: Remove set_selectable_hint
...
It's just updating the cursor, so do it via update_cursor()
2019-10-09 16:57:21 +02:00
Timm Bäder
2f6d6f2473
label: Remove gtk_label_realize
...
We don't need this to update the cursor anymore.
2019-10-09 16:57:21 +02:00
Timm Bäder
3f3c8436c5
label: Don't update cursor after unsetting select_info
...
update_cursor() doesn't do anything in the priv->select_info == NULL
case.
2019-10-09 16:57:21 +02:00
Timm Bäder
d8b0a78c1e
label: Change cursor even if unrealized
...
Cursor don't depend on that anymore.
2019-10-09 16:57:20 +02:00
Timm Bäder
013538daf9
placesviewrow: popup-menu returns a boolean
2019-10-09 16:57:20 +02:00
Christian Hergert
3b959456ac
textview: cache paragraph render nodes
...
We can avoid recreating a number of text nodes from render_para() on
sub-sequent runs if we cache the rendernode instead of just the
PangoLayout.
When used with GtkSourceMap, this can yield a ~7 FPS improvement during
smooth scrolling at the cost of some more memory.
2019-10-08 11:44:27 -07:00
Sam Hewitt
83eeeb6a19
Adwaita: circular button fix
...
- remove old border drawing code that was breaking coloured buttons
- fixes #2173
2019-10-07 16:50:34 -04:00
Sam Hewitt
6db181980a
Adwaita: osd button fixes
...
- remove text/icon shadow from osd buttons
- use :only-child to get circular standalone button
- fixes #1696
2019-10-07 15:27:55 -04:00
Sam Hewitt
023bb2c984
Adwaita: use borders_color for separators
...
- fixes #2175
2019-10-07 13:05:12 -04:00
Benjamin Otte
a3cfb42888
eventcontrollerkey: Change behavior of contains-focus
...
contains-focus now returns TRUE when is-focus is TRUE instead of FALSE.
Fixes #2184
2019-10-07 04:49:50 +02:00
Benjamin Otte
578dc9e70b
eventcontrollerkey: Add getters for the properties
...
...and use them.
2019-10-07 04:49:50 +02:00
Benjamin Otte
6769db160d
icontheme: Don't try to scale pixbufs to 0px
...
Always insist on at least 1px, even if the thumbnail we're turning into
an icon was 256 * 3 and should be scaled to 32 * 3/8.
2019-10-07 04:49:50 +02:00
Benjamin Otte
56d16aae42
selectionmodel: Remove doubled semicolon
2019-10-07 04:49:50 +02:00
Daniel Boles
98f0d85c4a
Builder: Fix a couple of typos in documentation
2019-10-06 20:48:10 +01:00
Christian Hergert
fea2a82ef6
textview: use GtkTextViewChild for border and overlay children
...
This creates a new GtkTextViewChild that can manage overlay children at
given x,y offsets in buffer coordinates. This simplifies GtkTextView by
extracting this from GtkTextWindow as well as providing a real widget for
the borders.
With this change, we also rename gtk_text_view_add_child_in_window() to
gtk_text_view_add_overlay(). For those that were using
GTK_TEXT_WINDOW_WIDGET, they can use a GtkOverlay. It does not appear
that anyone was using GTK_TEXT_WINDOW_(LEFT|RIGHT|TOP|BOTTOM) for widgets
in this fashion, but that can be done by setting a gutter widget with
gtk_text_view_set_gutter(). We can make GtkTextViewChild public if
necessary to simplify this should it become necessary.
GtkTextViewChild will setup a CSS node of either "text" or "border"
depending on the GtkTextWindowType.
The old GtkTextViewChild has been renamed to AnchoredChild as it is only
used for widgets with anchors in the GtkTextBuffer. This also removes the
use of allocated GSList and instead embeds a GQueue and GList to save a
few extraneous allocations.
2019-10-04 14:45:43 -07:00
Christian Hergert
8373cc6c47
textview: revert renaming of buffer_to_surface_coords()
...
The renaming of this function doesn't make much since because the window
is the GtkTextWindowType, not GdkWindow specifically. So we can keep the
old name which is closer to the proper meaning and less code for consumers
to change when porting to 4.x.
2019-10-04 13:22:49 -07:00
Matthias Clasen
872d2046fd
Merge branch 'list-box-headers' into 'master'
...
Fix reuse of list box header widgets
See merge request GNOME/gtk!1114
2019-10-04 18:27:05 +00:00
Sam Hewitt
44ec142fa9
Adwaita: new levelbar style
2019-10-04 14:16:11 -04:00
Philip Withnall
b70f389b64
gtklistbox: Only unparent header rows if they haven’t been reused
...
It’s possible for code which uses a `GtkListBox` to reuse a single
header row, and move it around between rows. For example, this might
happen if the code has interactive widgets (like buttons) in the row,
and doesn’t want to continually recreate them and reattach signals to
them whenever the row headers change.
Unfortunately, this was broken, as the old header widget was
unconditionally unparented, even if it had just been set as the header
for a different row in the same `GtkListBox`. This left it assigned as
a child widget in the `GtkListBox` (so it was iterated over by
`forall`), but without its parent widget set.
Fix that by only unparenting the header if it hasn’t already been
assigned as the parent of a different row.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-10-04 18:48:53 +01:00
Philip Withnall
1c73edd9b0
gtklistbox: Factor the new header out into a separate variable
...
Makes the code a little clearer, but makes no functional changes.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-10-04 18:48:51 +01:00
Christoph Reiter
94d9088034
Print a warning if GTK_DEBUG is set but gtk isn't built with G_ENABLE_DEBUG
...
G_ENABLE_DEBUG is tied to the meson builttype property, so building with "plain"
results in G_ENABLE_DEBUG not being defined and the GTK_DEBUG env var just gets ignored
for that build.
Since it can be confusing that GTK_DEBUG has no effect print a warning message instead.
See #2020 . This is a port of !1109 to master
2019-10-02 21:35:20 +02:00
Rico Tzschichholz
0ad4166482
mediafile: Add g-i annotations for actual return-type of factory methods
2019-09-26 08:19:25 +02:00
Timm Bäder
7ce1055656
eventcontrollerscroll: Events are unhandled by default
...
While the ::scroll signal always returns whether it handled the event,
the others do not, for example ::decelerate.
Previously, this caused the event to stop at a scroll controller with
CAPTURE phase, never emitting the ::decelerate signal on later
controllers with BUBBLE phase.
Fixes #2151
2019-09-25 17:51:53 +02:00
Timm Bäder
78a376aa7f
snapshot: Try to avoid some linear gradient nodes
2019-09-25 17:51:52 +02:00
Timm Bäder
43f2b47fc9
searchentry: Use a box layout
2019-09-25 17:51:52 +02:00
Timm Bäder
413cfed7d7
searchentry: Use edit-clear-all-symbolic as clear icon
...
Fixes #2109
2019-09-25 17:51:52 +02:00
Timm Bäder
1b4bce4182
fontchooserwidget: Use a bin layout
2019-09-25 17:51:52 +02:00
Timm Bäder
387587dedb
colorbutton: Use a bin layout
2019-09-25 17:51:52 +02:00
Timm Bäder
5d8c8f33c0
dialog: Remove useless gtk_widget_show() call
2019-09-25 17:51:52 +02:00
Timm Bäder
d032396031
filechooserbutton: Add icon to default (None) combo box item
...
See #2118
2019-09-25 17:51:52 +02:00
Timm Bäder
12438b30a0
filechooserbutton: Remove priv->child
...
We never use it except when updating the state flags, but we can as well
do that for both children.
2019-09-25 17:51:52 +02:00
Timm Bäder
ea1ff9c482
filechooserbutton: Remove an outdated comment
...
The path used is wrong but the string isn't used in the testsuite
anyway.
2019-09-25 17:51:52 +02:00
Timm Bäder
8122156e84
scrolledwindow: Remove set_placement_internal()
...
set_placement() does the exact same thing.
2019-09-25 17:51:52 +02:00
Timm Bäder
991f4ed993
menubar: Use a box layout
2019-09-25 17:51:51 +02:00
Timm Bäder
29244c5c40
video: Use a bin layout
2019-09-25 17:51:51 +02:00
Timm Bäder
ca3d855c44
levelbar: Use a bin layout
2019-09-25 17:51:51 +02:00
Timm Bäder
7de076481e
headerbar: Fix end-packed child order
...
We pack from right to left there.
2019-09-21 09:41:53 +02:00
Matthias Clasen
b14b0efefe
toolbar: Use a popover for overflow
...
We are phasing out menus.
This is not quite complete, toolitems still
create menuitems, which we translate on the fly.
2019-09-16 17:30:47 -04:00
Matthias Clasen
1b271f3335
notebook: Use a popover for the tab menu
...
We are phasing out menus.
2019-09-16 17:30:47 -04:00
Matthias Clasen
03e30431a8
menutoolbutton: Add support for popovers
...
Just like the underlying menu button, support
popovers too.
2019-09-16 07:24:59 -04:00
Matthias Clasen
5a93449b89
window: Make fallback menu a popover
...
We want to phase out menus.
2019-09-16 07:23:17 -04:00
Matthias Clasen
222e05c2d2
Remove unused includes
...
Don't include gtkmenu.h in places where
it isn't used anymore.
2019-09-16 07:23:17 -04:00
Matthias Clasen
c0071a0676
text util: Remove an unused function
...
_gtk_text_util_append_special_char_menuitems was not used.
2019-09-15 15:01:45 -04:00
Rico Tzschichholz
97231ca231
gtk: Fix some g-i annotation warnings
2019-09-15 17:57:28 +02:00
Rico Tzschichholz
67bd28eaaf
gtk: Fix parameter annotations for gtk_buildable_parse_context_get_position
2019-09-15 17:57:28 +02:00
Rico Tzschichholz
51b2fd1777
build: gtkbuilderparser.c contains g-i annotations for public API
2019-09-15 17:57:28 +02:00
Matthias Clasen
ff5eac6da5
Merge branch 'wip/rah/screensaver-active-fix' into 'master'
...
gtkapplication-dbus: Initialise screensaver-active property
See merge request GNOME/gtk!1091
2019-09-15 15:54:08 +00:00
Christian Hergert
7927f7a440
textview: clip to text window when drawing
...
When drawing the GtkTextView text, we need to clip to the visible area
so that we do not risk drawing under the border windows.
2019-09-13 16:44:04 -07:00
Christian Hergert
605284bc36
textview: fix textview drawing in presence of gutters
...
When drawing a left or top gutter, we need to adjust the origin of the
text snapshot or we risk the gutter drawing above the text.
2019-09-13 16:02:28 -07:00
Timm Bäder
54ed31ebaf
notebook: Use a box layout
...
And incidentally make the CSS node docs correct again.
2019-09-13 19:21:04 +02:00
Timm Bäder
6320bd5849
fontbutton: Shorten clear_font_data a bit
2019-09-13 19:21:02 +02:00
Timm Bäder
86cc7f6925
fontbutton: Use a bin layout
2019-09-13 11:53:24 +02:00
Timm Bäder
adb77e1a92
appchooserdialog: Remove unnecessary gtk_widget_show() calls
2019-09-13 11:39:34 +02:00
Timm Bäder
097f3c9514
headerbar: Remove spacing property
...
Replace it with border-spacing in css
2019-09-13 11:07:56 +02:00
Timm Bäder
519967cc69
headerbar: Use a center layout
...
Get rid of the custom title centering etc. and use a GtkCenterLayout.
Use a box on the start/end to manage the child widgets.
2019-09-13 11:07:56 +02:00
Timm Bäder
a7b9a33efc
Add GtkCenterLayout
...
And use it in GtkCenterBox, different widgets following.
2019-09-13 11:07:54 +02:00
Timm Bäder
32b84b8ab6
native: Don't compare a pointer with 0
...
We have NULL for that.
2019-09-11 08:12:31 +02:00
Timm Bäder
8ec1c866e1
widget: Inline build_finalize_assertions into only caller
2019-09-11 08:12:31 +02:00
Timm Bäder
3a06394fde
headerbar: Don't update window buttons when unrealized
...
It doesn't make much sense in that case and we will update them again
when realizing.
2019-09-11 08:12:31 +02:00
Timm Bäder
ce72154913
Rename gtkbookmarkmanager.h to gtkbookmarksmanagerprivate.h
...
It's a private type, so gets a private header file name.
2019-09-11 08:12:31 +02:00
Timm Bäder
ed11f2a9e4
bookmarksmanager: Stop exporting get_xdg_type
2019-09-11 08:12:31 +02:00
Timm Bäder
60f2e452a1
switch: Stop using a private struct
...
Private type, no private struct needed.
2019-09-11 08:12:31 +02:00
Alexander Larsson
76103ee286
GtkBuildable: Fix indentation
2019-09-10 12:08:20 -04:00
Alexander Larsson
73042bfc54
GtkWidget: Precompile template xml on class creation
...
Ideally we will precompile during build and store the result in the
resource, but if that doesn't happen at least we will only parse
the xml once.
2019-09-10 12:08:20 -04:00
Alexander Larsson
ff23397701
GtkBuilder: Add support for precompiling builder xml
2019-09-10 12:08:20 -04:00
Alexander Larsson
96b37f4eb8
Use the new GtkBuildableParser type in GtkBuildable interfaces
2019-09-10 12:08:20 -04:00
Alexander Larsson
135cea76fb
GtkBuildableParser: Add a wrapper for GMarkupParser
...
This currenly just wraps GMarkupParser, but the plan is to expose this
instead of GMarkup in the GtkBuildable interfaces, allowing us to
replace the parser with something that handles pre-parsed input
instead.
Note that we duplicate some of the features of GMarkup to implement
the APIs rather then call down to GMarkup, as we need to support these
in the pre-parsed case anyway.
2019-09-10 12:07:15 -04:00
Matthias Clasen
ff087e126f
Merge branch 'wip/chergert/tune-linedisplay-cache' into 'master'
...
textview: optimize linedisplay cache based on number of visible rows
See merge request GNOME/gtk!1090
2019-09-10 01:42:13 +00:00
Matthias Clasen
9501fc2c14
Merge branch 'nested-popover-menu' into 'master'
...
Nested popover menus
See merge request GNOME/gtk!1076
2019-09-10 01:09:31 +00:00
Timm Bäder
0603b4431a
icontheme: Stop using a private struct
...
The GtkIconTheme/GtkIconInfo structs aren't public anymore, so use the
structs directly instead of a priv pointer.
2019-09-09 17:36:27 +02:00
Timm Bäder
5f48f60a93
Icontheme: Clean up gtk_icon_info_load_async
2019-09-09 17:36:27 +02:00
Timm Bäder
cc9faf3cfa
scrolledwindow: Actually add controller to widget
...
Closes #2127
2019-09-09 17:36:27 +02:00
Timm Bäder
32cec6c1cb
icontheme: Adapt a code sample to the GdkPaintable transition
2019-09-09 17:36:27 +02:00
Timm Bäder
c0827e2c54
pixbufutils: Escape file data only once
2019-09-09 17:36:27 +02:00
Timm Bäder
1a931da046
pixbufutils: Pass colors as string to load_symbolic_svg
...
We were converting the same colors over and over again to a string, just
to free them again at the end of the function. We know the colors at
compile time however, so don't convert them at all.
2019-09-09 17:36:27 +02:00
Timm Bäder
8eb62f138b
pixbufutils: Only get icon size once
...
load_symbolic_svg was loading the pixbuf just to get its size via
gdk_pixbuf_get_{width,height}. However, this function is called in a
loop in gtk_make_symbolic_pixbuf_from_data.
So, do this only once and pass the icon size along to load_symbolic_svg.
2019-09-09 17:36:27 +02:00
Timm Bäder
6a8921ec6b
icontheme: Remove symbolic pixbuf cache
...
We recolor icons on via color matrix nodes these days, so this cache is
basically unused.
2019-09-09 17:36:27 +02:00
Timm Bäder
53132d0235
icontheme: Add LRU cache back
...
Add a cache of icon infos that we keep around a little longer, to avoid
loading icons from disk that only exist for a short amount of time (e.g.
during one frame of a cell renderer snapshot).
We make sure recently used items are kept alive by just adding them to
the cache on lookup.
2019-09-09 17:36:27 +02:00
Timm Bäder
32bed34935
icontheme: Remove GtkIconInfo->pixbuf
...
Create textures as soon as possible.
2019-09-09 17:36:26 +02:00
Timm Bäder
1873b38a94
icontheme: Remove icon_info_load_pixbuf
...
What it does overlaps with the only caller a lot now.
2019-09-09 17:36:26 +02:00
Timm Bäder
38b4a2a8e2
icontheme: Optimize suffix_from_name
...
We call this function a lot, so avoid repeated strlen() calls on @name
and the different suffixes.
2019-09-09 17:36:26 +02:00
Timm Bäder
b65d9ca955
icontheme: Avoid creating useless IconThemeDirs
...
We were allocating IconThemeDir instances and then only later assign a
value to has_icons. In the !has_icons case, we were directly throwing
the IconThemeDir away again.
Delay allocating the IconThemeDirs until we know that it has icons.
This avoids allocating and then de-allocating around 1400 IconThemeDir
instances when opening the widget-factory.
2019-09-09 17:36:26 +02:00
Timm Bäder
0b472c23d7
icontheme: Inline scan_resources into only caller
...
The previous code was hiding the fact that the scan_resources function
almost always did nothing and just used g_resources_enumerate_children()
and then returned FALSE, leaving the caller with cleaning up the already
allocated IconThemeDir. By inlining this, we make sure that calling code
does not even need to allocate the IconThemeDir.
2019-09-09 17:36:26 +02:00
Timm Bäder
bb89ee184f
icontheme: Remove proxy pixbufs
...
These were only used for the LRU cache.
2019-09-09 17:36:26 +02:00
Timm Bäder
eb087c9943
icontheme: Remove lru cache
...
We will replace it with something else later
2019-09-09 17:36:26 +02:00
Timm Bäder
eeec6f8fb9
icontheme: Annotate return value as nullable
2019-09-09 17:36:26 +02:00
Timm Bäder
71339225eb
icontheme: Remove gtk_icon_info_load_texture
...
It's the same as load_icon now.
2019-09-09 17:36:26 +02:00
Timm Bäder
590e70d4d1
icontheme: Return a paintable from gtk_icon_info_load_icon
2019-09-09 17:36:26 +02:00
Timm Bäder
fd16ac4d5e
icontheme: Return paintables from more API
2019-09-09 17:36:26 +02:00
Timm Bäder
f3099afcc5
icontheme: Return textures from load_icon{,_for_scale}
2019-09-09 17:36:26 +02:00
Timm Bäder
e0fe2882ad
icontheme: Don't try to scale pixbufs to same size
2019-09-09 17:36:26 +02:00
Timm Bäder
4413592a70
recentmanager: Stop using linked lists
...
It doesn't really make sense to save the applications and groups in
recent infos as linked lists. We get them from glib as arrays, so we can
as well just save them as such.
2019-09-09 17:36:26 +02:00
Timm Bäder
4c28ee80a6
filechooserwidget: Create recent manager when setting operation mode
...
Creating a recent manager can be fairly expensive and we won't use it if
the widget is not visible or the recent mode has not been entered. Code
other places can already handle a NULL recent manager, so just create it
when entering the recent mode. And shove 25ms of startup time off the
widget-factory this way.
2019-09-09 17:36:26 +02:00
Timm Bäder
f4c4fe860b
filechooserwidget: Remove custom recent_info_has_application impl
2019-09-09 17:36:26 +02:00
Timm Bäder
4766b475d0
filechooserwidget: Inline come functions into only callers
...
Similar to the previous commit(s), make it clearer what this function
does.
2019-09-09 17:36:26 +02:00
Timm Bäder
ae75d4b565
filechooser: Move extract_recent_folders to filechooserwidget
...
It's not used anywhere else.
2019-09-09 17:36:26 +02:00
Timm Bäder
c102387916
filechooserwidget: Load recent files synchronously
...
Delaying this by one frame by putting it in an idle just makes the code
more complex for no gain. The actual slow part is reading the
recently-used.xbel, which happens when creating the recent manager.
2019-09-09 17:36:26 +02:00
Timm Bäder
86ad215deb
recentmanager: Indentation
2019-09-09 17:36:26 +02:00
Timm Bäder
2ffbb37783
icontheme: Annotate return value of load_icon as nullable
...
It returns NULL in the error case.
2019-09-09 17:36:26 +02:00
Timm Bäder
6821fe0c13
icontheme: Add error argument to _load_texture
...
Loading an icon might fail.
2019-09-09 17:36:26 +02:00
Timm Bäder
a0947232fa
icontheme: optimize icon_uri_is_symbolic as well
2019-09-09 17:36:26 +02:00
Timm Bäder
e3f1a3d27c
main: Check if any debug flags are set in gtk_get_debug_flags()
...
We end up checking the debug flags for the default display, but that's
unnecessary if we know that no display has any debug flags set anyway.
2019-09-09 17:36:26 +02:00
Timm Bäder
d98e05b91a
icontheme: Save the min_suffix for the min_dir
...
We already have to compute that value in the loop before, so just save
it.
2019-09-09 17:36:26 +02:00
Timm Bäder
fa85f4fc2e
icontheme: Remove use_builtin parameter from theme_lookup_icon
...
Unused.
2019-09-09 17:36:26 +02:00
Timm Bäder
44352b375e
icontheme: Remove paramter from get_icon_suffix
...
Turns out nobody care about that one.
2019-09-09 17:36:26 +02:00
Timm Bäder
ebe88ea322
icontheme: Optimize icon_name_is_symbolic
...
We call this function *a lot* it's doing lots of unnecessary work inside
g_str_has_suffix. Get the icon name length only once instead and
open-code the suffix check.
2019-09-09 17:36:26 +02:00
Timm Bäder
6d77723fe0
gtkicontheme: Avoid a get_icon_flags call
...
We're only using the value of the first call at all if
symbolic_suffix & ICON_SUFFIX_PNG is FALSE.
2019-09-09 17:36:26 +02:00
Timm Bäder
c5ed51a188
icontheme: Remove outdated comment
...
It's not called css_fg anymore and it can't possibly be NULL since we
make sure before passing it here.
2019-09-09 17:36:25 +02:00
Timm Bäder
1339c425a8
widget: Queue an allocate on native widgets when changing opacity
...
This way the opacity change works on toplevel windows on wayland.
2019-09-09 17:36:25 +02:00
Timm Bäder
7c723dfc58
inspect-button: Inline deemphasize_window() into only caller
2019-09-09 17:36:25 +02:00
Timm Bäder
72814a8153
inspect-button: Inline some functions into only caller
...
Make them clearer for later commits.
2019-09-09 17:36:25 +02:00
Timm Bäder
9952f72680
filechooserwidget: Properly watch for different display
...
The value returned by gtk_widget_get_settings() depends on the widget's
display, so watch for notify::display instead of using (un)root for
this.
Fixes the warnings seen when show a file chooser from the inspector.
2019-09-09 17:36:25 +02:00
Timm Bäder
cbc3ce5b03
box: Don't do casts before preconditions
2019-09-09 17:36:25 +02:00
Timm Bäder
d223752c55
infobar: Inherit from GtkContainer
...
infobars being a GtkBox doesn't make sense.
Also implement infobars without exposing internal children.
Closes #1957 because it adds the bottom border.
2019-09-09 17:36:25 +02:00
Timm Bäder
74208e9e0c
text: Fix a crash when retrieving the selected text
2019-09-09 17:36:25 +02:00
Timm Bäder
14b7fa1dd6
textview: Remove useless warning
...
The output doesn't make sense anymore and it breaks cursor blinking when
moving the focus back into the textview.
2019-09-09 17:36:25 +02:00
Timm Bäder
4bfe8605cb
layoutoverlay: Fix everything
...
This code is better because:
1) The coordinates translations are actually correct and not sometimes
wrong like before
2) We clip widgets that have overflow set
3) We honor the widget's transform
4) It is less code
2019-09-09 17:36:25 +02:00
Timm Bäder
e86bf764a8
scale: Allocate value close to slider
...
The scale might be allocated at a height greater than requested, and in
that case y=0 is just too far away. Allocate the value directly next to
the slider instead.
2019-09-09 17:36:25 +02:00
Timm Bäder
80411fb905
scale: Use top/left/bottom/right style classes on value label
...
Just top/bottom is not enough anymore.
77769a52b3
broke e.g. horizontal scales
with the value on top/bottom, adding too much space.
2019-09-09 17:36:25 +02:00
Timm Bäder
9166b03c42
fixed: Documentation clarifications
2019-09-09 17:36:25 +02:00