Commit Graph

7073 Commits

Author SHA1 Message Date
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