Commit Graph

7243 Commits

Author SHA1 Message Date
Florian Müllner
9e5071849c unlockDialog: Add swipe gesture
Clicking or typing to reveal the auth prompt are good options for
mouse/keyboard workflows, but awkward on touch devices. Now that
we have SwipeTracker, adding corresponding gestures support is
easy, so do just that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/972
2020-02-13 15:01:25 +00:00
Florian Müllner
55bfc4d820 unlockDialog: Use adjustment to control the transition
Tying the transition parameters to a single progress value represented
by an adjustment will enable us to implement stick-to-content swipe
gestures.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/972
2020-02-13 15:01:25 +00:00
Florian Müllner
6577a295da unlockDialog: Tweak transition animation
The current transition between clock and auth prompt uses a simple
crossfade.

"What kind of spatial model is that?!"
                                  T.B.

Root the transition a bit more by adding translation and scale to
the animation.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/972
2020-02-13 15:01:25 +00:00
Georges Basile Stavracas Neto
9f5f6aa9b2 authPrompt: Don't hide the caps lock warning label
Hiding the Caps lock warning label changes the layout of
Auth Prompt. This is specially noticeable when logging in
with unlisted users, where we change the visibility of this
label after typing a username, and the whole user widget
moves a bit.

Change the Cap lock label's opacity instead of hiding it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
261d6d35f5 userWidget: Add empty label when user is null
Currently, when a null user is passed, we don't add any
username label. That makes the layout of user and no-user
cases inconsistent.

Add a ghost label with no opacity to mimic the username
label.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
0f34cbb658 authPrompt: Only spin on password entries
Spinning while typing the password is a bit off-putting, and
inconsistent with how regular authentication behaves.

Only spin the spinner after typing the password.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
077a1d2309 authPrompt: Refactor 'next' signal
Currently, AuthPrompt is connecting to its own 'next' signal
signal to react to any of the entries being activated, and do
some actions like starting the spinner and answering the PAM
question.

Refactor this code into another method, and don't connect to
our own signal.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
66835c6e15 authPrompt: Remove colons from questions
Unfortunately, the question that is displayed comes directly
from PAM. It usually is just "Password:", which comes from
pam-unix, but other questions can be set, usually with the
colons, since they are crafted with a CLI workflow in mind.

Manually drop the colons from questions asked by PAM. This
is also done by the PolKit agent, which shows how the stack
is fragile, but it's what we have for now.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
99e81b32f4 authPrompt: Keep buttonWell and cancel button sizes in sync
So that the entry is horizontally centralized at all times.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
fe69dacaf1 loginDialog: Use text entry for username
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
6daeb048af authPrompt: Connect signals to both text and password entries
This is a regression from the transition to password entry. Both
entries need to be connected to the relevant signals, otherwise
username-based login won't ever work.

Connect both the text and the password entries.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
db4dfd8fa5 authPrompt: Trivial style cleanup
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
0b150a17c5 loginDialog: Replace colon by ellipsis on username question
So it plays better as a hint text.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
43a45c091d authPrompt: Use entry to show question texts
Currently, there is a dedicated label above the entry to
display the question text. According to the new mockups
for the lock screen, this label doesn't exist; instead,
the question is set inside the entry itself, as a hint
text.

Set the questions as hint texts of the entry, and remove
the now unused label.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
cc5adcbeef loginDialog: Center align Caps Lock and authentication messages
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Georges Basile Stavracas Neto
848cc1bb19 loginDialog: Set null user when asking for username
When going through the username + password login flow, set
the username to 'null' to update the user avatar.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Umang Jain
654093dc40 userWidget: Adapt if user is not mentioned for username login
If username-based login flow is followed, we need a default avatar
for the userWidget. Hence, check if the user passed to userWidget
is (null) which implies a username-based login flow.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Umang Jain
aebea82474 loginDialog: Move and relayout sessionMenuButton to bottom right
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Umang Jain
a6b29d6501 loginDialog: Apply CSS to sessionMenuButton according to mockups
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Umang Jain
c6a79fafc9 unlockDialog: Remove 'Login as another user' Label
According to the new mockups, logging in as another user
should be handled by the (<) button present on the lock-screen.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Umang Jain
7fc4fe9a97 authPrompt: Iconize the cancel button
Replace the "Cancel" label in the cancel button
by an arrow icon, and adjust the theme to make
it circular.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Umang Jain
ee0a36e6a3 authPrompt: Move cancel button, entry and spinner to a single row
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Umang Jain
a5972d2882 authPrompt: Remove Next button and its references
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Umang Jain
2fdc627257 userWidget: Allow vertical orientation for user avatars
Allow vertical orientation for the userWidget so that the user-avatar
can be centered and user's name can be placed below it. The plan
for 3.36 is to use this vertical userWidget layout for both lock
and login screen.

The userWidget is also used while creating the user-selection list
at the login, hence we still need to keep the horizontal layout
for userWidget in place.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
2020-02-12 19:29:48 +00:00
Jonas Dreßler
e1be4ba434 unlockDialog: Multiply blur sigma value with the scale factor
Since the blur sigma decides how many pixels get factored in when
blurring and setting a scale factor increases the background texture by
that factor, the sigma value should also be multiplied by the scale
factor.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/991
2020-02-12 11:11:03 -03:00
Jonas Dreßler
f351cfa2f7 blur-effect: Use sigma value instead of blur radius
Almost all implementations, including CSS [1] of gaussian blurs use the
sigma/standard deviation value as the input parameter, even if they call
that value "radius". Since using sigma is more correct mathematically
and avoids confusion for people used to other blur implementations, use
that parameter here, too.

[1] https://www.w3.org/TR/filter-effects-1/#funcdef-filter-blur

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/991
2020-02-12 11:10:38 -03:00
Georges Basile Stavracas Neto
dee738e24f background: Remove noise texture
Use the plain background color.

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

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
84c7890917 screenShield: Remove lock screen group from Crtl-Alt-Tab manager
There is nothing else to be focused in the lock screen itself -- the
top bar is already handled elsewhere, and the dialog manages itself
now.

Remove the lock screen group from the Ctrl-Alt-Tab manager.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
fd484099ae screenShield: Cleanup _ensureUnlockDialog
Just like on ScreenShield.activate(), we can just ensure the
unlock screen on ScreenShield.showDialog().

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
727c84251d screenShield: Rework key focus management
Instead of always grabbing key focus for the screen lock
group, do that for the unlock dialog itself.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
37e55df298 unlockDialog: Create auth prompt on demand
AuthPrompt is the set of actors that contain the user avatar,
the username, and the password entry. With the removal of the
screen shield, the unlock dialog (be it UnlockDialog or the
LoginDialog) is always created, and in the case of UnlockDialog,
so is the auth prompt.

This is problematic, though, since for passwordless accounts,
the simple act of creating AuthPrompt authenticates the user,
and lifts the lock screen.

Create the AuthPrompt on demand in UnlockDialog.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
2644f62318 unlockDialog: Add .critical CSS class to critical notifications
As per the latest lock screen mockups, critical notifications must have
a more prominent, solid color.

Add a .critical style class to critical notification bubbles, and make
them darker.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
893bde0ca1 theme: Adjust style of lock screen notifications
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
bd0bf3d3d0 unlockDialog: Line notification labels horizontally
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
05c918dc1a unlockDialog: Use just the counter to format notifications
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
3651cb2047 unlockDialog: Show clock when canceling or failing auth
There is still a problem of focus not going to the entry after the
first cancel, but it seems to work fine otherwise.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
b9c7631a55 unlockDialog: Toggle between clock and auth prompt
Toggle between them when (1) tapping anythere on the screen, and
(2) pressing any key.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
b59c9c6946 unlockDialog: Move auth prompt and clock to a ShellStack
We will toggle between each other in the next commit, so add
both to a ShellStack.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
f02313c1c6 screenShield: Remove key press event handler
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
6493789bc9 unlockDialog: Introduce UnlockDialogLayout
This is the layout manager responsible for ensuring
that the clock is always at the third of the screen
height, and the notifications can push it to above.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
c20451c2e7 sessionMode: Remove lock-screen mode
Now that the screen shield is gone (at least, as it used to
be), the corresponding session mode is not necessary anymore
as well.

Remove the 'lock-screen' session mode, and the corresponding
CSS.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
16dcb1ac15 screenShield: Move lock shield below dialog
Pretty much what the commit title says.

This gives the lock shield actor another role: instead of
being the interactive screen shield, make it the invisible
actor that prevents interacting with windows while the
unlock dialog is sliding down.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
c1ee656c35 screenShield: Only animate the unlock dialog
Remove the slide-up-down animation from the lock shield.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
cd09144069 screenShield: Rename _liftShield to _activateDialog
Lifting the shield is now what happens *after* successfully logging
in, not before. Now, what we do is activate the dialog before logging
in.

Rename the method to reflect that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
7851069d9c screenShield: Activate dialog when necessary
Activating a dialog is slightly different from opening it; the
former is about showing the user authentication widgetry, while
the latter is about creating it and pre-allocating the necessary
resources.

Activate the screen shield dialog when necessary.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
e42700a308 screenShield: Lift the unlock dialog
Instead of scaling it, lift the unlock dialog when unlocking,
and vice-versa.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
febc0690c1 screenShield: Remove scrolling
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
308b4f81b5 screenShield: Cleanup unused method arguments
The 'velocity' argument is not used anymore, since the only
caller passing a different value than 0 was the drag motion
callback.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
66a3ad42da screenShield: Remove the drag action from the shield
This is start of the end of the screen shield; start by
removing the dragging action from it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00
Georges Basile Stavracas Neto
1b84a3ecb2 unlockDialog: Don't destroy on cancel
Otherwise there will be no way to recover it in the future. Also
remove an else condition that assumed the dialog would destroy
itself on cancel.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
2020-02-10 22:30:52 +00:00