Commit Graph

18563 Commits

Author SHA1 Message Date
Daniel van Vugt
76dfff1012 Pass 'radius' to blur APIs instead of 'sigma'
Requires mutter!1908 first.

So now consumers of the clutter blur code don't have to know the
implementation is Gaussian and no longer need to convert the intended
blur radius to a sigma value.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1905>
2023-12-14 18:20:59 +00:00
Florian Müllner
8c93d30531 docs: Fix st reference in urlmap
Whoops, no idea how that happened.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3055>
2023-12-14 18:12:22 +01:00
Florian Müllner
c0db83672e ci: Fix publishing docs
The originally merge request predates the switch to `main` as
the default branch name (by a mere week!).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3054>
2023-12-14 17:53:38 +01:00
Cassidy James Blaede
a0a3bf8bf1 schema: Better describe always-show-log-out key
- The "user menu" was replaced with "system menu" years ago, so
  update the terminology in the summary and description
- Remove the full stop from the end of the summary for consistency
- More verbosely describe the behavior that's being overridden to
  reduce confusion

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3050>
2023-12-13 14:03:14 +00:00
Zander Brown
12eb7aa506 ci: Build docs in CI
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1873>
2023-12-13 14:52:48 +01:00
Zander Brown
4373a91911 doc: Switch documentation to gi-docgen
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1873>
2023-12-13 14:52:48 +01:00
Florian Müllner
ebe1a4d303 dbusService: Exempt org.gnome.Shell from sender tracking
If an interface has any signals, we don't want to auto-shutdown
while a caller is still connected to a signal.

Unfortunately we can't tell whether there are any signal connections,
so we track all callers instead, and keep the service alive while
any of them is still on the bus.

For services that we call from gnome-shell itself - like screencasts
or extensions - this has the unintended side effect of effectively
disabling auto-shutdown.

Address this by exempting the org.gnome.Shell name from sender
tracking.

Services that we expect to keep running for the lifetime of the
shell already disable auto-shutdown, so the only downside is a
small startup delay to resolve the well-known shell name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7250

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3052>
2023-12-13 01:27:51 +01:00
Automeris naranja
8bf52109b0 extensions-window: Add placeholder text to the search entry
"Text fields should have placeholder text or a label".

https://developer.gnome.org/hig/patterns/controls/text-fields.html

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>
2023-12-12 16:53:48 +00:00
Automeris naranja
ee5a26593e extensions-window: Add tooltips to headerbar buttons
"Controls in the header bars of primary windows should all have tooltips".

https://developer.gnome.org/hig/patterns/feedback/tooltips.html

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>
2023-12-12 16:53:48 +00:00
Automeris naranja
c925446723 extensions-window: Allow opening Main Menu with F10
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>
2023-12-12 16:53:48 +00:00
Florian Müllner
39d2988865 windowPreview: Don't hide overlay while hovering icon
We should treat the icon like we do the caption or close button,
and still consider the preview hovered when the pointer is over
the icon.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3049>
2023-12-11 15:10:59 +00:00
Florian Müllner
2d34fbe2e7 extensions-app: Use banner instead of action bar
Action bars have largely gone out of fashion, and Banner is an
appropriate replacement in our case, so switch to that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3048>
2023-12-11 14:24:01 +00:00
Julian Sparber
33c074c738 st/scroll-view: Allow removing edge fade
Remove the fade effect when the css property `-st-vfade-offset` is removed
from a widget. The effect isn't added when the property never existed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3047>
2023-12-07 18:15:51 +01:00
Sebastian Keller
9f7a7ed202 st/widget: Adjust to changes to get_transformed_paint_volume() in mutter
This method is now transfer full.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3045>
2023-12-06 14:19:12 +00:00
Sebastian Keller
dc931e82cd st/widget: Don't allow adding/removing "" style class
strstr() in find_class_name() will always consider "" a match so the
loop was not stopping at the end of the class_list. None of the matches
within the class_list would satisfy the return conditions, unless the
class_list was either an empty string as well or has a trailing space.
So this ends up with a match outside of the allocated string that
happens to satisfy these conditions by chance which then leads to the
class string containing some of this unrelated memory. Or it might lead
to a segfault.

This adds checks to the public API that uses find_class_name() to
prevent extensions from accidentally triggering a crash this way or
having some otherwise unexpected results.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7152
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3006>
2023-12-05 23:31:40 +00:00
Florian Müllner
c8dae24645 st/bin: Fix height request
The request currently mixes up y-align and x-align.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3043>
2023-12-05 18:11:44 +01:00
Sam Hewitt
49c0b849c4 style: Improve text scaling support
- new drawing function to convert px to em, for select instances
- updated fontsize function to convert fonts in pt to em
- replace instances of discrete sizes with defined values
- fix instances where assets or icons did not scale along with text
- rework panel buttons to accommodate the scaling padding and icons
- new 'scalable' definitions for elements that follow text scaling

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3033>
2023-12-05 12:14:53 +00:00
Florian Müllner
bb78a0083a doc: Add README for toolbox tooling
Now that we have a collection of scripts around the toolbox
workflow, it makes sense to add a brief overview over the
available tools.

For now it's just located in the corresponding tools folder,
but it gives us something to point to once we overhaul the
toplevel documentation as part of the wiki migration.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3040>
2023-12-04 16:30:14 +00:00
Florian Müllner
7b5821251f tools: Remove outdated jhbuild setup script
As useful as the custom jhbuild setup was at the time, it has been
superseded by jhbuild proper (which gained the ability to install
system dependencies since) or alternatives like containers.

Given that the script hasn't been meaningfully updated for almost
10 years, its list of dependencies is hopelessly outdated, and it's
therefore more likely to confuse newcomers than being of actual
help.

As much as I have fond memories of the script when starting out,
it's finally time to retire.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3040>
2023-12-04 16:30:14 +00:00
Florian Müllner
dcee0c6329 extension-tool: Remove old compatibility code
Since GNOME 44, extension schemas are compiled at install time.

At the time GNOME 46 is released, this will be all supported versions,
so start relying on it and drop the old compatibility
code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3042>
2023-12-03 12:25:06 +01:00
Sam Hewitt
8e1241c29b popupMenu: Use less ambiguous symbols for radio options
- new checked and unchecked dot ornament assets
- updated JS with a NO_DOT ornament state, replaced instances of NONE with this

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3027>
2023-12-02 10:11:10 +00:00
Florian Müllner
c4fcc82137 tools/toolbox: Add run convenience script
Wrapping the gnome-shell call with `dbus-run-session` is *mostly*
enough for testing, but not quite.

When running without gnome-session, the wayland display is not
propagated to the D-Bus daemon, so any app that is D-Bus activated
still opens in the host session.

This can be worked around by using a specific wayland-display name
and exporting it to the `dbus-run-session` environment up-front.

At this point the invocation is finicky enough to justify another
convenience script. This also gives us a place to expose some
useful features for testing, like forcing a right-to-left layout
or simulating the greeter.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>
2023-12-01 15:58:21 +00:00
Florian Müllner
c22574c9b9 tools/toolbox: Add build convenience script
We don't require any build steps other than the standard meson
commands, but entering a toolbox and running 2-3 meson commands
still adds some friction.

Add a small convencience script that
 - finds the toplevel source directory (similar to `jhbuild make`)
 - enters the speficied toolbox (or the configured default)
 - automatically picks a build directory based on the toolbox name
 - builds and installs the project to /usr (inside the toolbox)

It also allows specifying meson -D options to change the build
configuration, and to optionally run `meson dist`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>
2023-12-01 15:58:21 +00:00
Florian Müllner
b739375bbd tools/toolbox: Set up first toolbox as default
Setting up more than one gnome-shell toolbox is uncommon, and users
shouldn't have to specify --set-default for other tools to pick the
right default.

It would be possible to detect the number of containers that were
created from the shell toolbox image, but the far easier option is
to just set up the first container as default.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>
2023-12-01 15:58:21 +00:00
Florian Müllner
5998036dc2 tools/toolbox: Allow to set new toolbox as default for other tools
When specified, write out a small config file that can be sourced
by other scripts to pick the default toolbox container.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>
2023-12-01 15:58:21 +00:00
Daniel van Vugt
98654e5446 style: Don't clip scrolling folder icons until they touch the border
In the absence of a fade-out it doesn't make sense to clip them sooner
than that.

So now we make the left and right padding equal to the border
("box-shadow") width and leave the top/bottom padding unchanged.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3031>
2023-12-01 12:30:59 +00:00
Florian Müllner
ca47e7f8e3 extension-tool: Show "version-name" field if set
Now that both the website and the Extension app support the custom
"version-name" field, we should expose it in the CLI tool as well.

As a more developer-oriented tool, keep showing the automatic
version along-side the new field when both are set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3034>
2023-11-30 15:23:14 +01:00
Aryan Kaushik
6db55eaea6 extensions-app: Support "version-name" metadata field
The extensions site recently added support for a custom
"version-name" string in metadata:
gitlab.gnome.org/Infrastructure/extensions-web/-/merge_requests/154

This allows developers to control the version that is exposed to
users. As the version according to the developer is almost always
more relevant than the automatic version assigned by the website,
use it instead of the "version" field if set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2995>
2023-11-30 14:10:27 +01:00
Dušan Kazik
f556699824 Update Slovak translation
(cherry picked from commit 5808dac61718f45604d3210fa6fb6b1789b37d14)
2023-11-27 13:43:14 +00:00
Peter Hutterer
e367a2713b padOsd: Fix rings and strips event handling
JS ERROR: TypeError: event.get_pad_event_details is not a function
    vfunc_captured_event@resource:///org/gnome/shell/ui/padOsd.js:824:53
    @resource:///org/gnome/shell/ui/init.js:21:20

These were renamed in mutter@97213041e8e7

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7210

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3029>
2023-11-26 23:31:14 +00:00
Sam Hewitt
ad5cffbce4 style: Fix oversights in screenshot UI css for high contrast
- fix non-working is_highcontrast if statements in drawing
- add missing hc bits for screenshot UI elements

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3030>
2023-11-24 11:05:28 -03:30
Sam Hewitt
ac7ef665a1 Use dedicated assets for ctrlAltTab
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3019>
2023-11-23 13:33:08 +00:00
Florian Müllner
7f7ae31fa3 dbusServices/extensions: Only show dialog when loaded
After the port to ESM, an extension's `prefs.js` file is imported
asynchronously. An unintended side effect of that is that we now
show the dialog before anything can be added to the window (either
by the extension, or the fallback error UI).

The delay almost always won't be noticeable to users, but it's
bad practice and prevents extensions from using some API that
only works before the window is realized.

To address the issue, add a `loaded` signal to the dialog that allows
the caller to postpone showing the window until the UI is ready.

Close: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7201
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3025>
2023-11-21 22:45:40 +00:00
Charles Wong
6ff08fd9bd main: Instantiate EndSessionDialog
Using an exported `init()` function to create the object is an odd
pattern, and not having the object referenced anywhere makes it harder
to access for debugging or extensions.

Just export the `EndSessionDialog` class and instantiate it like we
do for other objects.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2997>
2023-11-21 20:19:41 +00:00
Florian Müllner
f4c9489585 style: Stop setting slider height
Now that the slider requests a correct height, it is no longer
necessary to set it explicitly from the stylesheet.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>
2023-11-21 18:55:47 +00:00
Florian Müllner
99d49f787b slider: Request a size
Sliders (and level bars) currently don't request any size, so it's
up to the caller (or stylesheet) to explicitly set a size big
enough to fit the bar/handle.

That's rather unexpected, we should request the size we need ourselves.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7133

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>
2023-11-21 18:55:47 +00:00
Florian Müllner
a6706bd2ca slider: Cache custom style properties
Custom properties are not cached by the theme node itself, so
looking them up repeatedly at every repaint is relatively
expensive.

Avoid this by caching the values ourselves at style changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>
2023-11-21 18:55:47 +00:00
Florian Müllner
a639fb0fc4 barLevel: Cache custom style properties
Custom properties are not cached by the theme node itself, so
looking them up repeatedly at every repaint is relatively
expensive.

Avoid this by caching the values ourselves at style changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>
2023-11-21 18:55:47 +00:00
Florian Müllner
77a72cec1e barLevel: Stop capping border-width at 1 pixel
I can't think of a reason why limiting the border to a maximum
would make any sense.

The original intention was probably to set a minimum border width
to avoid having to deal with border/no-border complexity in the code,
but as cairo accepts a line width of 0, it just works.

However limiting the size to the overall height seems reasonable,
as at that size a bigger height and different fill color can
achieve the same effect without requires special handling of
other values like the radius.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>
2023-11-21 18:55:47 +00:00
Florian Müllner
7a04d92bc0 status/volume: Always look up device objects
Gvc may clean its device cache after we set up the device menu,
which can lead to failed assertions when using the "old" object
to later switch the device from a callback.

Make sure this doesn't happen by looking up the ID again from
the callback.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7173
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3011>
2023-11-21 18:50:46 +00:00
Julian Sparber
5b8347f90b st/viewport: Set adjustment properties all at once
This ensures that that property changes are notified all at the same
time and only after all were set. If we notify too early handlers
may act on a "broken" viewport.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3023>
2023-11-21 16:31:56 +01:00
Julian Sparber
78eb5f2a68 st/adjustment: Ensure changed signal emission is compressed
The docs say that `st_adjustment_set_values()` emits the `changed`
signal only once but it's actually emitted for each changed property,
this uses the `dispatch_properties_changed` vfunc to emit the `changed`
signal only per call to `st_adjustment_set_values()`. As a positive
side effect this also makes it possible to use `g_object_freeze/thaw_notify`
to compress the `changed` signal emission when using the setters for
properties.

This also fixes the wrong emission of the `changed` signal in
`st_adjustment_set_values()` when only the `value` property is changed.

Side note: the code is heavily inspired by GtkAdjustment

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3023>
2023-11-21 16:31:56 +01:00
Sabri Ünal
81f18d7ddb Update Turkish translation 2023-11-20 02:24:50 +00:00
Florian Müllner
f2601e6888 shellDBus: Await Eval() result
The Eval() method currently evaluates the provided string, and
returns the result immediately. This isn't useful when a promise
is returned, which has become much more likely now that accessing
any module requires import().

Simply await the result, to handle both sync and async code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3021>
2023-11-19 02:20:01 +00:00
Florian Müllner
eb8861e9b8 js: Rely on default scroll policy where appropriate
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>
2023-11-18 18:00:43 +00:00
Florian Müllner
a190a0830b st/scroll-view: Change default hscrollbar-policy
It is a bit odd to have different default values for the vertical
and horizontal policy, but then that's what we almost always want in
practice: Automatic scrolling vertically, and no scrolling horizontally.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>
2023-11-18 18:00:43 +00:00
Florian Müllner
b1cfe1732d st/scroll-view: Deprecate {v,h}scroll properties
We have better replacements now, so we'll eventually want to stop
exposing the internal scroll bar children.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>
2023-11-18 18:00:43 +00:00
Florian Müllner
998d703bc2 js: Stop using {v,h}scroll properties
We only use them to access the corresponding adjustments, and
ScrollView now exposes those directly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>
2023-11-18 18:00:43 +00:00
Florian Müllner
a63d5b6b09 st/scroll-view-fade: Stop using {v,h}scroll properties
They are internal children of the scroll view. Instead, switch to
the dedicated APIs for accessing the adjustments directly and query
the bar offsets.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>
2023-11-18 18:00:43 +00:00
Florian Müllner
14749744a3 st/scroll-view: Add private API to query bar offsets
The scroll fade effect is the only component that accesses the
{v,h}scroll properties for anything other than getting access
to the corresponding adjustments.

Allow the effect to get what it needs via new private API instead,
so we can deprecate and eventually remove the scroll bar properties.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>
2023-11-18 18:00:43 +00:00