Commit Graph

7089 Commits

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