Commit Graph

7172 Commits

Author SHA1 Message Date
Carlos Garnacho
484dd98448 padOsd: Use ClutterSeat to fetch devices
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/760
2020-01-30 17:49:08 +00:00
Carlos Garnacho
84d92bf65e ui: Use ClutterSeat for keyboard/pointer a11y
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/760
2020-01-30 17:49:08 +00:00
Carlos Garnacho
8d88a9b9c4 keyboard: Update to ::last-device-changed parameter change
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/760
2020-01-30 17:49:08 +00:00
Jonas Dreßler
0f4aeb2654 checkbox: Correctly align label
The label needs to be center-aligned vertically so it's positioned in
the middle of the surrounding box, not at the top.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/967
2020-01-30 15:48:26 +01:00
Jonas Dreßler
0b3fec22d7 shellEntry: Hide caps lock warning and use animation to show it
Since the caps-lock warning adds a lot of spacing to dialogs and the
lock screen, hide it by default and only show it when necessary. To make
the transition smooth instead of just showing the label, animate it in
using the height and opacity.

Also add some bottom padding to the label so we can show or hide that
padding, too.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/952
2020-01-30 14:35:26 +00:00
Jonas Dreßler
9009b50bd1 polkitAgent: Remove styleClass argument for caps lock warning
The caps lock warning now has its own css class that works for this
case, too. Remove the custom class parameter and just use the default
one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/952
2020-01-30 14:35:26 +00:00
Jonas Dreßler
eee0657727 theme: Move caps-lock warning to entry widget stylesheet
The caps-lock warning is more related to entries than dialogs and is
also used in gdm, which is not realated to dialogs at all. Rename the
css class to caps-lock-warning-label and move it to the entry
stylesheet.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/952
2020-01-30 14:35:26 +00:00
Jonas Dreßler
056f5e5100 shellEntry: Make signal id variable private
Signal connection IDs should be private variables, so make this one
private.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/952
2020-01-30 14:35:26 +00:00
Daniel García Moreno
5b2c604fe4 animation: Scale animation actor for HiDPI
The Animation class inherits from St.Bin and manages the scale factor
in the image loading, but the widget size doesn't change and doesn't
depend on the scale factor so when the scale factor is different
from 1 the widget size doesn't match the image size.

This patch resizes the Animation widget using the scale factor so the
widget will match the animation images sizes.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1746
2020-01-30 14:28:45 +00:00
Florian Müllner
db9ef11f28 extensionSystem: Install pending updates on startup
Now that we have a way to check for updates and download them, we
should actually apply them as well. Do this on startup before any
extensions are initialized, to make sure we don't run into any
conflicts with a previously loaded version.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/945
2020-01-30 13:37:47 +00:00
Florian Müllner
ea5732fe6f extensionDownloader: Include version validation in update check
The extensions website will consider the setting to find the best suitable
extension version, so we should transmit the parameter for better results.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/945
2020-01-30 13:37:47 +00:00
Florian Müllner
b7e828fa3c extensionDownloader: Exclude extensions with pending updates from check
While it is possible that an extension has a newer version available
than the previously downloaded update, it's more likely that we end up
downloading the same archive again. That would be a bit silly despite
the usually small size, so we can either use the metadata from the
update, or exclude the extension from the check.

The latter is much easier, so let's go with that for now.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/945
2020-01-30 13:37:47 +00:00
Florian Müllner
cbc9bc5fc6 extensionDownloader: Only check updates for user extensions
System extensions cannot be updated through the website, so don't
even try.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/945
2020-01-30 13:37:47 +00:00
Florian Müllner
9c785ca6b6 extensionDownloader: Make checkForUpdates() check for updates
Currently the method installs updates instead of merely checking for
them (or it would do, if it actually worked).

This is not just surprising considering the method name, the whole idea
of live updates is problematic and will not work properly more often
than not:
 - imports are cached, so any local modules will stay at their
   original version until a shell restart
 - GTypes cannot be unregistered

So change the method to only download available updates, and set the
extensions' hasUpdate state accordingly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/945
2020-01-30 13:37:47 +00:00
Florian Müllner
375d1892bf extensionSystem: Add hasUpdate state
The current support for extension updates is half-baked at best.
We are about to change that, and implement offline updates similar
to gnome-software.

As a first step, add a hasUpdate property to the extension state
which will communicate available updates.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/945
2020-01-30 13:37:47 +00:00
Alexander Mikhaylenko
2490a2ffda workspacesView: Disable swipe tracker during window dragging
Since a11f417cd0, both drag and scroll
gestures are added to Main.layoutManager.overviewGroup actor, while
previously drag gesture was added to Main.overview._backgroundGroup
instead. Since we cannot use 2 different actors for dragging and scrolling
anymore. just disable the swipe tracker while dragging a window.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2151
2020-01-28 22:08:48 +00:00
Daniel van Vugt
4c4846e9bd overviewControls: Use ClutterActor's translation-x
Instead of reimplementing `translation-x` as a relayout. It still looks
the same but no longer incurs relayouts during the animation which
reduces render time significantly.

Related to: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1271

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/948
2020-01-28 18:09:49 +00:00
Jonas Dreßler
3f21c21532 status/system: Update text of orientation lock menu entry
Since the orientation lock menu entry is a proper menu entry instead of
a icon-only button now, we also show a description-text for that entry,
so update this text depending on whether orientation is locked or not to
better reflect what clicking the menu entry will do.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/964
2020-01-28 15:49:01 +00:00
Jonas Dreßler
6d2c834694 shellMountDialog: Close all dialogs when pressing Escape key
Since we don't really know what the buttons we're adding to the dialogs
are about, we can't configure a button to "be clicked" when the escape
key is pressed. So add a separate escape key handler to fix that, return
-1 and abort the request.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/961
2020-01-27 23:22:46 +00:00
Jonas Dreßler
0b51a52c9b shellMountDialog: Check for changes before creating new buttons
When updating the buttons of the mount dialogs, compare the new buttons
to the old ones and only create new buttons in case something changed.
This makes sure key focus isn't reset or lost unnecessarily while a
dialog is opened.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/961
2020-01-27 23:22:46 +00:00
Jonas Dreßler
7224afd32a shellMountDialog: Switch to new ListLayout for processes dialog
Since there is a generic layout for dialogs like that now, use it. Also
remove the functionality of focussing a window when clicking a list
item, it's not discoverable at all and pretty unexpected.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/961
2020-01-27 23:22:46 +00:00
Jonas Dreßler
d5dbc28f77 inhibitShortcutsDialog: Adapt to new dialog design
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/962
2020-01-27 23:40:04 +01:00
Jonas Dreßler
2996d9d977 location: Adapt geolocation dialog to new design
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/962
2020-01-27 23:40:04 +01:00
Jonas Dreßler
eec25367fc audioDeviceSelection: Adapt to new dialog design
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/962
2020-01-27 23:40:04 +01:00
Jonas Dreßler
7388e4006a kbdA11yDialog: Remove styleClass argument from DialogContent params
The MessageDialogContent class does not have a styleClass param, also
using the "access-dialog" css class doesn't make sense for this dialog,
so just remove that param.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/962
2020-01-27 23:40:04 +01:00
Jonas Dreßler
6c1cd1d8be extensionDownloader: Adapt install dialog to new design
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/962
2020-01-27 23:40:04 +01:00
Jonas Dreßler
5e08c80857 runDialog: Implement the new dialog design
Implement the new design according to the mockups in
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/960
2020-01-27 19:27:45 +01:00
Jonas Dreßler
26b78e7d77 runDialog: Use new indentation style
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/960
2020-01-27 19:27:45 +01:00
Olivier Fourdan
ee7e62c9c8 perf-tool: Spawn perf-tool-helper from gnome-shell
On Wayland, the display server is the Wayland compositor, i.e.
`gnome-shell` itself.

As a result, we cannot spawn `gnome-shell-perf-helper` before
`gnome-shell` is started, as `gnome-shell-perf-helper` needs to connect
to the display server.

So, instead of spawning `gnome-shell-perf-helper` from the perf tool,
start it from `gnome-shell` itself.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/941
2020-01-27 13:43:06 +00:00
Florian Müllner
9e9f3ff6b4 dateMenu: Indicate when do-not-disturb is on
When do-not-disturb is enabled, non-critical notifications will not
be shown as banners. It therefore makes sense to indicate that state
to the user, so they don't accidentally miss notifications.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/239
2020-01-22 21:55:28 +00:00
Florian Müllner
b4cf07d05f dateMenu: Add some spacing between date and indicator
While the existing dot doesn't necessarily need padding, we are about
to (sometimes) showing a "proper" icon there.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/239
2020-01-22 21:55:28 +00:00
Florian Müllner
aba3336b51 dateMenu: Bind pad visibility to indicator
Currently the indicator pad requests a size of 0x0 if the corresponding
indicator is hidden. Right now this is enough to balance out the indicator,
but it won't be when we add spacing to the parent container.

Properly hide the pad with the indicator to avoid that issue.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/239
2020-01-22 21:55:28 +00:00
Florian Müllner
2cabef97b6 calendar: Add "Do Not Disturb" switch
We've had the ability to temporarily disable notification banners
all the way back to 3.0, but we stopped exposing it in the UI with
the 3.16 notification redesign. With the message list being more
concise nowadays and the "Clear" button reduced to a single icon,
we now have space for a "Do Not Disturb" switch again.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/239
2020-01-22 21:55:28 +00:00
Florian Müllner
4e26e0e53c popupMenu: Turn Switch state into a GObject property
A property is often more convenient than a method, as it can be used
with bind_property() and friends.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/239
2020-01-22 21:55:28 +00:00
Sebastian Keller
b4ed8a3d06 extensionDownloader: Use uuid lookup method in checkForUpdates()
The extensions variable the code was trying to access was made private
and turned into a map some time ago.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1958
2020-01-22 17:08:11 +01:00
Carlos Garnacho
9f0ef0044d keyboard: Avoid blank space in OSK panel on portrait layouts
We try to make the OSK 1/3rd as big as the monitor. On landscape
layouts we usually get away with it as there's plenty of horizontal
space to enlarge the OSK while keeping the OSK aspect ratio.

In portrait layout, the horizontal space is a lot more scarce so
it means we'll still have plenty of space after making the OSK as
wide as it can possibly be, which will look as odd blank space in
the OSK panel.

In order to fix this, let the OSK panel height be less than 1/3rd
the monitor size if we are dealing with portrait layouts.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/2132
2020-01-21 16:58:17 +00:00
Carlos Garnacho
5f3f4c3301 keyboard: Do not reset to initial page on unmap
It will happen before next map anyway, and most notably at times
actor sizes produce correct results.

Fixes oddities in emoji pager visibility after showing the emoji
panel, moving to another page, and hiding the OSK with the downward
arrow button. The next time the emoji panel would be shown, panels
had a chance to remain invisible.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/943
2020-01-21 16:58:17 +00:00
Carlos Garnacho
1ef7306149 keyboard: Do not set the initial page on construction
It is already scheduled to be set on first map. Doing so here triggers
size and theme node checks the actor tree is not ready for, as the
toplevel actor is not yet attached to the stage.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/943
2020-01-21 16:58:17 +00:00
Carlos Garnacho
e15d8eeb17 keyboard: Tell emoji panel container to expand
Otherwise the EmojiSelection won't use up available space.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/2131
2020-01-21 16:58:17 +00:00
Carlos Garnacho
1f7c99d9fb keyboard: Tell keyboard container to expand
Otherwise the KeyContainer won't use up available space.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/2142
2020-01-21 16:58:17 +00:00
Georges Basile Stavracas Neto
f7620b385a appDisplay: Block search when showing app folder dialogs
Also following design guidance, make the search entry insensitive
when showing an app folder dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/896
2020-01-21 11:07:08 -03:00
Georges Basile Stavracas Neto
9746c00a22 appDisplay: Set minimum folder view rows to 1
This improves the usage of empty space in the dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/896
2020-01-21 11:07:08 -03:00
Georges Basile Stavracas Neto
dc6f36bf5e appDisplay: Remove rename popup
This functionality always suffered from discoveribility
problems, and now that the folder dialog can rename the
app folders, there's just no reason to keep it.

Remove the rename popup.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/896
2020-01-21 11:07:08 -03:00
Georges Basile Stavracas Neto
973c920284 appDisplay: Add folder title and entry to dialog
This allows editing the folder name, and keeps the folder title visible
at all times.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/896
2020-01-21 11:07:08 -03:00
Georges Basile Stavracas Neto
1dad5f3ffa iconGrid: Remove API to open space between icons
Since we moved to showing folders as dialogs now, there's no need
to keep this API. Remove it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/896
2020-01-21 10:49:56 -03:00
Georges Basile Stavracas Neto
802c8d5844 appDisplay: Cleanup unnecessary code
Now that the folder dialog handles the adaptToSize workaround,
there is no need to propagate the call throughout the class
hierarchy.

Remove the propagating calls to adaptToSize, and all the satellite
code.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/896
2020-01-21 10:48:44 -03:00
Georges Basile Stavracas Neto
7781f973f2 appDisplay: Rename popup API to dialog
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/896
2020-01-21 10:48:41 -03:00
Georges Basile Stavracas Neto
53c12dc33e appDisplay: Add the folder popup to AllView itself
Now the the folder popup behaves like a dialog, it must be
above the app grid, and not be affected by the scroll view
translation.

Add the folder popup to the AllView itself, instead of the
internal Shell.Stack that is inside the scroll view.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/896
2020-01-21 10:40:34 -03:00
Georges Basile Stavracas Neto
f46d10c4f9 appDisplay: Transform folder into a dialog
Make the AppFolderPopup behave much more like a dialog than a
popup itself. To do that, remove the BoxPointer and replace it
by a StBoxLayout. The dialog is is also bind-constrained to the
view selector.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/896
2020-01-21 10:40:34 -03:00
Georges Basile Stavracas Neto
0e3a2654d4 iconGrid: Animate icon positions
As per design guidance, animate the icons when the grid changes.
Each icon takes 250ms to transition, and starts moving 25ms after
the previous one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/882
2020-01-20 16:40:42 +01:00
Jonas Dreßler
31a2758606 endSessionDialog: Redesign according to new mockups
See https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/935
2020-01-20 15:05:41 +01:00
Jonas Dreßler
f7153ed340 endSessionDialog: Use a ListSection for application and session list
Since there now are generic ListSection and ListSectionItem widgets for
dialogs, use them for the lists of inhibitors in the endSessionDialog.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/935
2020-01-20 15:05:37 +01:00
Jonas Dreßler
02e885b3a4 dialog: Add a ListSection and ListSectionItem
According to the mockups, add a generic ListSection and ListSectionItem
for dialogs. To add items (like a ListSectionItem) to a section,
ListSection exposes a public ListSection.list actor.

See https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/935
2020-01-20 14:49:33 +01:00
Jonas Dreßler
012dde3de9 dialog: Split out _setLabel function
This will be useful when adding more generic containers like
MessageDialogContent.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/935
2020-01-20 14:49:33 +01:00
Jonas Dreßler
b3db8fc73f endSessionDialog: Don't allow focusing inhibitor items
Those items are not interactive, so it doesn't make sense to be able to
set key-focus to them, disallow that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/935
2020-01-20 14:46:39 +01:00
Jonas Dreßler
aae3789142 endSessionDialog: Fix a signal-name typo
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/935
2020-01-20 14:46:39 +01:00
Jonas Dreßler
184f980c18 endSessionDialog: Rename "warning" css class to "battery-warning"
Since this css class is specifically about the low-battery warning, make
the class name a bit more specific, too.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/935
2020-01-20 14:46:39 +01:00
Jonas Dreßler
11283339b6 endSessionDialog: Fix a typo
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/935
2020-01-20 14:46:39 +01:00
Jonas Dreßler
765895fb19 lightbox: Change vignette brightness to 0.5
Since the overview search results now have a dark background layer, we
can brighten the background image a bit again. As a factor we use 0.5,
since that ensures the texts in the IconGrid are still readable and the
background image is visible, too.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/2133
2020-01-19 18:01:57 +01:00
Andre Klapper
c565186ea8 Remove two line breaks to make comments for translators get displayed
A comment for translators must *immediately* precede a message:
https://wiki.gnome.org/TranslationProject/DevGuidelines/Use%20comments
These two comments were previously not displayed in any po files.
2020-01-18 14:07:41 +01:00
Jonas Dreßler
efd6be60e3 altTab: Allow pressing uppercase keys to close apps and windows
Right now only pressing "w" and "q" will close a window or an app, don't
confuse people who have caps-lock enabled or are holding down shift.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/168
2020-01-17 14:34:34 +00:00
Jonas Dreßler
84250bbf88 altTab: Don't return from _init() if there are no windows/apps
If a new SwitcherPopup is created and there are no windows or apps to
switch through found, instead of returning from _init(), still
initialize the SwitcherPopup and let the check in SwitcherPopup.show()
return false to terminate the popup.

In both cases, with or without the return statements,
WindowManager._startSwitcher() will call SwicherPopup.destroy(), which
will try to disconnect signal handlers, destroy actors etc. Now if the
constructor can't finish creating the popup, some of the functions
called from _onDestroy() will fail and throw errors.

One of those cases is when window-switcher is limited to the current
workspace, and a WindowCyclerPopup is initiated on an empty workspace.
Because this._highlight hasn't been created, _onDestroy() will fail when
trying to destroy the actor of this._highlight.

Also, the actor of this._switcherList will not get destroyed in case
show() returns because this._items is empty. For example, this will
happen when a new AppSwitcherPopup is initialized with at least 1
running app, but 0 windows on the active workspace.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/168
2020-01-17 14:34:34 +00:00
Jonas Dreßler
79ccf1a0b5 altTab: Rename List* classes to Switcher*
Calling those classes ThumbnailSwitcher and WindowSwitcher makes more
sense since we are using this naming scheme for all classes extending
SwitcherPopup.SwitcherList.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/168
2020-01-17 14:34:34 +00:00
Jonas Dreßler
d27638e37e shellEntry: Show popup menu at cursor position when pressing menu key
When pressing the menu key to show the popupMenu inside a ShellEntry,
the menu is currently aligned with the end of the entered text, this
causes a bug in case the text is overflowing the width of the entry: The
menu will be shown outside of the entry field, because it's aligned with
the (invisible) end of the text.

Fix that by simply aligning the popup menu with the cursor of the entry,
which is a behavior that makes sense when pressing the menu-key anyway.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/934
2020-01-15 18:27:31 +01:00
Jonas Dreßler
2fc84e0fe3 dialog: Remove MessageDialogContent.body property
According to the new dialog design, dialogs generally only have a title
and a description, so the `body` property is no longer needed.

At the places where it's still used, we replace it with the description
property or a plain label we add to MessageDialogContent ourselves.

See https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886
2020-01-15 00:17:25 +01:00
Jonas Dreßler
845c52797b dialog: Rename subtitle property to description
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886
2020-01-15 00:12:54 +01:00
Jonas Dreßler
48f1c4b9d7 dialog: Remove messageBox container from MessageDialogContent
`MessageDialogContent.messageBox` is not really needed and was only
needed to show icons, which is now no longer supported. The styling can
also be done using other CSS classes and this makes it a bit more
straightforward to add actors to the MessageDialogContent.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886
2020-01-15 00:05:34 +01:00
Jonas Dreßler
5d99bdbe5e dialog: Remove icons from dialogs
According to the new mockups, remove the icon from MessageDialogContent

See https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886
2020-01-15 00:05:34 +01:00
Jonas Dreßler
929c2c3921 js: Move dialog parts out of messageBox
Since MessageDialogContent.messageBox is going to be removed in a
subsequent commit, move the parts where it's used out of messageBox and
into the contentLayout instead. This will introduce wrong spacings in
some dialogs, which we're going to fix when implementing the redesigned
individual dialogs.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886
2020-01-15 00:05:04 +01:00
Jonas Dreßler
914c6e48b1 dialog: Remove addContent function
Now that child metas are removed, there's no need for a custom
`addContent` function anymore. It was only used in one place anyway...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886
2020-01-15 00:05:02 +01:00
Jonas Dreßler
259c44395f dialog: Switch to new indentation style
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886
2020-01-15 00:05:02 +01:00
Jonas Dreßler
aac01f1c9e status/network: Compare icon name to NULL instead of empty string
Since the last commit we set the gicon property of StIcon to NULL if an
empty string was given when setting the icon name, this means
`st_icon_get_icon_name()` will return NULL instead of an empty string.

When `getIndicatorIcon()` returns an empty string, the icon_name
property will now be set to NULL, so compare it to NULL here.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/888
2020-01-13 14:47:19 +01:00
Daniel van Vugt
76961927d5 iconGrid.js: Animate icon spring using translation
Animating the icon spring using the `translation-x/y` properties instead
of the `x/y` properties avoids relayouts. There are still other non-icon
actors moving, but it's a big improvement.

Before: 595 relayouts per spring
After: 94 relayouts per spring

Reducing relayouts reduces reallocation, which reduces CPU-intensive
JavaScript execution.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/926
2020-01-13 16:23:37 +08:00
Alexander Mikhaylenko
b21c8c1290 workspacesView: Round workspace position
Prevent blurring when scrolling workspaces by aligning it to pixel grid,
and be consistent with app grid.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/930
2020-01-11 02:58:19 +05:00
Florian Müllner
4c6a0678ff screenshot: Fix stripping suffix from relative filename
String.prototype.substr() doesn't support a negative length value
(to subtract from the full length), so we end up with a filename
of '' when hitting that code paths (a relative filename with '.png'
suffix).

Fix this by switching to String.prototype.replace() instead.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2091
2020-01-10 19:31:04 +01:00
Alexander Mikhaylenko
a8dcfa4656 windowManager: Use SwipeTracker
Replace existing four-finger gestures with SwipeTracker.

Since TouchpadWorkspaceSwitchAction and WorkspaceSwitchAction are now
unused, remove them.

Change programmatic workspace transition to use easeOutCubic interpolator
to match the gesture.

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

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/826
2020-01-10 18:20:22 +01:00
Alexander Mikhaylenko
3e6bcbb486 appDisplay: Use SwipeTracker
Replace existing panning and touchpad scrolling by SwipeTracker.

Since SwipeTracker only references one actor, redirect scroll events
from page indicators to the main scroll view.

Change programmatic scroll animation to use easeOutCubic interpolator
to match the gesture.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/826
2020-01-10 18:20:22 +01:00
Alexander Mikhaylenko
a11f417cd0 workspacesView: Use SwipeTracker
Replace existing panning, touchpad scrolling and four-finger gesture by
SwipeTracker.

Change programmatic workspace animation to use easeOutCubic interpolator
to match the gesture.

Also change the dragging distance to always match the current monitor.

Fixes touchpad parts of https://gitlab.gnome.org/GNOME/gnome-shell/issues/1338

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/826
2020-01-10 18:20:22 +01:00
Alexander Mikhaylenko
a0c0e52229 swipeTracker: Introduce swipe tracker
Add a unified swipe tracker supporting dragging, four-finger swipe on both
touchscreen and touchpad, and touchpad scrolling.

The shared logic is largely same as the one in WebKit and libhandy.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/826
2020-01-10 18:20:22 +01:00
Florian Müllner
1f2116eaf8 screenShield: Stop messing with fixed-position-set
We no longer change the position at all, so this property doesn't
change and doesn't matter (anymore).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/927
2020-01-10 16:26:31 +01:00
Florian Müllner
ceda02f2da screenShield: Fix showing shield without animation
Commit 24e631ffe2 changed the shield animation to use translation
instead of position.

However once the shield is raised, only an animation will lower it
again, which means the shield is missing when it's supposed to be
shown without animation (for example after an idle blank).

Fix this by resetting the translation-y property in that case.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/927
2020-01-10 16:26:31 +01:00
Florian Müllner
6233d87e5b dateMenu: Move weather forecast time above icon
The time is de-emphasized like the header, grouping them together
helps to further accentuate the more important information.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1143
2020-01-09 17:13:24 +01:00
Florian Müllner
57751a2bef dateMenu: Tweak temperature labels
Together with the forecast icon, the temperature label is the most
important information in the weather section. To emphasize it more,
reduce its space requirement by removing the temperature unit, then
make the text bold.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1143
2020-01-09 17:13:19 +01:00
Florian Müllner
1ef4d85b50 networkAgent: Handle 'vpn' connections when delaying request
Since commit 90a08ba0b6, we only open a network secret dialog immediately
in response to user action, and show a notification otherwise.

While for the actual request VPNs are handled separately from other connections,
this isn't true when we show the notification - we need to handle 'vpn' together
with the other types there, or we fall through to the default 'invalid type'
exception.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2008
2020-01-09 01:26:01 +00:00
Alexander Mikhaylenko
fc7bcf4761 workspacesView: Add timeout for mouse scrolling
Prevent uncontrollably fast scrolling. Use the same duration as switching
animation, but add a separate timeout to account for disabled animations.

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

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/825
2020-01-08 23:41:49 +01:00
Alexander Mikhaylenko
08ebfa1acf appDisplay: Add timeout for mouse scrolling
Prevent uncontrollably fast scrolling. Use the same duration as switching
animation, but add a separate timeout to account for disabled animations.

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

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/825
2020-01-08 23:41:49 +01:00
Alexander Mikhaylenko
944b835fa9 appDisplay: Reduce page switch time to 250ms
Be consistent with workspace switching.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/825
2020-01-09 03:26:16 +05:00
Alexander Mikhaylenko
9c1940ef9d workspaceThumbnail: Sync indicator with WorkspacesDisplay
Now that both ThumbnailsBox and WorkspacesDisplay use single adjustments for
controlling indicator and scrolling, create the adjustment in OverviewControls
and pass it to both objects, effectively syncing indicator to scrolling.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/821
2020-01-08 23:07:08 +01:00
Alexander Mikhaylenko
f55ff01239 workspaceThumbnail: Use scroll adjustment
This will allow it to share adjustment with WorkspacesDisplay in the next
commit.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/821
2020-01-08 23:07:08 +01:00
Alexander Mikhaylenko
8f4414de97 workspacesView: Use shared adjustment
Instead of having a scroll adjustment in each WorkspacesView, and using the
one from primary screen in WorkspacesDisplay, have just one adjustment in
WorkspacesDisplay, and sync the changes between WorkspacesView.

This will allow to share the adjustment between WorkspacesDisplay and
ThumbnailsBox in the next commits.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/821
2020-01-08 23:07:08 +01:00
Georges Basile Stavracas Neto
24e631ffe2 screenShield: Animate shield using translation_y
Instead of using the 'y', which queues a full relayout and
thus forces effects to be reapplied, use the 'translation_y'
property, that doesn't force relayouts and allows a future
blur effect to actually use the cached framebuffers a lot more.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/864
2020-01-08 15:59:15 -03:00
Florian Müllner
b0753f78cc systemActions: Alias power-off to halt and stop
Those are words users may reasonably use when trying to shut down their
computer, so add them to the list of keywords.

https://bugzilla.gnome.org/show_bug.cgi?id=791659
2020-01-08 15:32:28 +00:00
Florian Müllner
9dc85d76d9 environment: Remove unused ease parameter
In an earlier iteration of the ease patch set, animatable properties
and easing parameters were different arguments.

This wasn't the case in the final version, so remove the left-overs.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/917
2020-01-06 13:17:59 +00:00
Florian Müllner
10818c74a6 extensionPrefs: Don't (re-)bind text domain
Gettext is already set up from the binary, no need to do it again
in JS.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/918
2020-01-06 13:10:43 +00:00
Florian Müllner
42af514c51 keyboard: Fix input-source switcher alignment
More fallout from commit 104071acbd.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/916
2020-01-04 23:00:02 +00:00
Umang Jain
e07a5749b7 switchMonitor: Center align switcher icon's label
Fallout from 104071acbd.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/913
2020-01-02 13:03:08 +05:30
Robert Mader
28d42628d1 windowManager: Always reset window actors when minimize animation is cancelled
This was left out in b6d47c18c. Fixes an occasional warning:
`this._minimizeWindowOverwritten is not a function`

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/911
2019-12-21 15:28:32 +01:00
Florian Müllner
f5f9bd2e5e iconGrid: Fix icon alignment
We don't want the icon to fill extra space, so set the alignment
accordingly. Otherwise we get an unexpected result when adding
a background just to the icon part (as far as I can tell: just
system-action-icon).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/909
2019-12-20 22:58:26 +01:00
Florian Müllner
3c87ad5aab screenshot: Promisify PickPixel
Same as the previous commit, but for PickPixel.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/903
2019-12-20 15:43:01 +01:00
Florian Müllner
9db62236da screenshot: Promisify SelectArea
The screenshot code has a fair bit of nested callbacks, which means
that it is a good use case for async functions and Promises.

Most code uses GIO's async pattern, which means it can be easily turned
into promises with Gio._promisify(); first handle the couple of cases
that need custom code though, starting with SelectArea.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/903
2019-12-20 15:42:42 +01:00