Since the error message label provided at the bottom only says that
the newly provided password is weak, it can be consfusing for the
users as they might not understand why they can't press 'Accept'
button. This could be especially true for color blind people.
Fix it by allowing modification of new password entry only if the old
provided password is correctly entered.
We have code to show the "Restart" notification when the user
would change its account-type between STANDARD/ADMIN, except that
we never allow that to happen. So this code was never used.
We have the would_demote_only_admin function that is used to set
the visibility of the Account Type row. So we won't ever display
the Account Type row if the user would demote the only admin.
Otherwise the panel might look broken in the first half second it
takes to load the user data from accountsservice. The time might
get significant for enterprise/remote accounts.
Our UI doesn't expose the Delete button when the current logged user
is the one viewing its account settings. So there's no need to have
this dialog since it never gets shown.
The banner will show a message indicating a failure to Unlock the panel,
but we still should "lock" widgets by making them sensitive accordingly
to the current permission.
Fixes!1708
This makes sure the focus is immediately on the GtkFileDialog instead of
the CcAvatarChooser behind it. This was already added in !1685, but was
accidentally removed in !1822.
Fixes#2315
The crop corners were drawn with the center of the corner lines at the
edges of the crop. This resulted in the corners being visually cut if
the crop is dragged to the edge of the image. Instead, we can draw the
corner lines such that they are inside the edge of the crop, i.e.
shifted by half their linewidth.
We now use relative moves to draw the lines, which simplifies the
movements.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1824>
If crop.x changes due to a drag, crop.x + crop.width remains fixed, as
thet is the opposite edge. However, in the mapping of paintable to
widget coordinates, crop->x + crop->width can vary due to rounding
errors. This fixes that, so that crop->x + crop->width does not vary,
with the same fix in the y direction.
However, the edges of the circle can still remain jittery due to integer
rounding, which is not fixed by using 'width / 2.0' instead of 'width /
2', since the width and height might differ by a pixel. Instead, draw an
ellipse, which removes edge jitter completely.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1824>
The resizing and movement mechanics for the avatar crop can be finicky,
because:
1. The crop resets to the last valid crop when you drag out of range, so
that a somewhat quick drag does not go to the edge.
2. A corner drag only works in one direction, as the use of
eval_radial_line is not correct.
3. A side drag acts the same as a corner drag.
4. A slow drag won't move the crop, especially if the widget is larger.
All these issues are fixed with this partial rewrite of the resize and
movement logic:
1. A drag out of range will result in a size that is guaranteed to touch
the edge, making a crop to the edge much easier.
2. Instead of fixing eval_radial_line, we just "bind" one side to the
pointer position, making both directions act the same for a corner
drag.
3. A side drag now scales around the center for the orthogonal side.
4. Rounding errors in calculating the previous delta are prevented.
Meson extracts them by itself and add them as dependencies for the target.
It means one less location to keep track of files, and a lot less boilerplate
around the meson files
Error building template class 'CcSearchPanel' for an instance of type 'CcSearchPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcDisplayPanel' for an instance of type 'CcDisplayPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcMousePanel' for an instance of type 'CcMousePanel': .:0:0 Invalid object type 'CcIllustratedRow'
Error building template class 'CcKeyboardPanel' for an instance of type 'CcKeyboardPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcRegionPanel' for an instance of type 'CcRegionPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcUaPanel' for an instance of type 'CcUaPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcAvatarChooser'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcTzDialog'
cc_tz_dialog_get_selected_location: assertion 'CC_IS_TZ_DIALOG (self)' failed
dumped core
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcListRow'
Error building template class 'CcInfoOverviewPanel' for an instance of type 'CcInfoOverviewPanel': .:0:0 Invalid object type 'CcHostnameEntry'
AdwBanner is a new adaptive widget that replaces GtkInfoBar.
AdwBanner adapts better to mobile sizes and has an API
that fits with how we use infobars.
This commit changes CcPermissionInfobar to use an AdwBanner
internally instead of a GtkInfoBar. It also re-implements
part of GtkLockButton, as AdwBanner does not support adding
arbitrary widgets.